maj.world

maj.world

Git

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