maj.world

maj.world

Git

This blob has been accessed 375 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")) {
  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.                 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>";
  3189.         }
  3190.  
  3191.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3192.  
  3193.                 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>";
  3194.  
  3195.                 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)) {
  3196.                         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>";
  3197.                 }
  3198.  
  3199.                 if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
  3200.                         echo "<a href=\"wiki.php?entry=$d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
  3201.                 }
  3202.  
  3203.                 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>";
  3204.  
  3205.                 if (file_exists("data/items/$d/passwd.txt")) {
  3206.                         echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
  3207.                 }
  3208.  
  3209.                 if (file_exists("data/items/$d/private.txt")) {
  3210.                         echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
  3211.                 }
  3212.  
  3213.                 if (file_exists("data/items/$d/member.txt")) {
  3214.                         echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
  3215.                 }
  3216.  
  3217.                 if (file_exists("data/items/$d/cat.txt")) {
  3218.                         echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
  3219.                 }
  3220.  
  3221.                 if (file_exists("data/items/$d/categories/$req_category")) {
  3222.  
  3223.                         $private_categories = "0";
  3224.                         $book_categories = "0";
  3225.        
  3226.                         if (file_exists("data/items/$d/categories")) {
  3227.                                
  3228.                                 if ($dh_read_cat_dir = opendir("data/items/$d/categories")) {
  3229.                                
  3230.                                         while (($read_cat_dir = readdir($dh_read_cat_dir)) !== false) {
  3231.                                
  3232.                                                 if ($read_cat_dir != "." && $read_cat_dir != "..") {
  3233.                                
  3234.                                                         if (file_exists("data/categories/$read_cat_dir/private.txt")) {
  3235.                                                                 $private_categories = $private_categories + 1;
  3236.                                                         }
  3237.  
  3238.                                                         if (file_exists("data/categories/$read_cat_dir/book.txt")) {
  3239.                                                                 $book_categories = $book_categories + 1;
  3240.                                                         }
  3241.                                                 }
  3242.                                         }
  3243.                                         closedir($dh_read_cat_dir);
  3244.                                 }
  3245.                         }
  3246.  
  3247.                         if ($private_categories > 0) {
  3248.                                 echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
  3249.                         }
  3250.  
  3251.                         if (file_exists("data/nocat.txt")) {
  3252.                                 echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
  3253.                         }
  3254.  
  3255.                         if ($book_categories > 0) {
  3256.                                 echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
  3257.                         }
  3258.  
  3259.                         echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
  3260.                 }
  3261.  
  3262.         }
  3263.  
  3264.         echo "</div><div id=\"panel_entry_body\"";
  3265.  
  3266.         if (isset($d_border) or isset($d_bgcolor_b) or isset($d_text_b)) {
  3267.                 echo ' style="';
  3268.         }
  3269.  
  3270.         if (isset($d_bgcolor_b)) {
  3271.                 echo "background-color: $d_bgcolor_b;";
  3272.         }
  3273.  
  3274.         if (isset($d_text_b)) {
  3275.                 echo "color: $d_text_b;";
  3276.         }
  3277.  
  3278.         if (isset($d_border)) {
  3279.                 echo "border-color: $d_border;";
  3280.         }
  3281.  
  3282.         if (isset($d_border) or isset($d_bgcolor_b) or isset($d_text_b)) {
  3283.                 echo '"';
  3284.         }
  3285.  
  3286.         echo '>';
  3287.  
  3288.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
  3289.  
  3290.         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/author.txt")) {
  3291.  
  3292.                 echo "<td width=\"85\" valign=\"top\">";
  3293.  
  3294.                 $author = file_get_contents("data/items/$d/author.txt");
  3295.  
  3296.                 echo "<a href=\"member.php?id=$author\">";
  3297.  
  3298.                 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"))) {
  3299.  
  3300.                         if (file_exists("images/avatar.gif")) {
  3301.  
  3302.                                 $avatar_gif_image_size = getimagesize("images/avatar.gif");
  3303.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  3304.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  3305.  
  3306.                                 $max_avatar_gif_image_width = 80;
  3307.                        
  3308.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  3309.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  3310.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  3311.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  3312.                                 }
  3313.                                 echo "<img src=\"images/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  3314.                         }
  3315.  
  3316.                         if (file_exists("images/avatar.jpg")) {
  3317.  
  3318.                                 $avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  3319.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  3320.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  3321.                        
  3322.                                 $max_avatar_jpg_image_width = 80;
  3323.                        
  3324.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  3325.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  3326.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  3327.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  3328.                                 }
  3329.                                 echo "<img src=\"images/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  3330.                         }
  3331.  
  3332.                         if (file_exists("images/avatar.png")) {
  3333.  
  3334.                                 $avatar_png_image_size = getimagesize("images/avatar.png");
  3335.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  3336.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  3337.                        
  3338.                                 $max_avatar_png_image_width = 80;
  3339.                        
  3340.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  3341.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  3342.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  3343.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  3344.                                 }
  3345.                        
  3346.                                 echo "<img src=\"images/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  3347.                         }
  3348.                         echo "<br>";
  3349.                 }
  3350.                 elseif (file_exists("images/members/$author/avatar.jpg") or file_exists("images/members/$author/avatar.gif") or file_exists("images/members/$author/avatar.png")) {
  3351.  
  3352.                         if (file_exists("images/members/$author/avatar.gif")) {
  3353.  
  3354.                                 $avatar_gif_image_size = getimagesize("images/members/$author/avatar.gif");
  3355.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  3356.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  3357.  
  3358.                                 $max_avatar_gif_image_width = 80;
  3359.                        
  3360.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  3361.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  3362.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  3363.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  3364.                                 }
  3365.                                 echo "<img src=\"images/members/$author/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  3366.                         }
  3367.  
  3368.                         if (file_exists("images/members/$author/avatar.jpg")) {
  3369.  
  3370.                                 $avatar_jpg_image_size = getimagesize("images/members/$author/avatar.jpg");
  3371.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  3372.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  3373.                        
  3374.                                 $max_avatar_jpg_image_width = 80;
  3375.                        
  3376.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  3377.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  3378.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  3379.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  3380.                                 }
  3381.                                 echo "<img src=\"images/members/$author/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  3382.                         }
  3383.  
  3384.                         if (file_exists("images/members/$author/avatar.png")) {
  3385.  
  3386.                                 $avatar_png_image_size = getimagesize("images/members/$author/avatar.png");
  3387.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  3388.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  3389.                        
  3390.                                 $max_avatar_png_image_width = 80;
  3391.                        
  3392.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  3393.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  3394.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  3395.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  3396.                                 }
  3397.                        
  3398.                                 echo "<img src=\"images/members/$author/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  3399.                         }
  3400.                         echo "<br>";
  3401.                 }
  3402.  
  3403.                 echo "<b>$author</b></a><br>";
  3404.  
  3405.                 if ((file_get_contents("data/username.txt") == $author) and file_exists("data/rank.txt")) {
  3406.                         echo "administrator<br>";
  3407.                 }
  3408.                 elseif (file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  3409.                         $rank = file_get_contents("data/members/active/$author/rank.txt");
  3410.                         echo "$rank<br>";
  3411.                 }
  3412.                 elseif (!file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  3413.                         echo "member<br>";
  3414.                 }
  3415.  
  3416.                 if ($dh_author_posts = opendir("data/items")) {
  3417.  
  3418.                         while (($author_post = readdir($dh_author_posts)) !== false) {
  3419.  
  3420.                                 if ($author_post != "." && $author_post != "..") {
  3421.  
  3422.                                         if (file_exists("data/items/$author_post/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3423.                                                 continue;
  3424.                                         }
  3425.  
  3426.                                         $private_categories = "0";
  3427.        
  3428.                                         if (file_exists("data/items/$author_post/categories")) {
  3429.                                
  3430.                                                 if ($dh_entry_categories_posts = opendir("data/items/$author_post/categories")) {
  3431.                                
  3432.                                                         while (($entry_category_posts = readdir($dh_entry_categories_posts)) !== false) {
  3433.                                
  3434.                                                                 if ($entry_category_posts != "." && $entry_category_posts != "..") {
  3435.                                
  3436.                                                                         if (file_exists("data/categories/$entry_category_posts/private.txt")) {
  3437.                                                                                 $private_categories = $private_categories + 1;
  3438.                                                                         }
  3439.                                                                 }
  3440.                                                         }
  3441.                                                         closedir($dh_entry_categories_posts);
  3442.                                                 }
  3443.                                         }
  3444.        
  3445.                                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$author_post/cat.txt")) {
  3446.                                                 continue;
  3447.                                         }
  3448.  
  3449.                                         if (file_exists("data/members/active/$author") and file_exists("data/bb.txt")) {
  3450.  
  3451.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  3452.                                                         $items_posts[] = $author_post;
  3453.                                                 }
  3454.                                         }
  3455.                                         elseif (!file_exists("data/members/active/$author") and (file_get_contents("data/username.txt") == $author) and file_exists("data/bb.txt")) {
  3456.  
  3457.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  3458.                                                         $items_posts[] = $author_post;
  3459.                                                 }
  3460.                                         }
  3461.                                 }
  3462.                         }
  3463.                         closedir($dh_author_posts);
  3464.                 }
  3465.  
  3466.                 $posts = count($items_posts);
  3467.  
  3468.                 if ($posts == 1) {
  3469.                         echo "$posts post";
  3470.                 }
  3471.  
  3472.                 if ($posts > 1) {
  3473.                         echo "$posts posts";
  3474.                 }
  3475.  
  3476.                 unset($items_posts);
  3477.  
  3478.                 echo "</td><td width=513 valign=top>";
  3479.         }
  3480.         else {
  3481.                 echo "<td width=598 valign=top>";
  3482.         }
  3483.  
  3484.         if (file_exists("data/items/$d/passwd.txt")) {
  3485.                 $passwd = file_get_contents("data/items/$d/passwd.txt");
  3486.         }
  3487.  
  3488.         if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
  3489.                 $crypt_passwd = sha1($_REQUEST['passwd']);
  3490.                 $crypt_passwd = md5($crypt_passwd);
  3491.                 $crypt_passwd = crypt($crypt_passwd,$crypt_passwd);
  3492.         }
  3493.  
  3494.         echo "<font style=\"font-size: 10px; color: #999999;\">";
  3495.  
  3496.         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"))))) {
  3497.                 $xavatar_author = file_get_contents("data/items/$d/author.txt");
  3498.                 echo "$xavatar_author - ";
  3499.         }
  3500.  
  3501.         entry2date($d);
  3502.  
  3503.         if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("data/items/$d/lastmod.txt")) {
  3504.  
  3505.                 if (file_exists("data/items/$d/revisions.txt")) {
  3506.                         echo " (Revision ";
  3507.                         readfile("data/items/$d/revisions.txt");
  3508.                         echo " - ";
  3509.                         echo date("l, M j, Y, g:i A",filemtime("data/items/$d/body.txt"));
  3510.                         echo ")";
  3511.                 }
  3512.         }
  3513.  
  3514.         echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
  3515.  
  3516.         if (isset($d_text_b)) {
  3517.                 echo "<font style=\"color: $d_text_b;\">";
  3518.         }
  3519.  
  3520.         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))) {
  3521.                 echo "This entry is password protected. If you know the magic word, click <a href=\"passwd.php?entry=$d\">here</a> to enter it.";
  3522.         }
  3523.         else {
  3524.                 $entry_body = file_get_contents("data/items/$d/body.txt");
  3525.  
  3526.                 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"))))) {
  3527.  
  3528.                         $badwords = file_get_contents("data/pf-badwords.txt");
  3529.  
  3530.                         if (file_exists("data/pf-censor.txt")) {
  3531.                                 $censor = file_get_contents("data/pf-censor.txt");
  3532.                         }
  3533.                         else {
  3534.                                 $censor = "[expletive]";
  3535.                         }
  3536.                         $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
  3537.                 }
  3538.                 echo $entry_body;
  3539.         }
  3540.  
  3541.         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")) {
  3542.                 $sig = file_get_contents("data/sig.txt");
  3543.                 echo "<br><br>--<br>$sig";
  3544.         }
  3545.         elseif (file_exists("data/members/active/$author/sig.txt") and file_exists("data/bb.txt")  and file_exists("data/bb-sig.txt")) {
  3546.                 $sig = file_get_contents("data/members/active/$author/sig.txt");
  3547.                 echo "<br><br>--<br>$sig";
  3548.         }
  3549.  
  3550.         if (isset($d_text_b)) {
  3551.                 echo "</font>";
  3552.         }
  3553.  
  3554.         echo "</td></tr></table>";
  3555.  
  3556.         if (file_exists("data/round.txt")) {
  3557.                 echo "<div class=\"rbspace\"></div>";
  3558.         }
  3559.  
  3560.         echo "</div>";
  3561.  
  3562.         if (file_exists("data/items/$d/categories") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3563.                
  3564.                 if ($dh_entry_categories = opendir("data/items/$d/categories")) {
  3565.                
  3566.                         while (($entry_category = readdir($dh_entry_categories)) !== false) {
  3567.                
  3568.                                 if ($entry_category != "." && $entry_category != "..") {
  3569.                                         $entry_categories[] = $entry_category;
  3570.                                 }
  3571.                         }
  3572.                         closedir($dh_entry_categories);
  3573.                 }
  3574.  
  3575.                 sort($entry_categories);
  3576.                 reset($entry_categories);
  3577.  
  3578.                 if (count($entry_categories) > 0) {
  3579.  
  3580.                         if (count($entry_categories) > 1) {
  3581.                                 $category_list = "categories";
  3582.                         }
  3583.                         else {
  3584.                                 $category_list = "category";
  3585.                         }
  3586.  
  3587.                         foreach ($entry_categories as $filed_under) {
  3588.                                 $category_list = $category_list . " | <a href=\"index.php?category=$filed_under\">$filed_under</a>";
  3589.                         }
  3590.  
  3591.                         echo "<div id=\"panel_category\"";
  3592.  
  3593.                         if (isset($d_border) or isset($d_bgcolor_c) or isset($d_text_c)) {
  3594.                                 echo ' style="';
  3595.                         }
  3596.  
  3597.                         if (isset($d_bgcolor_c)) {
  3598.                                 echo "background-color: $d_bgcolor_c;";
  3599.                         }
  3600.  
  3601.                         if (isset($d_text_c)) {
  3602.                                 echo "color: $d_text_c;";
  3603.                         }
  3604.  
  3605.                         if (isset($d_border)) {
  3606.                                 echo "border-color: $d_border;";
  3607.                         }
  3608.  
  3609.                         if (isset($d_border) or isset($d_bgcolor_c) or isset($d_text_c)) {
  3610.                                 echo '"';
  3611.                         }
  3612.  
  3613.                         echo ">$category_list</div>";
  3614.                 }
  3615.                 unset($entry_categories);
  3616.         }
  3617.  
  3618.         echo "<div id=\"panel_footer\"";
  3619.  
  3620.         if (isset($d_border) or isset($d_bgcolor_f) or isset($d_text_f)) {
  3621.                 echo ' style="';
  3622.         }
  3623.  
  3624.         if (isset($d_bgcolor_f)) {
  3625.                 echo "background-color: $d_bgcolor_f;";
  3626.         }
  3627.  
  3628.         if (isset($d_text_f)) {
  3629.                 echo "color: $d_text_f;";
  3630.         }
  3631.  
  3632.         if (isset($d_border)) {
  3633.                 echo "border-color: $d_border;";
  3634.         }
  3635.  
  3636.         if (isset($d_border) or isset($d_bgcolor_f) or isset($d_text_f)) {
  3637.                 echo '"';
  3638.         }
  3639.  
  3640.         echo '>';
  3641.  
  3642.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  3643.  
  3644.                 if (!file_exists("data/items/$d/comments/live")) {
  3645.                         echo "<a href=\"index.php?entry=$d&show=comments\">add comment</a>";
  3646.                 }
  3647.                 else {
  3648.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  3649.        
  3650.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  3651.        
  3652.                                         if ($live_comment != "." && $live_comment != "..") {
  3653.                                                 $live_comments[] = $live_comment;
  3654.                                         }
  3655.                                 }
  3656.                                 closedir($dh_comments);
  3657.                         }
  3658.  
  3659.                         $count_live_comments = count($live_comments);
  3660.  
  3661.                         echo "<a href=\"index.php?entry=$d&show=comments\">";
  3662.  
  3663.                         if ($count_live_comments == 1) {
  3664.                                 echo "$count_live_comments comment";
  3665.                         }
  3666.                         elseif ($count_live_comments < 1) {
  3667.                                 echo "add comment";
  3668.                         }
  3669.                         else {
  3670.                                 echo "$count_live_comments comments";
  3671.                         }
  3672.                         echo "</a>";
  3673.  
  3674.                         unset($live_comments);
  3675.                 }
  3676.         }
  3677.         else {
  3678.                 echo "<a href=\"index.php?entry=$d\">permalink</a>";
  3679.         }
  3680.  
  3681.         if (file_exists("data/items/$d/views.txt")) {
  3682.  
  3683.                 $views_value = file_get_contents("data/items/$d/views.txt");
  3684.  
  3685.                 if ($views_value == 1) {
  3686.                         echo " ( $views_value view ) ";
  3687.                 }
  3688.                 elseif ($views_value > 1) {
  3689.                         echo " ( $views_value views ) ";
  3690.                 }
  3691.                 else {
  3692.                         echo " ";
  3693.                 }
  3694.         }
  3695.  
  3696.         if (!file_exists("images/$d/album")) {
  3697.                 echo " ";
  3698.         }
  3699.         else {
  3700.                 if ($dh_album = opendir("images/$d/album")) {
  3701.  
  3702.                         while (($entry_album = readdir($dh_album)) !== false) {
  3703.  
  3704.                                 if ($entry_album != "." && $entry_album != "..") {
  3705.                                         $items_album[] = $entry_album;
  3706.                                 }
  3707.                         }
  3708.                         closedir($dh_album);
  3709.                 }
  3710.  
  3711.                 $album = count($items_album);
  3712.  
  3713.                 echo " | <a href=\"index.php?entry=$d&show=album\">";
  3714.  
  3715.                 if ($album == 1) {
  3716.                         echo "$album image";
  3717.                 }
  3718.                 elseif ($album < 1) {
  3719.                         echo "album";
  3720.                 }
  3721.                 else {
  3722.                         echo "$album images";
  3723.                 }
  3724.  
  3725.                 echo "</a>";
  3726.  
  3727.                 unset($items_album);
  3728.         }
  3729.  
  3730.         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)) {
  3731.  
  3732.                 if (!file_exists("data/items/$d/album")) {
  3733.                         mkdir("data/items/$d/album");
  3734.                 }
  3735.  
  3736.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3737.  
  3738.                         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  3739.  
  3740.                         $album_views_value = $album_views_value + 1;
  3741.  
  3742.                         $fp_album_views_txt = fopen("data/items/$d/album/views.txt","w");
  3743.                         fwrite($fp_album_views_txt,$album_views_value);
  3744.                         fclose($fp_album_views_txt);
  3745.                 }
  3746.         }
  3747.  
  3748.  
  3749.         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  3750.  
  3751.         if ($album_views_value == 1) {
  3752.                 echo " ( $album_views_value view ) ";
  3753.         }
  3754.         elseif ($album_views_value > 1) {
  3755.                 echo " ( $album_views_value views ) ";
  3756.         }
  3757.         else {
  3758.                 echo " ";
  3759.         }
  3760.  
  3761.         if (!file_exists("data/items/$d/filedrop/files")) {
  3762.                 echo " ";
  3763.         }
  3764.         else {
  3765.                 if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  3766.  
  3767.                         while (($dl_file = readdir($dh_filedrop)) !== false) {
  3768.  
  3769.                                 if ($dl_file != "." && $dl_file != "..") {
  3770.                                         $items_filedrop[] = $dl_file;
  3771.                                 }
  3772.                         }
  3773.                         closedir($dh_filedrop);
  3774.                 }
  3775.  
  3776.                 $filedrop = count($items_filedrop);
  3777.  
  3778.                 echo " | <a href=\"index.php?entry=$d&show=filedrop\">";
  3779.  
  3780.                 if ($filedrop == 1) {
  3781.                         echo "$filedrop file";
  3782.                 }
  3783.                 elseif ($filedrop < 1) {
  3784.                         echo "filedrop";
  3785.                 }
  3786.                 else {
  3787.                         echo "$filedrop files";
  3788.                 }
  3789.  
  3790.                 echo "</a> ";
  3791.  
  3792.                 unset($items_filedrop);
  3793.         }
  3794.  
  3795.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == filedrop)) {
  3796.  
  3797.                 if (!file_exists("data/items/$d/filedrop")) {
  3798.                         mkdir("data/items/$d/filedrop");
  3799.                 }
  3800.  
  3801.                 if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3802.  
  3803.                         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  3804.  
  3805.                         $filedrop_views_value = $filedrop_views_value + 1;
  3806.  
  3807.                         $fp_filedrop_views_txt = fopen("data/items/$d/filedrop/views.txt","w");
  3808.                         fwrite($fp_filedrop_views_txt,$filedrop_views_value);
  3809.                         fclose($fp_filedrop_views_txt);
  3810.                 }
  3811.         }
  3812.  
  3813.  
  3814.         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  3815.  
  3816.         if ($filedrop_views_value == 1) {
  3817.                 echo " ( $filedrop_views_value view ) ";
  3818.         }
  3819.         elseif ($filedrop_views_value > 1) {
  3820.                 echo " ( $filedrop_views_value views ) ";
  3821.         }
  3822.         else {
  3823.                 echo " ";
  3824.         }
  3825.  
  3826.         if (!file_exists("data/nopdf.txt") and file_exists("data/items/$d/pdf/file")) {
  3827.  
  3828.                 echo "| <a href=\"index.php?entry=$d&show=pdf\">pdf</a> ";
  3829.  
  3830.                 if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
  3831.  
  3832.                         $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  3833.  
  3834.                         $pdf_views_value = $pdf_views_value + 1;
  3835.  
  3836.                         $fp_pdf_views_txt = fopen("data/items/$d/pdf/count/views.txt","w");
  3837.                         fwrite($fp_pdf_views_txt,$pdf_views_value);
  3838.                         fclose($fp_pdf_views_txt);
  3839.                 }
  3840.  
  3841.                 $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  3842.  
  3843.                 if ($pdf_views_value == 1) {
  3844.                         echo " ( $pdf_views_value view ) ";
  3845.                 }
  3846.                 elseif ($pdf_views_value > 1) {
  3847.                         echo " ( $pdf_views_value views ) ";
  3848.                 }
  3849.                 else {
  3850.                         echo " ";
  3851.                 }
  3852.         }
  3853.  
  3854.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  3855.                 echo "| <a href=\"index.php?entry=$d\">permalink</a>";
  3856.         }
  3857.  
  3858.         echo "</div>";
  3859.  
  3860.         if (file_exists("data/round.txt")) {
  3861.  
  3862.                 echo '<b class="rbbottom"><b class="rb4e"';
  3863.  
  3864.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3865.                         echo ' style="';
  3866.                 }
  3867.  
  3868.                 if (isset($d_bgcolor_f)) {
  3869.                         echo "background-color: $d_bgcolor_f;";
  3870.                 }
  3871.  
  3872.                 if (isset($d_border)) {
  3873.                         echo "border-color: $d_border;";
  3874.                 }
  3875.  
  3876.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3877.                         echo '"';
  3878.                 }
  3879.  
  3880.                 echo '></b><b class="rb3e"';
  3881.        
  3882.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3883.                         echo ' style="';
  3884.                 }
  3885.  
  3886.                 if (isset($d_bgcolor_f)) {
  3887.                         echo "background-color: $d_bgcolor_f;";
  3888.                 }
  3889.  
  3890.                 if (isset($d_border)) {
  3891.                         echo "border-color: $d_border;";
  3892.                 }
  3893.  
  3894.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3895.                         echo '"';
  3896.                 }
  3897.  
  3898.                 echo '></b><b class="rb2e"';
  3899.  
  3900.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3901.                         echo ' style="';
  3902.                 }
  3903.  
  3904.                 if (isset($d_bgcolor_f)) {
  3905.                         echo "background-color: $d_bgcolor_f;";
  3906.                 }
  3907.  
  3908.                 if (isset($d_border)) {
  3909.                         echo "border-color: $d_border;";
  3910.                 }
  3911.  
  3912.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3913.                         echo '"';
  3914.                 }
  3915.  
  3916.                 echo '></b><b class="rb1e"';
  3917.  
  3918.                 if (isset($d_border)) {
  3919.                         echo " style=\"background-color: $d_border;\"";
  3920.                 }
  3921.  
  3922.                 echo '></b></b>';
  3923.         }
  3924.  
  3925.         echo "</td></tr></table>";
  3926.  
  3927.         if ($count_entry_panels > 0) {
  3928.  
  3929.                 foreach ($entry_panels as $entry_panel) {
  3930.  
  3931.                         if (!file_exists("data/panels/$entry_panel/free.txt")) {
  3932.  
  3933.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3934.                                         $entry_panel_border = file_get_contents("data/panels/$entry_panel/border.txt");
  3935.                                 }
  3936.                                 else {
  3937.                                         if (isset($entry_panel_border)) {
  3938.                                                 unset($entry_panel_border);
  3939.                                         }
  3940.                                 }
  3941.  
  3942.                                 if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3943.                                         $entry_panel_bgcolor_t = file_get_contents("data/panels/$entry_panel/bgcolor-t.txt");
  3944.                                 }
  3945.                                 else {
  3946.                                         if (isset($entry_panel_bgcolor_t)) {
  3947.                                                 unset($entry_panel_bgcolor_t);
  3948.                                         }
  3949.                                 }
  3950.  
  3951.                                 if (file_exists("data/panels/$entry_panel/bgcolor-c.txt")) {
  3952.                                         $entry_panel_bgcolor_c = file_get_contents("data/panels/$entry_panel/bgcolor-c.txt");
  3953.                                 }
  3954.                                 else {
  3955.                                         if (isset($entry_panel_bgcolor_c)) {
  3956.                                                 unset($entry_panel_bgcolor_c);
  3957.                                         }
  3958.                                 }
  3959.  
  3960.                                 if (file_exists("data/panels/$entry_panel/text-t.txt")) {
  3961.                                         $entry_panel_text_t = file_get_contents("data/panels/$entry_panel/text-t.txt");
  3962.                                 }
  3963.                                 else {
  3964.                                         if (isset($entry_panel_text_t)) {
  3965.                                                 unset($entry_panel_text_t);
  3966.                                         }
  3967.                                 }
  3968.  
  3969.                                 if (file_exists("data/panels/$entry_panel/text-c.txt")) {
  3970.                                         $entry_panel_text_c = file_get_contents("data/panels/$entry_panel/text-c.txt");
  3971.                                 }
  3972.                                 else {
  3973.                                         if (isset($entry_panel_text_c)) {
  3974.                                                 unset($entry_panel_text_c);
  3975.                                         }
  3976.                                 }
  3977.  
  3978.                                 if (file_exists("data/round.txt")) {
  3979.  
  3980.                                         echo '<b class="rbtop"><b class="rb1t"';
  3981.  
  3982.                                         if (isset($entry_panel_border)) {
  3983.                                                 echo " style=\"background-color: $entry_panel_border;\"";
  3984.                                         }
  3985.  
  3986.                                         echo '></b><b class="rb2t"';
  3987.  
  3988.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  3989.                                                 echo ' style="';
  3990.                                         }
  3991.  
  3992.                                         if (isset($entry_panel_bgcolor_t)) {
  3993.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  3994.                                         }
  3995.  
  3996.                                         if (isset($entry_panel_border)) {
  3997.                                                 echo "border-color: $entry_panel_border;";
  3998.                                         }
  3999.  
  4000.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4001.                                                 echo '"';
  4002.                                         }
  4003.  
  4004.                                         echo '></b><b class="rb3t"';
  4005.  
  4006.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4007.                                                 echo ' style="';
  4008.                                         }
  4009.  
  4010.                                         if (isset($entry_panel_bgcolor_t)) {
  4011.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4012.                                         }
  4013.  
  4014.                                         if (isset($entry_panel_border)) {
  4015.                                                 echo "border-color: $entry_panel_border;";
  4016.                                         }
  4017.  
  4018.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4019.                                                 echo '"';
  4020.                                         }
  4021.  
  4022.                                         echo '></b><b class="rb4t"';
  4023.  
  4024.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4025.                                                 echo ' style="';
  4026.                                         }
  4027.  
  4028.                                         if (isset($entry_panel_bgcolor_t)) {
  4029.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4030.                                         }
  4031.  
  4032.                                         if (isset($entry_panel_border)) {
  4033.                                                 echo "border-color: $entry_panel_border;";
  4034.                                         }
  4035.  
  4036.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4037.                                                 echo '"';
  4038.                                         }
  4039.  
  4040.                                         echo '></b></b><div class="xtitle"';
  4041.  
  4042.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4043.                                                 echo ' style="';
  4044.                                         }
  4045.  
  4046.                                         if (isset($entry_panel_bgcolor_t)) {
  4047.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4048.                                         }
  4049.  
  4050.                                         if (isset($entry_panel_text_t)) {
  4051.                                                 echo "color: $entry_panel_text_t;";
  4052.                                         }
  4053.  
  4054.                                         if (isset($entry_panel_border)) {
  4055.                                                 echo "border-color: $entry_panel_border;";
  4056.                                         }
  4057.  
  4058.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4059.                                                 echo '"';
  4060.                                         }
  4061.  
  4062.                                         echo '>';
  4063.                                 }
  4064.                                 else {
  4065.                                         echo '<div id="panel_title"';
  4066.  
  4067.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4068.                                                 echo ' style="';
  4069.                                         }
  4070.  
  4071.                                         if (isset($entry_panel_bgcolor_t)) {
  4072.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4073.                                         }
  4074.  
  4075.                                         if (isset($entry_panel_text_t)) {
  4076.                                                 echo "color: $entry_panel_text_t;";
  4077.                                         }
  4078.  
  4079.                                         if (isset($entry_panel_border)) {
  4080.                                                 echo "border-color: $entry_panel_border;";
  4081.                                         }
  4082.  
  4083.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4084.                                                 echo '"';
  4085.                                         }
  4086.  
  4087.                                         echo '>';
  4088.                                 }
  4089.  
  4090.                                 readfile("data/panels/$entry_panel/title.txt");
  4091.  
  4092.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4093.                                         echo "<a href=\"panels.php#{$entry_panel}\">";
  4094.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  4095.                                 }
  4096.  
  4097.                                 if (file_exists("data/panels/$entry_panel/private.txt")) {
  4098.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  4099.                                 }
  4100.  
  4101.                                 echo '</div>';
  4102.  
  4103.                                 echo '<div id="panel_body"';
  4104.  
  4105.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c) or isset($entry_panel_text_c)) {
  4106.                                         echo ' style="';
  4107.                                 }
  4108.  
  4109.                                 if (isset($entry_panel_bgcolor_c)) {
  4110.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4111.                                 }
  4112.  
  4113.                                 if (isset($entry_panel_text_c)) {
  4114.                                         echo "color: $entry_panel_text_c;";
  4115.                                 }
  4116.  
  4117.                                 if (isset($entry_panel_border)) {
  4118.                                         echo "border-color: $entry_panel_border;";
  4119.                                 }
  4120.  
  4121.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c) or isset($entry_panel_text_c)) {
  4122.                                         echo '"';
  4123.                                 }
  4124.  
  4125.                                 echo '>';
  4126.                         }
  4127.  
  4128.                         if (file_exists("data/panels/$entry_panel/free.txt")) {
  4129.                                 echo '<div id=panel_free>';
  4130.                         }
  4131.  
  4132.                         include("data/panels/$entry_panel/panel.php");
  4133.  
  4134.                         echo '</div>';
  4135.  
  4136.                         if (file_exists("data/round.txt") and !file_exists("data/panels/$entry_panel/free.txt")) {
  4137.  
  4138.                                 echo '<b class="rbbottom"><b class="rb4b"';
  4139.  
  4140.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4141.                                         echo ' style="';
  4142.                                 }
  4143.  
  4144.                                 if (isset($entry_panel_bgcolor_c)) {
  4145.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4146.                                 }
  4147.  
  4148.                                 if (isset($entry_panel_border)) {
  4149.                                         echo "border-color: $entry_panel_border;";
  4150.                                 }
  4151.  
  4152.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4153.                                         echo '"';
  4154.                                 }
  4155.  
  4156.                                 echo '></b><b class="rb3b"';
  4157.  
  4158.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4159.                                         echo ' style="';
  4160.                                 }
  4161.  
  4162.                                 if (isset($entry_panel_bgcolor_c)) {
  4163.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4164.                                 }
  4165.  
  4166.                                 if (isset($entry_panel_border)) {
  4167.                                         echo "border-color: $entry_panel_border;";
  4168.                                 }
  4169.  
  4170.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4171.                                         echo '"';
  4172.                                 }
  4173.  
  4174.                                 echo '></b><b class="rb2b"';
  4175.  
  4176.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4177.                                         echo ' style="';
  4178.                                 }
  4179.  
  4180.                                 if (isset($entry_panel_bgcolor_c)) {
  4181.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4182.                                 }
  4183.  
  4184.                                 if (isset($entry_panel_border)) {
  4185.                                         echo "border-color: $entry_panel_border;";
  4186.                                 }
  4187.  
  4188.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4189.                                         echo '"';
  4190.                                 }
  4191.  
  4192.                                 echo '></b><b class="rb1b"';
  4193.  
  4194.                                 if (isset($entry_panel_border)) {
  4195.                                         echo " style=\"background-color: $entry_panel_border;\"";
  4196.                                 }
  4197.  
  4198.                                 echo '></b></b>';
  4199.                         }
  4200.                 }
  4201.         }
  4202.  
  4203.         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")) {
  4204.  
  4205.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4206.  
  4207.                 if (file_exists("data/round.txt")) {
  4208.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4209.                 }
  4210.                 else {
  4211.                         echo '<div id="panel_title">';
  4212.                 }
  4213.  
  4214.                 echo 'Album';
  4215.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4216.                         echo '<a href=del.php?entry=';
  4217.                         echo $d;
  4218.                         echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
  4219.                 }
  4220.                 echo '</div><div id=panel_body>';
  4221.  
  4222.                 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))) {
  4223.                         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.";
  4224.                 }
  4225.                 else {
  4226.                         if (file_exists("images/$d/thumbnails")) {
  4227.                                 if ($dh_album = opendir("images/$d/thumbnails")) {
  4228.                                         while (($thumbnail_album = readdir($dh_album)) !== false) {
  4229.                                                 if ($thumbnail_album != "." && $thumbnail_album != "..") {
  4230.                                                         $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
  4231.                                                         $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
  4232.                                                         $parent_image = "images/$d/album/$parent_image";
  4233.                                                         if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
  4234.                                                                 unlink($current_thumbnail);
  4235.                                                         }
  4236.                                                 }
  4237.                                         }
  4238.                                 }
  4239.                         }
  4240.  
  4241.                         if (file_exists("data/items/$d/album/captions")) {
  4242.                                 if ($dh_album = opendir("data/items/$d/album/captions")) {
  4243.                                         while (($caption_album = readdir($dh_album)) !== false) {
  4244.                                                 if ($caption_album != "." && $caption_album != "..") {
  4245.                                                         $current_caption = "data/items/$d/album/captions/$caption_album";
  4246.                                                         $parent_image = str_replace(".txt","",$caption_album);
  4247.                                                         $parent_image = "images/$d/album/$parent_image";
  4248.                                                         if (file_exists($current_caption) and !file_exists($parent_image)) {
  4249.                                                                 unlink($current_caption);
  4250.                                                         }
  4251.                                                 }
  4252.                                         }
  4253.                                 }
  4254.                         }
  4255.        
  4256.                         if (file_exists("images/$d/album")) {
  4257.                                 if ($dh_album = opendir("images/$d/album")) {
  4258.                                         while (($entry_album = readdir($dh_album)) !== false) {
  4259.                                                 if ($entry_album != "." && $entry_album != "..") {
  4260.                                                         $sort_album[] = $entry_album;
  4261.                                                 }
  4262.                                         }
  4263.                                 closedir($dh_album);
  4264.                                 }
  4265.        
  4266.                                 sort($sort_album);
  4267.                                 reset($sort_album);
  4268.                                 $count_album_entry = count($sort_album);
  4269.                                
  4270.                                 if ($count_album_entry < 1) {
  4271.                                         rmdirr("images/$d/album");
  4272.                                         rmdirr("images/$d/thumbnails");                        
  4273.                                 }
  4274.                                 else {
  4275.                                         foreach($sort_album as $album_entry) {
  4276.                                                 $current_image = "images/$d/album/$album_entry";
  4277.                                                 $current_image_size = getimagesize($current_image);
  4278.                                                 $current_width = $current_image_size[0];
  4279.                                                 $current_height = $current_image_size[1];
  4280.                                                 $max_width = 98;
  4281.                                                 $max_height = 73;
  4282.  
  4283.                                                 if (($current_width > $max_width) || ($current_height > $max_height)) {  
  4284.  
  4285.                                                         if ($current_height > $current_width) {
  4286.                                                                 $sizefactor = (double) ($max_height / $current_height);
  4287.                                                         }
  4288.                                                         else {
  4289.                                                                 $sizefactor = (double) ($max_width / $current_width) ;
  4290.                                                         }
  4291.  
  4292.                                                         $new_width = (int) ($current_width * $sizefactor);
  4293.                                                         $new_height = (int) ($current_height * $sizefactor);
  4294.                                                 }
  4295.                                                 else {
  4296.                                                         $new_width = $current_width;
  4297.                                                         $new_height = $current_height;
  4298.                                                 }
  4299.        
  4300.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  4301.        
  4302.                                                         $work_thumb = imagecreatetruecolor($new_width,$new_height);
  4303.                                                         $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
  4304.  
  4305.                                                         switch($get_mimetype) {
  4306.                                                                 case "image/jpg":
  4307.                                                                 case "image/jpeg":
  4308.                                                                         $work_image = imagecreatefromjpeg($current_image);
  4309.                                                                         break;
  4310.                                                                 case "image/gif":
  4311.                                                                         $work_image = imagecreatefromgif($current_image);
  4312.                                                                         break;
  4313.                                                                 case "image/png":
  4314.                                                                         $work_image = imagecreatefrompng($current_image);
  4315.                                                                         break;
  4316.                                                         }
  4317.        
  4318.                                                         imagecopyresampled($work_thumb,$work_image,0,0,0,0,$new_width,$new_height,$current_width,$current_height);
  4319.        
  4320.                                                         if (!file_exists("images/$d/thumbnails")) {
  4321.                                                                 mkdir("images/$d/thumbnails");
  4322.                                                         }
  4323.        
  4324.                                                         imagejpeg($work_thumb,"images/$d/thumbnails/{$album_entry}-thumbnail.jpg",80);
  4325.        
  4326.                                                 }
  4327.  
  4328.                                                 echo "<a href=\"album.php?entry=$d&show=$album_entry\">";
  4329.  
  4330.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  4331.                                                         echo "<img src=\"images/$d/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  4332.                                                 }
  4333.                                                 else {
  4334.                                                         echo "<img src=\"images/$d/thumbnails/{$album_entry}-thumbnail.jpg\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  4335.                                                 }
  4336.  
  4337.                                                 if (file_exists("data/items/$d/album/captions/{$album_entry}.txt")) {
  4338.                                                         echo ' alt="';
  4339.                                                         $img_alt = file_get_contents("data/items/$d/album/captions/{$album_entry}.txt");
  4340.                                                         $img_alt = strip_tags($img_alt);
  4341.                                                         echo $img_alt;
  4342.                                                         echo '"';
  4343.                                                 }
  4344.                                                 echo "></a>";
  4345.                                         }
  4346.                                 }
  4347.                         }
  4348.                 }
  4349.                 echo '</div>';
  4350.  
  4351.                 if (file_exists("data/round.txt")) {
  4352.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4353.                 }
  4354.  
  4355.                 echo '</td></tr></table>';
  4356.  
  4357.         }
  4358.  
  4359.         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")) {
  4360.  
  4361.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4362.  
  4363.                 if (file_exists("data/round.txt")) {
  4364.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4365.                 }
  4366.                 else {
  4367.                         echo "<div id=panel_title>";
  4368.                 }
  4369.  
  4370.                 echo "Filedrop";
  4371.  
  4372.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4373.                         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>";
  4374.                 }
  4375.                 echo "</div><div id=panel_body>";
  4376.  
  4377.                 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))) {
  4378.                         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.";
  4379.                 }
  4380.                 else {
  4381.  
  4382.                         if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  4383.                                 while (($dl_file = readdir($dh_filedrop)) !== false) {
  4384.                                         if ($dl_file != "." && $dl_file != "..") {
  4385.                                                 $filedrop_files[] = $dl_file;
  4386.                                         }
  4387.                                 }
  4388.                         closedir($dh_filedrop);
  4389.                         }
  4390.  
  4391.                         reset($filedrop_files);
  4392.                         sort($filedrop_files);
  4393.  
  4394.                         foreach ($filedrop_files as $filedrop_file) {
  4395.  
  4396.                                 echo "<table border=0 cellspacing=0 cellpadding=4><tr><td>";
  4397.                                 echo "<a href=\"index.php?entry=$d&download=$filedrop_file&type=filedrop\">";
  4398.                                 echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
  4399.                                 echo "<td><b>$filedrop_file</b>";
  4400.  
  4401.                                 if (file_exists("data/items/$d/filedrop/sha1.txt")) {
  4402.                                         $sha1 = sha1_file("data/items/$d/filedrop/files/$filedrop_file");
  4403.                                         echo "<br>$sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
  4404.                                 }
  4405.                                 if (file_exists("data/items/$d/filedrop/md5.txt")) {
  4406.                                         $md5 = md5_file("data/items/$d/filedrop/files/$filedrop_file");
  4407.                                         echo "<br>$md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
  4408.                                 }
  4409.  
  4410.                                 $size = filesize("data/items/$d/filedrop/files/$filedrop_file");
  4411.                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  4412.  
  4413.                                 echo "<br>$size_string";
  4414.  
  4415.                                 $filedrop_count_file = "data/items/$d/filedrop/count/$filedrop_file" . '.txt';
  4416.  
  4417.                                 if (file_exists($filedrop_count_file)) {
  4418.                                         $fp_filedrop_count = fopen($filedrop_count_file,"r");
  4419.                                         $filedrop_count = fread($fp_filedrop_count,filesize($filedrop_count_file));
  4420.                                         fclose($fp_filedrop_count);
  4421.                                         echo "<br>$filedrop_count";
  4422.                                
  4423.                                         if ($filedrop_count == 1) {
  4424.                                                 echo " download";
  4425.                                         }
  4426.                                         if ($filedrop_count > 1) {
  4427.                                                 echo " downloads";
  4428.                                         }
  4429.                                 }
  4430.                                 echo "</td></tr></table>";
  4431.                         }
  4432.                 }
  4433.                 echo "</div>";
  4434.  
  4435.                 if (file_exists("data/round.txt")) {
  4436.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4437.                 }
  4438.  
  4439.                 echo '</td></tr></table>';
  4440.         }
  4441.  
  4442.         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")) {
  4443.  
  4444.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4445.  
  4446.                 if (file_exists("data/round.txt")) {
  4447.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4448.                 }
  4449.                 else {
  4450.                         echo '<div id="panel_title">';
  4451.                 }
  4452.  
  4453.                 echo 'PDF';
  4454.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4455.                         echo '<a href=del.php?entry=';
  4456.                         echo $d;
  4457.                         echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
  4458.                 }
  4459.                 echo '</div><div id=panel_body>';
  4460.  
  4461.                 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))) {
  4462.                         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.";
  4463.                 }
  4464.                 else {
  4465.  
  4466.                         if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
  4467.                                 while (($dl_file = readdir($dh_pdf)) !== false) {
  4468.                                         if ($dl_file != "." && $dl_file != "..") {
  4469.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  4470.                                                 echo "<a href=\"index.php?entry=$d&download=$dl_file&type=pdf\">";
  4471.                                                 echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
  4472.                                                 echo '<td><b>';
  4473.                                                 echo $dl_file;
  4474.                                                 echo'</b><br>';
  4475.                                                 $size = filesize("data/items/$d/pdf/file/$dl_file");
  4476.                                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  4477.                                                 echo $size_string;
  4478.                                                 $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
  4479.                                                 if (file_exists($pdf_count_file)) {
  4480.                                                         $fp_pdf_count = fopen($pdf_count_file,"r");
  4481.                                                         $pdf_count = fread($fp_pdf_count,filesize($pdf_count_file));
  4482.                                                         fclose($fp_pdf_count);
  4483.                                                         echo '<br>';
  4484.                                                         echo $pdf_count;
  4485.                                                         if ($pdf_count == 1) {
  4486.                                                                 echo ' download';
  4487.                                                         }
  4488.                                                         if ($pdf_count > 1) {
  4489.                                                                 echo ' downloads';
  4490.                                                         }
  4491.                                                 }
  4492.                                                 echo '</td></tr></table>';
  4493.                                         }
  4494.                                 }
  4495.                         closedir($dh_pdf);
  4496.                         }
  4497.                 }
  4498.                 echo '</div>';
  4499.  
  4500.                 if (file_exists("data/round.txt")) {
  4501.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4502.                 }
  4503.  
  4504.                 echo '</td></tr></table>';
  4505.         }
  4506.  
  4507.         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'])))) {
  4508.  
  4509.                 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))) {
  4510.                 }
  4511.                 else {
  4512.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4513.  
  4514.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  4515.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  4516.                                         if ($live_comment != "." && $live_comment != "..") {
  4517.                                                 $show_comments[] = $live_comment;
  4518.                                         }
  4519.                                 }
  4520.                         closedir($dh_comments);
  4521.                         }
  4522.        
  4523.                         asort($show_comments);
  4524.                         reset($show_comments);
  4525.                         foreach ($show_comments as $comment) {
  4526.  
  4527.                                 if (file_exists("data/round.txt")) {
  4528.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4529.                                 }
  4530.                                 else {
  4531.                                         echo '<div id="panel_title">';
  4532.                                 }
  4533.        
  4534.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  4535.                                         echo '<a target=_maj href=';
  4536.                                         readfile("data/items/$d/comments/live/$comment/url.txt");
  4537.                                         echo '>';
  4538.                                 }
  4539.        
  4540.                                 readfile("data/items/$d/comments/live/$comment/firstname.txt");
  4541.                                 echo ' ';
  4542.                                 readfile("data/items/$d/comments/live/$comment/lastname.txt");
  4543.        
  4544.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  4545.                                         echo '</a>';
  4546.                                 }
  4547.        
  4548.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4549.                                         echo '  &lt;';
  4550.                                         readfile("data/items/$d/comments/live/$comment/email.txt");
  4551.                                         echo '&gt;';
  4552.                                 }
  4553.        
  4554.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4555.                                         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>';
  4556.                                         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>';
  4557.                                         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>';
  4558.                                 }
  4559.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  4560.                                
  4561.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/live/$comment/author.txt")) {
  4562.                                         echo "<td width=85 valign=top>";
  4563.                                         $c_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  4564.                                         echo "<a href=member.php?id=$c_author>";
  4565.                                         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"))) {
  4566.                                                 if (file_exists("images/avatar.gif")) {
  4567.                                                         $c_avatar_gif_image_size = getimagesize("images/avatar.gif");
  4568.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  4569.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  4570.                        
  4571.                                                         $c_max_avatar_gif_image_width = 80;
  4572.                                                
  4573.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  4574.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  4575.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  4576.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  4577.                                                         }
  4578.                        
  4579.                                                         echo "<img src=images/avatar.gif border=0 width=";
  4580.                                                         echo $c_avatar_gif_image_width;
  4581.                                                         echo " height=";
  4582.                                                         echo $c_avatar_gif_image_height;
  4583.                                                 }
  4584.                                                 if (file_exists("images/avatar.jpg")) {
  4585.                                                         $c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  4586.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  4587.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  4588.                                                
  4589.                                                         $c_max_avatar_jpg_image_width = 80;
  4590.                                                
  4591.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  4592.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  4593.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  4594.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  4595.                                                         }
  4596.                        
  4597.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  4598.                                                         echo $c_avatar_jpg_image_width;
  4599.                                                         echo " height=";
  4600.                                                         echo $c_avatar_jpg_image_height;
  4601.                                                 }
  4602.                                                 if (file_exists("images/avatar.png")) {
  4603.                                                         $c_avatar_png_image_size = getimagesize("images/avatar.png");
  4604.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  4605.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  4606.                                                
  4607.                                                         $c_max_avatar_png_image_width = 80;
  4608.                                                
  4609.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  4610.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  4611.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  4612.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  4613.                                                         }
  4614.                                                
  4615.                                                         echo "<img src=images/avatar.png border=0 width=";
  4616.                                                         echo $c_avatar_png_image_width;
  4617.                                                         echo " height=";
  4618.                                                         echo $c_avatar_png_image_height;
  4619.                                                 }
  4620.                                         echo "><br>";
  4621.                                         }
  4622.                                         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")) {
  4623.                                                 if (file_exists("images/members/$c_author/avatar.gif")) {
  4624.                                                         $c_avatar_gif_image_size = getimagesize("images/members/$c_author/avatar.gif");
  4625.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  4626.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  4627.                        
  4628.                                                         $c_max_avatar_gif_image_width = 80;
  4629.                                                
  4630.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  4631.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  4632.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  4633.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  4634.                                                         }
  4635.                        
  4636.                                                         echo "<img src=images/members/$c_author/avatar.gif border=0 width=";
  4637.                                                         echo $c_avatar_gif_image_width;
  4638.                                                         echo " height=";
  4639.                                                         echo $c_avatar_gif_image_height;
  4640.                                                 }
  4641.                                                 if (file_exists("images/members/$c_author/avatar.jpg")) {
  4642.                                                         $c_avatar_jpg_image_size = getimagesize("images/members/$c_author/avatar.jpg");
  4643.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  4644.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  4645.                                                
  4646.                                                         $c_max_avatar_jpg_image_width = 80;
  4647.                                                
  4648.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  4649.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  4650.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  4651.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  4652.                                                         }
  4653.                        
  4654.                                                         echo "<img src=images/members/$c_author/avatar.jpg border=0 width=";
  4655.                                                         echo $c_avatar_jpg_image_width;
  4656.                                                         echo " height=";
  4657.                                                         echo $c_avatar_jpg_image_height;
  4658.                                                 }
  4659.                                                 if (file_exists("images/members/$c_author/avatar.png")) {
  4660.                                                         $c_avatar_png_image_size = getimagesize("images/members/$c_author/avatar.png");
  4661.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  4662.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  4663.                                                
  4664.                                                         $c_max_avatar_png_image_width = 80;
  4665.                                                
  4666.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  4667.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  4668.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  4669.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  4670.                                                         }
  4671.                                                
  4672.                                                         echo "<img src=images/members/$c_author/avatar.png border=0 width=";
  4673.                                                         echo $c_avatar_png_image_width;
  4674.                                                         echo " height=";
  4675.                                                         echo $c_avatar_png_image_height;
  4676.                                                 }
  4677.                                         echo "><br>";
  4678.                                         }
  4679.                                         echo "$c_author</a><br>";
  4680.                                         if ((file_get_contents("data/username.txt") == $c_author) and file_exists("data/rank.txt")) {
  4681.                                                 echo "administrator<br>";
  4682.                                         }
  4683.                                         elseif (file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  4684.                                                 $c_rank = file_get_contents("data/members/active/$c_author/rank.txt");
  4685.                                                 echo "$c_rank<br>";
  4686.                                         }
  4687.                                         elseif (!file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  4688.                                                 echo "member<br>";
  4689.                                         }
  4690.                        
  4691.                                         if ($c_dh_posts = opendir("data/items")) {
  4692.                                                 while (($c_entry_posts = readdir($c_dh_posts)) !== false) {
  4693.                        
  4694.                                                         if (file_exists("data/items/$c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4695.                                                                 continue;
  4696.                                                         }
  4697.                        
  4698.                                                         if (file_exists("data/items/$c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  4699.                                                                 continue;
  4700.                                                         }
  4701.  
  4702.                                                         $private_categories = "0";
  4703.                                
  4704.                                                         if (file_exists("data/items/$entry_c_entry_posts/categories")) {
  4705.                                                        
  4706.                                                                 if ($dh_cat2_c_entry_posts = opendir("data/items/$entry_c_entry_posts/categories")) {
  4707.                                                        
  4708.                                                                         while (($entry_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
  4709.                                                        
  4710.                                                                                 if ($entry_cat2_c_entry_posts != "." && $entry_cat2_c_entry_posts != "..") {
  4711.                                                        
  4712.                                                                                         if (file_exists("data/categories/$entry_cat2_c_entry_posts/private.txt")) {
  4713.                                                                                                 $private_categories = $private_categories + 1;
  4714.                                                                                         }
  4715.                                                                                 }
  4716.                                                                         }
  4717.                                                                         closedir($dh_cat2_c_entry_posts);
  4718.                                                                 }
  4719.                                                         }
  4720.  
  4721.                                                         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")) {
  4722.                                                                 continue;
  4723.                                                         }
  4724.                        
  4725.                                                         if ($c_entry_posts != "." && $c_entry_posts != "..") {
  4726.                                                                 if (file_exists("data/members/active/$c_author") and file_exists("data/bb.txt")) {
  4727.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  4728.                                                                                 $c_items_posts[] = $c_entry_posts;
  4729.                                                                         }
  4730.                                                                 }
  4731.                                                                 elseif (!file_exists("data/members/active/$c_author") and (file_get_contents("data/username.txt") == $c_author) and file_exists("data/bb.txt")) {
  4732.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  4733.                                                                                 $c_items_posts[] = $c_entry_posts;
  4734.                                                                         }
  4735.                                                                 }
  4736.                                                         }
  4737.                                                 }
  4738.                                         closedir($c_dh_posts);
  4739.                                         }
  4740.                                         $c_posts = count($c_items_posts);
  4741.                                         if ($c_posts == 1) {
  4742.                                                 echo "$c_posts post";
  4743.                                         }
  4744.                                         if ($c_posts > 1) {
  4745.                                                 echo "$c_posts posts";
  4746.                                         }
  4747.                                         unset($c_items_posts);
  4748.                        
  4749.                                         echo "</td><td width=513 valign=top>";
  4750.                                 }
  4751.                                 else {
  4752.                                         echo "<td width=598 valign=top>";
  4753.                                 }
  4754.  
  4755.                                 echo '<font style="font-size: 10px; color: #999999;">';
  4756.  
  4757.                                 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"))))) {
  4758.                                         $cxavatar_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  4759.                                         echo "<a href=member.php?id=$cxavatar_author>$cxavatar_author</a> - ";
  4760.                                 }
  4761.  
  4762.                                 entry2date($comment);
  4763.  
  4764.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4765.  
  4766.                                         if (file_exists("data/items/$d/comments/live/$comment/revisions.txt")) {
  4767.                                                 echo '  (Revision ';
  4768.                                                 readfile("data/items/$d/comments/live/$comment/revisions.txt");
  4769.                                                 echo ')';
  4770.                                         }
  4771.                                 }
  4772.  
  4773.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  4774.  
  4775.                                 $entry_comment = file_get_contents("data/items/$d/comments/live/$comment/comment.txt");
  4776.  
  4777.                                 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"))))) {
  4778.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  4779.                                         if (file_exists("data/pf-censor.txt")) {
  4780.                                                 $censor = file_get_contents("data/pf-censor.txt");
  4781.                                         }
  4782.                                         else {
  4783.                                                 $censor = "[expletive]";
  4784.                                         }
  4785.                                         $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
  4786.                                 }
  4787.                                 echo $entry_comment;
  4788.                                 echo '</tr></table></div>';
  4789.  
  4790.                                 if (file_exists("data/round.txt")) {
  4791.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4792.                                 }
  4793.                         }
  4794.                         unset($show_comments);
  4795.                         echo '</td></tr></table>';
  4796.  
  4797.                         if (isset($_SESSION['logged_in'])) {
  4798.  
  4799.                                 if (($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and file_exists("data/comments/unread/$d")) {
  4800.                                         rmdirr("data/comments/unread/$d");
  4801.  
  4802.                                         if (count(glob("data/comments/unread/*")) < 1) {
  4803.                                                 rmdirr("data/comments/unread");
  4804.                                         }
  4805.                                 }
  4806.                                 else {
  4807.                                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread/$d")) {
  4808.                                                 rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread/$d");
  4809.  
  4810.                                                 if (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) < 1) {
  4811.                                                         rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread");
  4812.                                                 }
  4813.                                         }
  4814.                                 }
  4815.                         }
  4816.                 }
  4817.  
  4818.                 if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  4819.  
  4820.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4821.  
  4822.                         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']}")))) {
  4823.        
  4824.                                 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']))) {
  4825.                                         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>";
  4826.                                 }
  4827.                         }
  4828.  
  4829.                         echo '<font style="font-size: 12px;"><b>Add Comment</b></font>';
  4830.  
  4831.                         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))) {
  4832.                                 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>";
  4833.                         }
  4834.                         else {
  4835.                                 $captcha_rand = str_rand(7);
  4836.                
  4837.                                 echo "<p>Fill out the form below";
  4838.  
  4839.                                 if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  4840.                                         echo " and enter <b>$captcha_rand</b> in the anti-spam field";
  4841.                                 }
  4842.  
  4843.                                 echo " to add your comment.";
  4844.  
  4845.                                 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")))) {
  4846.                                         echo " Note that it will not be posted immediately, but will be ";
  4847.                        
  4848.                                         if (file_exists("data/email.txt")) {
  4849.                                                 echo "e-mailed";
  4850.                                         }
  4851.                                         else {
  4852.                                                 echo "sent";
  4853.                                         }
  4854.        
  4855.                                         echo " to me first.";
  4856.  
  4857.                                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
  4858.                                                 echo " Comments with bogus contact information will be discarded.";
  4859.                                         }
  4860.                                 }
  4861.                                 echo "</p>";
  4862.  
  4863.                                 ?>
  4864.                        
  4865.                                 <table border=0 cellspacing=2 cellpadding=0 width=500>
  4866.                                 <form enctype="multipart/form-data" action="index.php?entry=<?php echo $d; ?>&show=comments" method="post">
  4867.                                 <input type=hidden name=captcha_get value="<?php echo $captcha_rand; ?>">
  4868.                                 <tr>
  4869.  
  4870.                                 <?php
  4871.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4872.                                         ?>
  4873.                                         <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>
  4874.                                         <?php
  4875.                                 }
  4876.                                 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")) {
  4877.                                         ?>
  4878.                                         <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>
  4879.                                         <?php
  4880.                                 }
  4881.                                 else {
  4882.                                         ?>
  4883.                                         <td width=75>First Name*</td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
  4884.                                         <?php
  4885.                                 }
  4886.                                 ?>
  4887.                                 <td rowspan=7 valign=top width=75 align=right>
  4888.                                 <table border=0 cellspacing=1 cellpadding=2>
  4889.                                 <tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
  4890.                                 <tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
  4891.                                 <tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
  4892.                                 <tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
  4893.                                 <tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
  4894.                                 <tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
  4895.                                 <tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
  4896.                                 <tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
  4897.                                 <tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
  4898.                                 <tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
  4899.                                 </td></tr>
  4900.                                 </table>
  4901.  
  4902.                                 <?php
  4903.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4904.                                         ?>
  4905.                                         <td width=75></td><td><input type=hidden name=lastname value="<?php echo trim(str_replace(",","",$logged_in_author[1])); ?>"></td>
  4906.                                         <?php
  4907.                                 }
  4908.                                 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")) {
  4909.                                         ?>
  4910.                                         <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>
  4911.                                         <?php
  4912.                                 }
  4913.                                 else {
  4914.                                         ?>
  4915.                                         <tr><td>Last Name*</td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
  4916.                                         <?php
  4917.                                 }
  4918.  
  4919.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4920.  
  4921.                                         if (file_exists("data/email.txt")) {
  4922.                                                 ?>
  4923.                                                 <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
  4924.                                                 <?php
  4925.                                         }
  4926.                                         else {
  4927.                                                 echo "<tr><td>E-mail*</td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
  4928.                                         }
  4929.                                 }
  4930.                                 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")) {
  4931.                                         ?>
  4932.                                         <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>
  4933.                                         <?php
  4934.                                 }
  4935.                                 else {
  4936.                                         ?>
  4937.                                         <tr><td>E-mail*</td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
  4938.                                         <?php
  4939.                                 }
  4940.  
  4941.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4942.                                         ?>
  4943.                                         <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
  4944.                                         <?php
  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=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>
  4949.                                         <?php
  4950.                                 }
  4951.                                 else {
  4952.                                         ?>
  4953.                                         <tr><td>Website</td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
  4954.                                         <?php
  4955.                                 }
  4956.                                 ?>
  4957.                                 <tr><td>Comment*</td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
  4958.                                 <?php
  4959.  
  4960.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4961.                                         echo "<input type=hidden name=captcha_put value=\"$captcha_rand\">";
  4962.                                 }
  4963.                                 else {
  4964.                                         echo "<tr><td>Anti-Spam*</td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
  4965.                                 }
  4966.  
  4967.                                 ?>
  4968.                                 <tr><td></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
  4969.                                 </form>
  4970.                                 </table>
  4971.                                 <?php
  4972.                         }
  4973.                         ?>
  4974.                         </td></tr></table>
  4975.                         <?php
  4976.                 }
  4977.         }
  4978.  
  4979.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($req_entry) and !empty($req_entry)) {
  4980.        
  4981.                 if ($dh_pending_comments = opendir("data/items/$d/comments/pending")) {
  4982.        
  4983.                         while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
  4984.        
  4985.                                 if ($entry_pending_comments != "." && $entry_pending_comments != "..") {
  4986.                                         $show_pending_comments[] = $entry_pending_comments;
  4987.                                 }
  4988.                         }
  4989.                         closedir($dh_pending_comments);
  4990.                 }
  4991.        
  4992.                 asort($show_pending_comments);
  4993.                 reset($show_pending_comments);
  4994.        
  4995.                 $count_pending_comments = count($show_pending_comments);
  4996.  
  4997.                 if ($count_pending_comments > 0) {
  4998.        
  4999.                         if ($count_pending_comments == 1) {
  5000.                                 echo '<p><b>Pending Comment</b></p>';
  5001.                         }
  5002.                         else {
  5003.                                 echo '<p><b>Pending Comments</b></p>';
  5004.                         }
  5005.  
  5006.                         foreach ($show_pending_comments as $pending_comment) {
  5007.        
  5008.                                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  5009.        
  5010.                                 if (file_exists("data/round.txt")) {
  5011.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5012.                                 }
  5013.                                 else {
  5014.                                         echo '<div id="panel_title">';
  5015.                                 }
  5016.        
  5017.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  5018.                                         echo '<a target=_maj href=';
  5019.                                         readfile("data/items/$d/comments/pending/$pending_comment/url.txt");
  5020.                                         echo '>';
  5021.                                 }
  5022.                
  5023.                                 readfile("data/items/$d/comments/pending/$pending_comment/firstname.txt");
  5024.                                 echo ' ';
  5025.                                 readfile("data/items/$d/comments/pending/$pending_comment/lastname.txt");
  5026.                
  5027.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  5028.                                         echo '</a>';
  5029.                                 }
  5030.                
  5031.                                 echo ' &lt;';
  5032.                                 readfile("data/items/$d/comments/pending/$pending_comment/email.txt");
  5033.                                 echo '&gt;';
  5034.        
  5035.                                 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>';
  5036.        
  5037.                                 $pending_comment_key_file = "data/items/$d/comments/pending/$pending_comment/key.txt";
  5038.                                 $open_pending_comment_key_file = fopen($pending_comment_key_file,"r");
  5039.                                 $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
  5040.                                 fclose($open_pending_comment_key_file);
  5041.        
  5042.                                 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>";
  5043.        
  5044.                                 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>";
  5045.        
  5046.                                 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>';
  5047.        
  5048.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  5049.        
  5050.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/pending/$pending_comment/author.txt")) {
  5051.        
  5052.                                         echo "<td width=85 valign=top>";
  5053.        
  5054.                                         $pc_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  5055.        
  5056.                                         echo "<a href=member.php?id=$pc_author>";
  5057.        
  5058.                                         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"))) {
  5059.        
  5060.                                                 if (file_exists("images/avatar.gif")) {
  5061.                                                         $pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
  5062.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  5063.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  5064.                        
  5065.                                                         $pc_max_avatar_gif_image_width = 80;
  5066.                                                
  5067.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  5068.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  5069.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  5070.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  5071.                                                         }
  5072.                        
  5073.                                                         echo "<img src=images/avatar.gif border=0 width=";
  5074.                                                         echo $pc_avatar_gif_image_width;
  5075.                                                         echo " height=";
  5076.                                                         echo $pc_avatar_gif_image_height;
  5077.                                                 }
  5078.        
  5079.                                                 if (file_exists("images/avatar.jpg")) {
  5080.                                                         $pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  5081.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  5082.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  5083.                                                
  5084.                                                         $pc_max_avatar_jpg_image_width = 80;
  5085.                                                
  5086.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  5087.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  5088.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  5089.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  5090.                                                         }
  5091.                        
  5092.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  5093.                                                         echo $pc_avatar_jpg_image_width;
  5094.                                                         echo " height=";
  5095.                                                         echo $pc_avatar_jpg_image_height;
  5096.                                                 }
  5097.        
  5098.                                                 if (file_exists("images/avatar.png")) {
  5099.                                                         $pc_avatar_png_image_size = getimagesize("images/avatar.png");
  5100.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  5101.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  5102.                                        
  5103.                                                         $pc_max_avatar_png_image_width = 80;
  5104.                                                
  5105.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  5106.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  5107.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  5108.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  5109.                                                         }
  5110.                                                
  5111.                                                         echo "<img src=images/avatar.png border=0 width=";
  5112.                                                         echo $pc_avatar_png_image_width;
  5113.                                                         echo " height=";
  5114.                                                         echo $pc_avatar_png_image_height;
  5115.                                                 }
  5116.                                                 echo "><br>";
  5117.                                         }
  5118.                                         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")) {
  5119.        
  5120.                                                 if (file_exists("images/members/$pc_author/avatar.gif")) {
  5121.                                                         $pc_avatar_gif_image_size = getimagesize("images/members/$pc_author/avatar.gif");
  5122.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  5123.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  5124.                        
  5125.                                                         $pc_max_avatar_gif_image_width = 80;
  5126.                                                
  5127.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  5128.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  5129.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  5130.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  5131.                                                         }
  5132.                        
  5133.                                                         echo "<img src=images/members/$pc_author/avatar.gif border=0 width=";
  5134.                                                         echo $pc_avatar_gif_image_width;
  5135.                                                         echo " height=";
  5136.                                                         echo $pc_avatar_gif_image_height;
  5137.                                                 }
  5138.                
  5139.                                                 if (file_exists("images/members/$pc_author/avatar.jpg")) {
  5140.                                                         $pc_avatar_jpg_image_size = getimagesize("images/members/$pc_author/avatar.jpg");
  5141.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  5142.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  5143.                                                
  5144.                                                         $pc_max_avatar_jpg_image_width = 80;
  5145.                                                
  5146.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  5147.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  5148.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  5149.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  5150.                                                         }
  5151.                        
  5152.                                                         echo "<img src=images/members/$pc_author/avatar.jpg border=0 width=";
  5153.                                                         echo $pc_avatar_jpg_image_width;
  5154.                                                         echo " height=";
  5155.                                                         echo $pc_avatar_jpg_image_height;
  5156.                                                 }
  5157.                
  5158.                                                 if (file_exists("images/members/$pc_author/avatar.png")) {
  5159.                                                         $pc_avatar_png_image_size = getimagesize("images/members/$pc_author/avatar.png");
  5160.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  5161.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  5162.                                                
  5163.                                                         $pc_max_avatar_png_image_width = 80;
  5164.                                                
  5165.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  5166.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  5167.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  5168.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  5169.                                                         }
  5170.                                                
  5171.                                                         echo "<img src=images/members/$pc_author/avatar.png border=0 width=";
  5172.                                                         echo $pc_avatar_png_image_width;
  5173.                                                         echo " height=";
  5174.                                                         echo $pc_avatar_png_image_height;
  5175.                                                 }
  5176.                                                 echo "><br>";
  5177.                                         }
  5178.                                         echo "$pc_author</a><br>";
  5179.  
  5180.                                         if ((file_get_contents("data/username.txt") == $pc_author) and file_exists("data/rank.txt")) {
  5181.                                                 echo "administrator<br>";
  5182.                                         }
  5183.                                         elseif (file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  5184.                                                 $pc_rank = file_get_contents("data/members/active/$pc_author/rank.txt");
  5185.                                                 echo "$pc_rank<br>";
  5186.                                         }
  5187.                                         elseif (!file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  5188.                                                 echo "member<br>";
  5189.                                         }
  5190.                
  5191.                                         if ($pc_dh_posts = opendir("data/items")) {
  5192.        
  5193.                                                 while (($pc_entry_posts = readdir($pc_dh_posts)) !== false) {
  5194.                        
  5195.                                                         if (file_exists("data/items/$pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5196.                                                                 continue;
  5197.                                                         }
  5198.                        
  5199.                                                         if (file_exists("data/items/$pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  5200.                                                                 continue;
  5201.                                                         }
  5202.        
  5203.                                                         $private_categories = "0";
  5204.        
  5205.                                                         if (file_exists("data/items/$entry_pc_entry_posts/categories")) {
  5206.                                
  5207.                                                                 if ($dh_cat2_pc_entry_posts = opendir("data/items/$entry_pc_entry_posts/categories")) {
  5208.                                
  5209.                                                                         while (($entry_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
  5210.                                
  5211.                                                                                 if ($entry_cat2_pc_entry_posts != "." && $entry_cat2_pc_entry_posts != "..") {
  5212.                                
  5213.                                                                                         if (file_exists("data/categories/$entry_cat2_pc_entry_posts/private.txt")) {
  5214.                                                                                                 $private_categories = $private_categories + 1;
  5215.                                                                                         }
  5216.                                                                                 }
  5217.                                                                         }
  5218.                                                                         closedir($dh_cat2_pc_entry_posts);
  5219.                                                                 }
  5220.                                                         }
  5221.        
  5222.                                                         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")) {
  5223.                                                                 continue;
  5224.                                                         }
  5225.                        
  5226.                                                         if ($pc_entry_posts != "." && $pc_entry_posts != "..") {
  5227.                                                                 if (file_exists("data/members/active/$pc_author") and file_exists("data/bb.txt")) {
  5228.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  5229.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  5230.                                                                         }
  5231.                                                                 }
  5232.                                                                 elseif (!file_exists("data/members/active/$pc_author") and (file_get_contents("data/username.txt") == $pc_author) and file_exists("data/bb.txt")) {
  5233.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  5234.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  5235.                                                                         }
  5236.                                                                 }
  5237.                                                         }
  5238.                                                 }
  5239.                                                 closedir($pc_dh_posts);
  5240.                                         }
  5241.                                         $pc_posts = count($pc_items_posts);
  5242.                                         if ($pc_posts == 1) {
  5243.                                                 echo "$pc_posts post";
  5244.                                         }
  5245.                                         if ($pc_posts > 1) {
  5246.                                                 echo "$pc_posts posts";
  5247.                                         }
  5248.                                         unset($pc_items_posts);
  5249.                        
  5250.                                         echo "</td><td width=513 valign=top>";
  5251.                                 }
  5252.                                 else {
  5253.                                         echo "<td width=598 valign=top>";
  5254.                                 }
  5255.        
  5256.                                 echo '<font style="font-size: 10px; color: #999999;">';
  5257.        
  5258.                                 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"))))) {
  5259.                                         $pxavatar_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  5260.                                         echo "<a href=member.php?id=$pxavatar_author>$pxavatar_author</a> - ";
  5261.                                 }
  5262.                                 readfile("data/items/$d/comments/pending/$pending_comment/timestamp.txt");
  5263.        
  5264.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/revisions.txt")) {
  5265.                                         echo '  (Revision ';
  5266.                                         readfile("data/items/$d/comments/pending/$pending_comment/revisions.txt");
  5267.                                         echo ')';
  5268.                                 }
  5269.        
  5270.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  5271.                                 readfile("data/items/$d/comments/pending/$pending_comment/comment.txt");
  5272.                                 echo '</tr></table></div>';
  5273.        
  5274.                                 if (file_exists("data/round.txt")) {
  5275.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5276.                                 }
  5277.        
  5278.                                 unset($show_pending_comments);
  5279.                                 echo '</td></tr></table>';
  5280.                         }
  5281.                 }
  5282.         }
  5283. }
  5284.  
  5285. ?>
  5286.  
  5287. <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
  5288.  
  5289. <?php
  5290.  
  5291. if (($start >= $increase) and ($start != 0)) {
  5292.  
  5293.         echo "<td align=left><a href=\"index.php?";
  5294.  
  5295.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  5296.                 echo "category=$req_category";
  5297.         }
  5298.  
  5299.         if (isset($req_archive) and !empty($req_archive)) {
  5300.                 echo "archive=$req_archive";
  5301.         }
  5302.  
  5303.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  5304.                 echo "author=$req_author";
  5305.         }
  5306.  
  5307.         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")) {
  5308.                 echo "author=$req_author";
  5309.         }
  5310.  
  5311.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  5312.                 echo "find=private";
  5313.         }
  5314.  
  5315.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  5316.                 echo "find=member";
  5317.         }
  5318.  
  5319.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  5320.                 echo "find=unfiled";
  5321.         }
  5322.  
  5323.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  5324.                 echo "find=passwd";
  5325.         }
  5326.  
  5327.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  5328.                 echo "find=comments";
  5329.         }
  5330.  
  5331.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  5332.                 echo "find=album";
  5333.         }
  5334.  
  5335.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  5336.                 echo "find=filedrop";
  5337.         }
  5338.  
  5339.         echo "&start=" . ($start-$increase) . "\">previous</a></td>";
  5340. }
  5341.  
  5342. if ($end < sizeof($items)) {
  5343.  
  5344.         echo "<td align=right><a href=\"index.php?";
  5345.  
  5346.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  5347.                 echo "category=$req_category";
  5348.         }
  5349.         if (isset($req_archive) and !empty($req_archive)) {
  5350.                 echo "archive=$req_archive";
  5351.         }
  5352.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  5353.                 echo "author=$req_author";
  5354.         }
  5355.         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")) {
  5356.                 echo "author=$req_author";
  5357.         }
  5358.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  5359.                 echo "find=private";
  5360.         }
  5361.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  5362.                 echo "find=member";
  5363.         }
  5364.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  5365.                 echo "find=unfiled";
  5366.         }
  5367.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  5368.                 echo "find=passwd";
  5369.         }
  5370.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  5371.                 echo "find=comments";
  5372.         }
  5373.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  5374.                 echo "find=album";
  5375.         }
  5376.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  5377.                 echo "find=filedrop";
  5378.         }
  5379.         echo "&start=" . ($start+$increase) . "\">next</a></td>";
  5380. }
  5381.  
  5382. // right side
  5383.  
  5384. echo "</tr></table></td><td width=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wside\" valign=\"top\">";
  5385.  
  5386. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5387.         if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
  5388.                 while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
  5389.                         if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != "..") {
  5390.                                 $show_pending_comment_flags[] = $entry_pending_comment_flags;
  5391.                         }
  5392.                 }
  5393.                 closedir($dh_pending_comment_flags);
  5394.         }
  5395.  
  5396.         rsort($show_pending_comment_flags);
  5397.         reset($show_pending_comment_flags);
  5398.         $count_pending_comment_flags = count($show_pending_comment_flags);
  5399.  
  5400.         if (($count_latest > 0) and ($count_pending_comment_flags > 0)) {
  5401.  
  5402.                 if (file_exists("data/round.txt")) {
  5403.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5404.                 }
  5405.                 else {
  5406.                         echo '<div id="panel_title">';
  5407.                 }
  5408.  
  5409.                 echo 'Pending Comments</div>';
  5410.                 echo '<div id="panel_body">';
  5411.  
  5412.                 if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
  5413.  
  5414.                         while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
  5415.  
  5416.                                 if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != "..") {
  5417.  
  5418.                                         echo "<a href=\"index.php?entry=$entry_list_pending_comment_flags&show=comments\">";
  5419.                                         readfile("data/items/$entry_list_pending_comment_flags/title.txt");
  5420.                                         echo '</a><br><font style="font-size: 10px; color: #999999;">';
  5421.                                         $fp_comment_count_txt = fopen("data/comments/pending/$entry_list_pending_comment_flags/count.txt","r");
  5422.                                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$entry_list_pending_comment_flags/count.txt"));
  5423.                                         fclose($fp_comment_count_txt);
  5424.  
  5425.                                         if ($comment_count_value == 1) {
  5426.                                                 echo ' ( ' . $comment_count_value . ' comment ) ';
  5427.                                         }
  5428.                                         elseif ($comment_count_value > 1) {
  5429.                                                 echo ' ( ' . $comment_count_value . ' comments ) ';
  5430.                                         }
  5431.                                         else {
  5432.                                                 echo '';
  5433.                                         }
  5434.                                         echo '</font><br>';
  5435.                                 }
  5436.                         }
  5437.                         closedir($dh_list_pending_comment_flags);
  5438.                 }
  5439.                 echo '</div>';
  5440.  
  5441.                 if (file_exists("data/round.txt")) {
  5442.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5443.                 }
  5444.         }
  5445. }
  5446.  
  5447. 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")) {
  5448.         if ($dh_pending_list = opendir("data/members/confirmed")) {
  5449.                 while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
  5450.  
  5451.                         if ($entry_pending_list != "." && $entry_pending_list != "..") {
  5452.                                 $show_pending_list[] = $entry_pending_list;
  5453.                         }
  5454.                 }
  5455.                 closedir($dh_pending_list);
  5456.         }
  5457.  
  5458.         sort($show_pending_list);
  5459.         reset($show_pending_list);
  5460.         $count_pending_list = count($show_pending_list);
  5461.        
  5462.         if ($count_pending_list > 0) {
  5463.  
  5464.                 if (file_exists("data/round.txt")) {
  5465.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5466.                 }
  5467.                 else {
  5468.                         echo '<div id="panel_title">';
  5469.                 }
  5470.  
  5471.                 echo "Pending Member";
  5472.                 if ($count_pending_list > 1) {
  5473.                         echo "s";
  5474.                 }
  5475.                 echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
  5476.                 if ($count_pending_list > 1) {
  5477.                         echo "s";
  5478.                 }
  5479.                 echo " below.</div>";
  5480.  
  5481.                 if (file_exists("data/round.txt")) {
  5482.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5483.                 }
  5484.  
  5485.                 foreach ($show_pending_list as $pending_list_entry) {
  5486.  
  5487.                         if (file_exists("data/round.txt")) {
  5488.                                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5489.                         }
  5490.                         else {
  5491.                                 echo '<div id="panel_title">';
  5492.                         }
  5493.  
  5494.                         echo "$pending_list_entry";
  5495.                         echo '<a href=reg.php?username=';
  5496.                         echo $pending_list_entry;
  5497.                         echo '&key=';
  5498.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  5499.                         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=';
  5500.                         echo $pending_list_entry;
  5501.                         echo '&key=';
  5502.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  5503.                         echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
  5504.                         echo "<div id=panel_body>";
  5505.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  5506.                                 echo "<a href=\"";
  5507.                                 readfile("data/members/confirmed/$pending_list_entry/url.txt");
  5508.                                 echo "\" target=_pending>";
  5509.                         }
  5510.                         readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
  5511.                         echo "&nbsp;";
  5512.                         readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
  5513.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  5514.                                 echo "</a>";
  5515.                         }
  5516.                         echo "<br>";
  5517.                         $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
  5518.                         $pending_email = wordwrap($pending_email,30);
  5519.                         echo $pending_email;
  5520.                         if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
  5521.                                 $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
  5522.                                 $confirmed_year = substr($confirmed,0,4);
  5523.                                 $confirmed_month = substr($confirmed,4,2);
  5524.                                 $confirmed_day = substr($confirmed,6,2);
  5525.                                 $confirmed_hh = substr($confirmed,8,2);
  5526.                                 $confirmed_mm = substr($confirmed,10,2);
  5527.                                 $email_confirmed = date("d M Y H:i",mktime($confirmed_hh,$confirmed_mm,0,$confirmed_month,$confirmed_day,$confirmed_year));
  5528.                                 echo "<br>$email_confirmed";
  5529.                         }
  5530.                         echo "</div>";
  5531.  
  5532.                         if (file_exists("data/round.txt")) {
  5533.                                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5534.                         }
  5535.                 }
  5536.         }
  5537. }
  5538.  
  5539. if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
  5540.  
  5541.         if (file_exists("data/round.txt")) {
  5542.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5543.         }
  5544.         else {
  5545.                 echo '<div id="panel_title">';
  5546.         }
  5547.  
  5548.         echo "Bulletin Board</div><div id=panel_body>";
  5549.         if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
  5550.                 if ($dh_active_list = opendir("data/members/active")) {
  5551.                         while (($entry_active_list = readdir($dh_active_list)) !== false) {
  5552.                                 if ($entry_active_list != "." && $entry_active_list != "..") {
  5553.                                         $show_active_list[] = $entry_active_list;
  5554.                                 }
  5555.                         }
  5556.                 closedir($dh_active_list);
  5557.                 }
  5558.  
  5559.                 sort($show_active_list);
  5560.                 reset($show_active_list);
  5561.                 $count_active_list = count($show_active_list);
  5562.                 if ($count_active_list > 0) {
  5563.                         echo "Registered Members: $count_active_list";
  5564.                 }
  5565.         }
  5566.  
  5567.         if (file_exists("data/items")) {
  5568.                 if ($dh_mempost_list = opendir("data/items")) {
  5569.                         while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
  5570.  
  5571.                                 if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5572.                                         continue;
  5573.                                 }
  5574.  
  5575.                                 $private_categories = "0";
  5576.  
  5577.                                 if (file_exists("data/items/$entry_mempost_list/categories")) {
  5578.                        
  5579.                                         if ($dh_entry_categories_mempost_list = opendir("data/items/$entry_mempost_list/categories")) {
  5580.                        
  5581.                                                 while (($entry_category_mempost_list = readdir($dh_entry_categories_mempost_list)) !== false) {
  5582.                        
  5583.                                                         if ($entry_category_mempost_list != "." && $entry_category_mempost_list != "..") {
  5584.                        
  5585.                                                                 if (file_exists("data/categories/$entry_category_mempost_list/private.txt")) {
  5586.                                                                         $private_categories = $private_categories + 1;
  5587.                                                                 }
  5588.                                                         }
  5589.                                                 }
  5590.                                                 closedir($dh_entry_categories_mempost_list);
  5591.                                         }
  5592.                                 }
  5593.  
  5594.                                 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")) {
  5595.                                         continue;
  5596.                                 }
  5597.        
  5598.                                 if ($entry_mempost_list != "." && $entry_mempost_list != "..") {
  5599.                                         $entry_mempost_list = substr("$entry_mempost_list",0,6);
  5600.                                         $show_mempost_list[] = $entry_mempost_list;
  5601.                                 }
  5602.                         }
  5603.                         closedir($dh_mempost_list);
  5604.                 }
  5605.                 rsort($show_mempost_list);
  5606.                 $count_mempost_list = count($show_mempost_list);
  5607.                 echo "<br>Total Posts: $count_mempost_list";
  5608.                 unset($show_mempost_list);
  5609.         }
  5610.  
  5611.         if (file_exists("data/bb-new.txt")) {
  5612.                 $bb_new = file_get_contents("data/bb-new.txt");
  5613.                 echo "<br>Newest User: <a href=member.php?id=$bb_new>$bb_new</a>";
  5614.         }
  5615.         if (file_exists("data/bb-last.txt")) {
  5616.                 $bb_last = file_get_contents("data/bb-last.txt");
  5617.                 echo "<br>Latest Login: <a href=member.php?id=$bb_last>$bb_last</a>";
  5618.         }
  5619.         echo "</div>";
  5620.  
  5621.         if (file_exists("data/round.txt")) {
  5622.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5623.         }
  5624. }
  5625.  
  5626. if ($count_grand > 0) {
  5627.        
  5628.         if (file_exists("data/round.txt")) {
  5629.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5630.         }
  5631.         else {
  5632.                 echo '<div id="panel_title">';
  5633.         }
  5634.  
  5635.         ?>
  5636.  
  5637.         Search</div>
  5638.         <form enctype="multipart/form-data" action="dig.php" method="post">
  5639.         <div id="panel_body">
  5640.         <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
  5641.         </form>
  5642.         </div>
  5643.  
  5644.         <?php
  5645.  
  5646.         if (file_exists("data/round.txt")) {
  5647.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5648.         }
  5649. }
  5650.  
  5651.  
  5652. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5653.  
  5654.         if (file_exists("data/round.txt")) {
  5655.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5656.         }
  5657.         else {
  5658.                 echo '<div id="panel_title">';
  5659.         }
  5660.  
  5661.         echo "Find Entries</div><div id=panel_body>";
  5662.         echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
  5663.         if (file_exists("data/bb.txt")) {
  5664.                 echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
  5665.         }
  5666.         echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
  5667.         echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
  5668.         echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
  5669.         echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
  5670.         echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
  5671.         echo "</div>";
  5672.  
  5673.         if (file_exists("data/round.txt")) {
  5674.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5675.         }
  5676. }
  5677.  
  5678. if (file_exists("data/categories")) {
  5679.         if ($dh_categories = opendir("data/categories")) {
  5680.                 while (($entry_categories = readdir($dh_categories)) !== false) {
  5681.  
  5682.                         if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5683.                                 continue;
  5684.                         }
  5685.  
  5686.                         if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5687.                                 continue;
  5688.                         }
  5689.  
  5690.                         if ($entry_categories != "." && $entry_categories != "..") {
  5691.                                 $show_categories[] = $entry_categories;
  5692.                         }
  5693.                 }
  5694.                 closedir($dh_categories);
  5695.         }
  5696.  
  5697.         sort($show_categories);
  5698.         reset($show_categories);
  5699.         $count_categories = count($show_categories);
  5700.  
  5701.         if ($count_categories > 0) {
  5702.  
  5703.                 if (file_exists("data/round.txt")) {
  5704.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5705.                 }
  5706.                 else {
  5707.                         echo '<div id="panel_title">';
  5708.                 }
  5709.  
  5710.                 echo 'Categories</div><div id=panel_body>';
  5711.  
  5712.                 foreach ($show_categories as $category) {
  5713.  
  5714.                         echo "<a class=\"navlink\" href=\"index.php?category=$category\">";
  5715.  
  5716.                         if (file_exists("data/categories/$category/title.txt")) {
  5717.                                 $category_title = file_get_contents("data/categories/$category/title.txt");
  5718.                         }
  5719.                         else {
  5720.                                 $category_title = ucfirst(str_replace("_"," ",$category));
  5721.                         }
  5722.  
  5723.                         echo $category_title;
  5724.                         echo "</a><br>";
  5725.                 }
  5726.  
  5727.                 echo '</div>';
  5728.  
  5729.                 if (file_exists("data/round.txt")) {
  5730.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5731.                 }
  5732.         }
  5733. }
  5734.  
  5735. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5736.  
  5737.         if (file_exists("data/round.txt")) {
  5738.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5739.         }
  5740.         else {
  5741.                 echo '<div id="panel_title">';
  5742.         }
  5743.  
  5744.         echo 'Statistics</div><div id=panel_body>';
  5745.         echo "Total Entries: $count_latest";
  5746.         if (file_exists("data/hits.txt")) {
  5747.                 echo '<br>Site Hits: ';
  5748.                 readfile("data/hits.txt");
  5749.         }
  5750.         if (file_exists("data/google.txt")) {
  5751.                 echo '<br>Google Visits: ';
  5752.                 readfile("data/google.txt");
  5753.         }
  5754.         if (file_exists("data/rss-0.91.txt")) {
  5755.                 echo '<br>RSS 0.91 Hits: ';
  5756.                 readfile("data/rss-0.91.txt");
  5757.         }
  5758.         if (file_exists("data/rss-1.0.txt")) {
  5759.                 echo '<br>RSS 1.0 Hits: ';
  5760.                 readfile("data/rss-1.0.txt");
  5761.         }
  5762.         if (file_exists("data/rss-2.0.txt")) {
  5763.                 echo '<br>RSS 2.0 Hits: ';
  5764.                 readfile("data/rss-2.0.txt");
  5765.         }
  5766.         if (file_exists("data/sitemap.txt")) {
  5767.                 echo '<br>Sitemap Requests: ';
  5768.                 readfile("data/sitemap.txt");
  5769.         }
  5770.  
  5771.         echo '</div>';
  5772.  
  5773.         if (file_exists("data/round.txt")) {
  5774.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5775.         }
  5776. }
  5777.  
  5778. if (($count_latest > 0) and ($count_latest > $increase) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
  5779.  
  5780.         if (file_exists("data/round.txt")) {
  5781.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5782.         }
  5783.         else {
  5784.                 echo '<div id="panel_title">';
  5785.         }
  5786.  
  5787.         echo 'Recent Entries</div><div id=panel_body>';
  5788.  
  5789.         $increment_recent_entries = "0";
  5790.  
  5791.         if ($count_latest < 10) {
  5792.                 $max_recent_entries = $count_latest;
  5793.         }
  5794.         else {
  5795.                 $max_recent_entries = "10";
  5796.         }
  5797.  
  5798.         while ($increment_recent_entries < $max_recent_entries) {
  5799.  
  5800.                 echo "<a class=\"navlink\" href=\"index.php?entry=$latest[$increment_recent_entries]\">";
  5801.                 readfile("data/items/$latest[$increment_recent_entries]/title.txt");
  5802.                 echo "</a><br>";
  5803.  
  5804.                 $increment_recent_entries = $increment_recent_entries + 1;
  5805.         }
  5806.  
  5807.         echo '</div>';
  5808.  
  5809.         if (file_exists("data/round.txt")) {
  5810.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5811.         }
  5812. }
  5813.  
  5814. if (!file_exists("data/xucomment.txt") and isset($_SESSION['logged_in'])) {
  5815.  
  5816.         if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
  5817.  
  5818.                 if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
  5819.                        
  5820.                         if ($dh_unread_comments = opendir("data/comments/unread")) {
  5821.                        
  5822.                                 while (($unread_comment = readdir($dh_unread_comments)) !== false) {
  5823.                        
  5824.                                         if ($unread_comment != "." && $unread_comment != "..") {
  5825.                                                 $unread_comments[] = $unread_comment;
  5826.                                         }
  5827.                                 }
  5828.                         closedir($dh_unread_comments);
  5829.                         }
  5830.                 }
  5831.         }
  5832.         else {
  5833.                 if (file_exists("data/members/active/{$_SESSION['logged_in']}")) {
  5834.  
  5835.                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread") and (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) > 0)) {
  5836.                        
  5837.                                 if ($dh_unread_comments = opendir("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
  5838.                        
  5839.                                         while (($unread_comment = readdir($dh_unread_comments)) !== false) {
  5840.                        
  5841.                                                 if ($unread_comment != "." && $unread_comment != "..") {
  5842.                                                         $unread_comments[] = $unread_comment;
  5843.                                                 }
  5844.                                         }
  5845.                                 closedir($dh_unread_comments);
  5846.                                 }
  5847.                         }
  5848.                 }
  5849.         }
  5850.  
  5851.         sort($unread_comments);
  5852.         reset($unread_comments);
  5853.  
  5854.         if (count($unread_comments) > 0) {
  5855.  
  5856.                 if (file_exists("data/round.txt")) {
  5857.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5858.                 }
  5859.                 else {
  5860.                         echo '<div id="panel_title">';
  5861.                 }
  5862.  
  5863.                 echo 'Unread Comments</div><div id=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
  5864.  
  5865.                 foreach ($unread_comments as $unread_comment) {
  5866.                
  5867.                         $unread_comment_title = file_get_contents("data/items/$unread_comment/title.txt");
  5868.  
  5869.                         echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$unread_comment&show=comments\">$unread_comment_title</a></td></tr>";
  5870.                 }
  5871.  
  5872.                 echo '</table></div>';
  5873.  
  5874.                 if (file_exists("data/round.txt")) {
  5875.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5876.                 }
  5877.         }
  5878. }
  5879.  
  5880. if ($count_albums > 0) {
  5881.  
  5882.         if (file_exists("data/round.txt")) {
  5883.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  5884.         }
  5885.         else {
  5886.                 echo "<div id=\"panel_title\">";
  5887.         }
  5888.  
  5889.         echo "Albums</div><div id=\"panel_body\">";
  5890.  
  5891.         foreach ($albums as $album) {
  5892.                 echo "<a class=\"navlink\" href=\"index.php?entry=$album&show=album\">";
  5893.                 readfile("data/items/$album/title.txt");
  5894.                 echo "</a><br>";
  5895.         }
  5896.         echo '</div>';
  5897.  
  5898.         if (file_exists("data/round.txt")) {
  5899.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5900.         }
  5901. }
  5902.  
  5903. if (!file_exists("data/xrand.txt")) {
  5904.        
  5905.         shuffle($random);
  5906.         reset($random);
  5907.  
  5908.         if (file_exists("data/increase.txt")) {
  5909.                 $limit_random = file_get_contents("data/increase.txt");
  5910.         }
  5911.         else {
  5912.                 $limit_random = 5;
  5913.         }
  5914.        
  5915.         if ($count_random > $limit_random) {
  5916.        
  5917.                 if (file_exists("data/round.txt")) {
  5918.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5919.                 }
  5920.                 else {
  5921.                         echo '<div id="panel_title">';
  5922.                 }
  5923.        
  5924.                 echo "Random Entries</div><div id=\"panel_body\">";
  5925.        
  5926.                 $increment_random = 0;
  5927.        
  5928.                 if ($count_random <= $limit_random * 2) {
  5929.                         $show_random = $count_random - 1;
  5930.                 }
  5931.                 else {
  5932.                         $show_random = $limit_random * 2 - 1;
  5933.                 }
  5934.        
  5935.                 while ($increment_random <= $show_random) {
  5936.                         echo "<a class=\"navlink\" href=\"index.php?entry={$random[$increment_random]}\">";
  5937.                         readfile("data/items/$random[$increment_random]/title.txt");
  5938.                         echo "</a><br>";
  5939.        
  5940.                         $increment_random = $increment_random + 1;
  5941.                 }
  5942.         }
  5943.        
  5944.         if ($count_random > $limit_random) {
  5945.                 echo "</div>";
  5946.        
  5947.                 if (file_exists("data/round.txt")) {
  5948.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5949.                 }
  5950.         }
  5951. }
  5952. ?>
  5953.  
  5954.  
  5955. <?php
  5956.  
  5957. if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0) and (!file_exists("data/xarc.txt") or isset($_SESSION['logged_in']))) {
  5958.  
  5959.         $archive_entries = implode(" ",$archives);
  5960.  
  5961.         $unique_archive_list = array_unique($archives);
  5962.  
  5963.         if (file_exists("data/round.txt")) {
  5964.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  5965.         }
  5966.         else {
  5967.                 echo "<div id=\"panel_title\">";
  5968.         }
  5969.  
  5970.         echo "Archives ($count_archives)</div>";
  5971.         echo "<div id=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
  5972.  
  5973.         foreach ($unique_archive_list as $archive_list_entry) {
  5974.  
  5975.                 $archive_list_value = substr($archive_list_entry,0,6);
  5976.                 $archive_list_year = substr($archive_list_entry,0,4);
  5977.                 $archive_list_month = substr($archive_list_entry,4,2);
  5978.                 $archive_list_month = date("F",mktime(0,0,0,$archive_list_month));
  5979.                 $archive_list_num = substr_count($archive_entries,$archive_list_entry);
  5980.  
  5981.                 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>";
  5982.         }
  5983.         echo "</table></div>";
  5984.  
  5985.         if (file_exists("data/round.txt")) {
  5986.                 echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  5987.         }
  5988. }
  5989.  
  5990. if ($count_right_panels > 0) {
  5991.  
  5992.         foreach ($right_panels as $right_panel) {
  5993.  
  5994.                 if (!file_exists("data/panels/$right_panel/free.txt")) {
  5995.  
  5996.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  5997.                                 $right_panel_border = file_get_contents("data/panels/$right_panel/border.txt");
  5998.                         }
  5999.                         else {
  6000.                                 if (isset($right_panel_border)) {
  6001.                                         unset($right_panel_border);
  6002.                                 }
  6003.                         }
  6004.  
  6005.                         if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  6006.                                 $right_panel_bgcolor_t = file_get_contents("data/panels/$right_panel/bgcolor-t.txt");
  6007.                         }
  6008.                         else {
  6009.                                 if (isset($right_panel_bgcolor_t)) {
  6010.                                         unset($right_panel_bgcolor_t);
  6011.                                 }
  6012.                         }
  6013.  
  6014.                         if (file_exists("data/panels/$right_panel/bgcolor-c.txt")) {
  6015.                                 $right_panel_bgcolor_c = file_get_contents("data/panels/$right_panel/bgcolor-c.txt");
  6016.                         }
  6017.                         else {
  6018.                                 if (isset($right_panel_bgcolor_c)) {
  6019.                                         unset($right_panel_bgcolor_c);
  6020.                                 }
  6021.                         }
  6022.  
  6023.                         if (file_exists("data/panels/$right_panel/text-t.txt")) {
  6024.                                 $right_panel_text_t = file_get_contents("data/panels/$right_panel/text-t.txt");
  6025.                         }
  6026.                         else {
  6027.                                 if (isset($right_panel_text_t)) {
  6028.                                         unset($right_panel_text_t);
  6029.                                 }
  6030.                         }
  6031.  
  6032.                         if (file_exists("data/panels/$right_panel/text-c.txt")) {
  6033.                                 $right_panel_text_c = file_get_contents("data/panels/$right_panel/text-c.txt");
  6034.                         }
  6035.                         else {
  6036.                                 if (isset($right_panel_text_c)) {
  6037.                                         unset($right_panel_text_c);
  6038.                                 }
  6039.                         }
  6040.  
  6041.                         if (file_exists("data/round.txt")) {
  6042.  
  6043.                                 echo '<b class="rbtop"><b class="rb1t"';
  6044.  
  6045.                                 if (isset($right_panel_border)) {
  6046.                                         echo " style=\"background-color: $right_panel_border;\"";
  6047.                                 }
  6048.  
  6049.                                 echo '></b><b class="rb2t"';
  6050.  
  6051.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6052.                                         echo ' style="';
  6053.                                 }
  6054.  
  6055.                                 if (isset($right_panel_bgcolor_t)) {
  6056.                                         echo "background-color: $right_panel_bgcolor_t;";
  6057.                                 }
  6058.  
  6059.                                 if (isset($right_panel_border)) {
  6060.                                         echo "border-color: $right_panel_border;";
  6061.                                 }
  6062.  
  6063.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6064.                                         echo '"';
  6065.                                 }
  6066.  
  6067.                                 echo '></b><b class="rb3t"';
  6068.  
  6069.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6070.                                         echo ' style="';
  6071.                                 }
  6072.  
  6073.                                 if (isset($right_panel_bgcolor_t)) {
  6074.                                         echo "background-color: $right_panel_bgcolor_t;";
  6075.                                 }
  6076.  
  6077.                                 if (isset($right_panel_border)) {
  6078.                                         echo "border-color: $right_panel_border;";
  6079.                                 }
  6080.  
  6081.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6082.                                         echo '"';
  6083.                                 }
  6084.  
  6085.                                 echo '></b><b class="rb4t"';
  6086.  
  6087.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6088.                                         echo ' style="';
  6089.                                 }
  6090.  
  6091.                                 if (isset($right_panel_bgcolor_t)) {
  6092.                                         echo "background-color: $right_panel_bgcolor_t;";
  6093.                                 }
  6094.  
  6095.                                 if (isset($right_panel_border)) {
  6096.                                         echo "border-color: $right_panel_border;";
  6097.                                 }
  6098.  
  6099.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6100.                                         echo '"';
  6101.                                 }
  6102.  
  6103.                                 echo '></b></b><div class="xtitle"';
  6104.  
  6105.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6106.                                         echo ' style="';
  6107.                                 }
  6108.  
  6109.                                 if (isset($right_panel_bgcolor_t)) {
  6110.                                         echo "background-color: $right_panel_bgcolor_t;";
  6111.                                 }
  6112.  
  6113.                                 if (isset($right_panel_text_t)) {
  6114.                                         echo "color: $right_panel_text_t;";
  6115.                                 }
  6116.  
  6117.                                 if (isset($right_panel_border)) {
  6118.                                         echo "border-color: $right_panel_border;";
  6119.                                 }
  6120.  
  6121.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6122.                                         echo '"';
  6123.                                 }
  6124.  
  6125.                                 echo '>';
  6126.                         }
  6127.                         else {
  6128.                                 echo '<div id="panel_title"';
  6129.  
  6130.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6131.                                         echo ' style="';
  6132.                                 }
  6133.  
  6134.                                 if (isset($right_panel_bgcolor_t)) {
  6135.                                         echo "background-color: $right_panel_bgcolor_t;";
  6136.                                 }
  6137.  
  6138.                                 if (isset($right_panel_text_t)) {
  6139.                                         echo "color: $right_panel_text_t;";
  6140.                                 }
  6141.  
  6142.                                 if (isset($right_panel_border)) {
  6143.                                         echo "border-color: $right_panel_border;";
  6144.                                 }
  6145.  
  6146.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6147.                                         echo '"';
  6148.                                 }
  6149.  
  6150.                                 echo '>';
  6151.                         }
  6152.  
  6153.                         readfile("data/panels/$right_panel/title.txt");
  6154.  
  6155.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  6156.                                 echo "<a href=\"panels.php#{$right_panel}\">";
  6157.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  6158.                         }
  6159.  
  6160.                         if (file_exists("data/panels/$right_panel/private.txt")) {
  6161.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  6162.                         }
  6163.  
  6164.                         echo '</div>';
  6165.  
  6166.                         echo '<div id="panel_body"';
  6167.  
  6168.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c) or isset($right_panel_text_c)) {
  6169.                                 echo ' style="';
  6170.                         }
  6171.  
  6172.                         if (isset($right_panel_bgcolor_c)) {
  6173.                                 echo "background-color: $right_panel_bgcolor_c;";
  6174.                         }
  6175.  
  6176.                         if (isset($right_panel_text_c)) {
  6177.                                 echo "color: $right_panel_text_c;";
  6178.                         }
  6179.  
  6180.                         if (isset($right_panel_border)) {
  6181.                                 echo "border-color: $right_panel_border;";
  6182.                         }
  6183.  
  6184.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c) or isset($right_panel_text_c)) {
  6185.                                 echo '"';
  6186.                         }
  6187.  
  6188.                         echo '>';
  6189.                 }
  6190.  
  6191.                 if (file_exists("data/panels/$right_panel/free.txt")) {
  6192.                         echo '<div id=panel_free>';
  6193.                 }
  6194.  
  6195.                 include("data/panels/$right_panel/panel.php");
  6196.  
  6197.                 echo '</div>';
  6198.  
  6199.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$right_panel/free.txt")) {
  6200.  
  6201.                         echo '<b class="rbbottom"><b class="rb4b"';
  6202.  
  6203.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6204.                                 echo ' style="';
  6205.                         }
  6206.  
  6207.                         if (isset($right_panel_bgcolor_c)) {
  6208.                                 echo "background-color: $right_panel_bgcolor_c;";
  6209.                         }
  6210.  
  6211.                         if (isset($right_panel_border)) {
  6212.                                 echo "border-color: $right_panel_border;";
  6213.                         }
  6214.  
  6215.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6216.                                 echo '"';
  6217.                         }
  6218.  
  6219.                         echo '></b><b class="rb3b"';
  6220.  
  6221.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6222.                                 echo ' style="';
  6223.                         }
  6224.  
  6225.                         if (isset($right_panel_bgcolor_c)) {
  6226.                                 echo "background-color: $right_panel_bgcolor_c;";
  6227.                         }
  6228.  
  6229.                         if (isset($right_panel_border)) {
  6230.                                 echo "border-color: $right_panel_border;";
  6231.                         }
  6232.  
  6233.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6234.                                 echo '"';
  6235.                         }
  6236.  
  6237.                         echo '></b><b class="rb2b"';
  6238.  
  6239.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6240.                                 echo ' style="';
  6241.                         }
  6242.  
  6243.                         if (isset($right_panel_bgcolor_c)) {
  6244.                                 echo "background-color: $right_panel_bgcolor_c;";
  6245.                         }
  6246.  
  6247.                         if (isset($right_panel_border)) {
  6248.                                 echo "border-color: $right_panel_border;";
  6249.                         }
  6250.  
  6251.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6252.                                 echo '"';
  6253.                         }
  6254.  
  6255.                         echo '></b><b class="rb1b"';
  6256.  
  6257.                         if (isset($right_panel_border)) {
  6258.                                 echo " style=\"background-color: $right_panel_border;\"";
  6259.                         }
  6260.  
  6261.                         echo '></b></b>';
  6262.                 }
  6263.         }
  6264. }
  6265.  
  6266. if ($count_latest > 0) {
  6267.         echo '<table border="0" cellspacing="2" cellpadding="0" width="100%">';
  6268.         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>';
  6269.         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>';
  6270.  
  6271.         $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  6272.         $validate_uri = str_replace('//','/',$validate_uri);
  6273.         $validate_uri = "http://" . $validate_uri;
  6274.  
  6275.         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>';
  6276.         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>';
  6277.         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>';
  6278.         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>';
  6279.         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>';
  6280.  
  6281.         if (file_exists("data/sfx.txt")) {
  6282.  
  6283.                 $sfx = file_get_contents("data/sfx.txt");
  6284.  
  6285.                 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>";
  6286.         }
  6287.  
  6288.         echo '</table>';
  6289. }
  6290.  
  6291. echo "</td></tr>";
  6292. 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>";
  6293. echo "</table>";
  6294.  
  6295. if (file_exists("data/footer.txt")) {
  6296.  
  6297.         $footer_panel = file_get_contents("data/footer.txt");
  6298.  
  6299.         if (file_exists("data/panels/$footer_panel") and (!file_exists("data/panels/$footer_panel/private.txt") or isset($_SESSION['logged_in']))) {
  6300.                 include("data/panels/$footer_panel/panel.php");
  6301.         }
  6302.  
  6303. }
  6304.  
  6305. if (file_exists("data/center.txt")) {
  6306.         echo "</center>";
  6307. }
  6308.  
  6309. ?>
  6310.  
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