maj.world

maj.world

Git

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