maj.world

maj.world

Git

This blob has been accessed 385 times via Git panel.

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