maj.world

maj.world

Git

This blob has been accessed 450 times via Git panel.

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