maj.world

maj.world

Git

This blob has been accessed 360 times via Git panel.

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