maj.world

maj.world

Git

This blob has been accessed 413 times via Git panel.

  1. <?php
  2.  
  3. ini_set("session.use_trans_sid","0");
  4.  
  5. session_start();
  6.  
  7. header("Cache-control: private");
  8.  
  9. error_reporting(E_ERROR);
  10.  
  11. require("core.php");
  12.  
  13. if (isset($_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 (file_exists("data/fb.txt") and file_exists("data/items/$maj_d/fb.txt")) {
  2574.        
  2575.                 if (isset($_SERVER['HTTPS'])) {
  2576.                         $entry_url = "https://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/index.php?entry=$maj_d";
  2577.                 }
  2578.                 else {
  2579.                         $entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/index.php?entry=$maj_d";
  2580.                 }
  2581.  
  2582.                 $entry_url = rawurlencode($entry_url);
  2583.  
  2584.                 echo "<br><br><iframe src=\"http://www.facebook.com/plugins/like.php?href=$entry_url&amp;layout=standard&amp;show_faces=false&amp;width=513&amp;action=like&amp;colorscheme=light&amp;height=23\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:513px; height:23px;\" allowTransparency=\"true\"></iframe>";
  2585.         }
  2586.  
  2587.         if (isset($maj_d_text_b)) {
  2588.                 echo "</font>";
  2589.         }
  2590.  
  2591.         echo "</td></tr></table>";
  2592.  
  2593.         echo "</div>";
  2594.  
  2595.         if (file_exists("data/items/$maj_d/categories") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2596.                
  2597.                 if ($maj_dh_entry_categories = opendir("data/items/$maj_d/categories")) {
  2598.                
  2599.                         while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
  2600.                
  2601.                                 if ($maj_entry_category != "." && $maj_entry_category != "..") {
  2602.                                         $maj_entry_categories[] = $maj_entry_category;
  2603.                                 }
  2604.                         }
  2605.                         closedir($maj_dh_entry_categories);
  2606.                 }
  2607.  
  2608.                 sort($maj_entry_categories);
  2609.                 reset($maj_entry_categories);
  2610.  
  2611.                 if (count($maj_entry_categories) > 0) {
  2612.  
  2613.                         if (count($maj_entry_categories) > 1) {
  2614.                                 $maj_category_list = "categories";
  2615.                         }
  2616.                         else {
  2617.                                 $maj_category_list = "category";
  2618.                         }
  2619.  
  2620.                         foreach ($maj_entry_categories as $maj_filed_under) {
  2621.                                 $maj_category_list = $maj_category_list . " | <a href=\"index.php?category=$maj_filed_under\" class=\"status\">$maj_filed_under</a>";
  2622.                         }
  2623.  
  2624.                         echo "<div class=\"panel_category\"";
  2625.  
  2626.                         if (isset($maj_d_border) or isset($maj_d_bgcolor_c) or isset($maj_d_text_c)) {
  2627.                                 echo ' style="';
  2628.                         }
  2629.  
  2630.                         if (isset($maj_d_bgcolor_c)) {
  2631.                                 echo "background-color: $maj_d_bgcolor_c;";
  2632.                         }
  2633.  
  2634.                         if (isset($maj_d_text_c)) {
  2635.                                 echo "color: $maj_d_text_c;";
  2636.                         }
  2637.  
  2638.                         if (isset($maj_d_border)) {
  2639.                                 echo "border-color: $maj_d_border;";
  2640.                         }
  2641.  
  2642.                         if (isset($maj_d_border) or isset($maj_d_bgcolor_c) or isset($maj_d_text_c)) {
  2643.                                 echo '"';
  2644.                         }
  2645.  
  2646.                         echo ">$maj_category_list</div>";
  2647.                 }
  2648.                 unset($maj_entry_categories);
  2649.         }
  2650.  
  2651.         echo "<div class=\"panel_footer\"";
  2652.  
  2653.         if (isset($maj_d_border) or isset($maj_d_bgcolor_f) or isset($maj_d_text_f)) {
  2654.                 echo ' style="';
  2655.         }
  2656.  
  2657.         if (isset($maj_d_bgcolor_f)) {
  2658.                 echo "background-color: $maj_d_bgcolor_f;";
  2659.         }
  2660.  
  2661.         if (isset($maj_d_text_f)) {
  2662.                 echo "color: $maj_d_text_f;";
  2663.         }
  2664.  
  2665.         if (isset($maj_d_border)) {
  2666.                 echo "border-color: $maj_d_border;";
  2667.         }
  2668.  
  2669.         if (isset($maj_d_border) or isset($maj_d_bgcolor_f) or isset($maj_d_text_f)) {
  2670.                 echo '"';
  2671.         }
  2672.  
  2673.         echo '>';
  2674.  
  2675.         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")) {
  2676.  
  2677.                 if (!file_exists("data/items/$maj_d/comments/live")) {
  2678.                         echo "<a href=\"index.php?entry=$maj_d&show=comments\" class=\"status\">add comment</a>";
  2679.                 }
  2680.                 else {
  2681.                         if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
  2682.        
  2683.                                 while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
  2684.        
  2685.                                         if ($maj_live_comment != "." && $maj_live_comment != "..") {
  2686.                                                 $maj_live_comments[] = $maj_live_comment;
  2687.                                         }
  2688.                                 }
  2689.                                 closedir($maj_dh_comments);
  2690.                         }
  2691.  
  2692.                         $maj_count_live_comments = count($maj_live_comments);
  2693.  
  2694.                         echo "<a href=\"index.php?entry=$maj_d&show=comments\" class=\"status\">";
  2695.  
  2696.                         if ($maj_count_live_comments == 1) {
  2697.                                 echo "$maj_count_live_comments comment";
  2698.                         }
  2699.                         elseif ($maj_count_live_comments < 1) {
  2700.                                 echo "add comment";
  2701.                         }
  2702.                         else {
  2703.                                 echo "$maj_count_live_comments comments";
  2704.                         }
  2705.                         echo "</a>";
  2706.  
  2707.                         unset($maj_live_comments);
  2708.                 }
  2709.         }
  2710.         else {
  2711.                 echo "<a href=\"index.php?entry=$maj_d\" class=\"status\">permalink</a>";
  2712.         }
  2713.  
  2714.         if (file_exists("data/items/$maj_d/views.txt")) {
  2715.  
  2716.                 $maj_views_value = file_get_contents("data/items/$maj_d/views.txt");
  2717.  
  2718.                 if ($maj_views_value == 1) {
  2719.                         echo " ( $maj_views_value view ) ";
  2720.                 }
  2721.                 elseif ($maj_views_value > 1) {
  2722.                         echo " ( $maj_views_value views ) ";
  2723.                 }
  2724.                 else {
  2725.                         echo " ";
  2726.                 }
  2727.         }
  2728.  
  2729.         if (!file_exists("images/$maj_d/album")) {
  2730.                 echo " ";
  2731.         }
  2732.         else {
  2733.                 if ($maj_dh_album = opendir("images/$maj_d/album")) {
  2734.  
  2735.                         while (($maj_entry_album = readdir($maj_dh_album)) !== false) {
  2736.  
  2737.                                 if ($maj_entry_album != "." && $maj_entry_album != "..") {
  2738.                                         $maj_items_album[] = $maj_entry_album;
  2739.                                 }
  2740.                         }
  2741.                         closedir($maj_dh_album);
  2742.                 }
  2743.  
  2744.                 $maj_album = count($maj_items_album);
  2745.  
  2746.                 echo " | <a href=\"index.php?entry=$maj_d&show=album\" class=\"status\">";
  2747.  
  2748.                 if ($maj_album == 1) {
  2749.                         echo "$maj_album image";
  2750.                 }
  2751.                 elseif ($maj_album < 1) {
  2752.                         echo "album";
  2753.                 }
  2754.                 else {
  2755.                         echo "$maj_album images";
  2756.                 }
  2757.  
  2758.                 echo "</a>";
  2759.  
  2760.                 unset($maj_items_album);
  2761.         }
  2762.  
  2763.         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)) {
  2764.  
  2765.                 if (!file_exists("data/items/$maj_d/album")) {
  2766.                         mkdir("data/items/$maj_d/album");
  2767.                 }
  2768.  
  2769.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  2770.  
  2771.                         $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
  2772.  
  2773.                         $maj_album_views_value = $maj_album_views_value + 1;
  2774.  
  2775.                         $maj_fp_album_views_txt = fopen("data/items/$maj_d/album/views.txt","w");
  2776.                         fwrite($maj_fp_album_views_txt,$maj_album_views_value);
  2777.                         fclose($maj_fp_album_views_txt);
  2778.                 }
  2779.         }
  2780.  
  2781.  
  2782.         $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
  2783.  
  2784.         if ($maj_album_views_value == 1) {
  2785.                 echo " ( $maj_album_views_value view ) ";
  2786.         }
  2787.         elseif ($maj_album_views_value > 1) {
  2788.                 echo " ( $maj_album_views_value views ) ";
  2789.         }
  2790.         else {
  2791.                 echo " ";
  2792.         }
  2793.  
  2794.         if (!file_exists("data/items/$maj_d/filedrop/files")) {
  2795.                 echo " ";
  2796.         }
  2797.         else {
  2798.                 if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
  2799.  
  2800.                         while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
  2801.  
  2802.                                 if ($maj_dl_file != "." && $maj_dl_file != "..") {
  2803.                                         $maj_items_filedrop[] = $maj_dl_file;
  2804.                                 }
  2805.                         }
  2806.                         closedir($maj_dh_filedrop);
  2807.                 }
  2808.  
  2809.                 $maj_filedrop = count($maj_items_filedrop);
  2810.  
  2811.                 echo " | <a href=\"index.php?entry=$maj_d&show=filedrop\" class=\"status\">";
  2812.  
  2813.                 if ($maj_filedrop == 1) {
  2814.                         echo "$maj_filedrop file";
  2815.                 }
  2816.                 elseif ($maj_filedrop < 1) {
  2817.                         echo "filedrop";
  2818.                 }
  2819.                 else {
  2820.                         echo "$maj_filedrop files";
  2821.                 }
  2822.  
  2823.                 echo "</a> ";
  2824.  
  2825.                 unset($maj_items_filedrop);
  2826.         }
  2827.  
  2828.         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)) {
  2829.  
  2830.                 if (!file_exists("data/items/$maj_d/filedrop")) {
  2831.                         mkdir("data/items/$maj_d/filedrop");
  2832.                 }
  2833.  
  2834.                 if (file_exists("data/items/$maj_d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  2835.  
  2836.                         $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
  2837.  
  2838.                         $maj_filedrop_views_value = $maj_filedrop_views_value + 1;
  2839.  
  2840.                         $maj_fp_filedrop_views_txt = fopen("data/items/$maj_d/filedrop/views.txt","w");
  2841.                         fwrite($maj_fp_filedrop_views_txt,$maj_filedrop_views_value);
  2842.                         fclose($maj_fp_filedrop_views_txt);
  2843.                 }
  2844.         }
  2845.  
  2846.  
  2847.         $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
  2848.  
  2849.         if ($maj_filedrop_views_value == 1) {
  2850.                 echo " ( $maj_filedrop_views_value view ) ";
  2851.         }
  2852.         elseif ($maj_filedrop_views_value > 1) {
  2853.                 echo " ( $maj_filedrop_views_value views ) ";
  2854.         }
  2855.         else {
  2856.                 echo " ";
  2857.         }
  2858.  
  2859.         if (!file_exists("data/nopdf.txt") and file_exists("data/items/$maj_d/pdf/file")) {
  2860.  
  2861.                 echo "| <a href=\"index.php?entry=$maj_d&show=pdf\" class=\"status\">pdf</a> ";
  2862.  
  2863.                 if (($maj_req_show == pdf) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  2864.  
  2865.                         $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
  2866.  
  2867.                         $maj_pdf_views_value = $maj_pdf_views_value + 1;
  2868.  
  2869.                         $maj_fp_pdf_views_txt = fopen("data/items/$maj_d/pdf/count/views.txt","w");
  2870.                         fwrite($maj_fp_pdf_views_txt,$maj_pdf_views_value);
  2871.                         fclose($maj_fp_pdf_views_txt);
  2872.                 }
  2873.  
  2874.                 $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
  2875.  
  2876.                 if ($maj_pdf_views_value == 1) {
  2877.                         echo " ( $maj_pdf_views_value view ) ";
  2878.                 }
  2879.                 elseif ($maj_pdf_views_value > 1) {
  2880.                         echo " ( $maj_pdf_views_value views ) ";
  2881.                 }
  2882.                 else {
  2883.                         echo " ";
  2884.                 }
  2885.         }
  2886.  
  2887.         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")) {
  2888.                 echo "| <a href=\"index.php?entry=$maj_d\" class=\"status\">permalink</a>";
  2889.         }
  2890.  
  2891.         echo "</div>";
  2892.  
  2893.         echo "</td></tr></table>";
  2894.  
  2895.         if ($maj_count_entry_panels > 0) {
  2896.  
  2897.                 foreach ($maj_entry_panels as $maj_entry_panel) {
  2898.  
  2899.                         if (!file_exists("data/panels/$maj_entry_panel/free.txt")) {
  2900.  
  2901.                                 if (file_exists("data/panels/$maj_entry_panel/border.txt")) {
  2902.                                         $maj_entry_panel_border = file_get_contents("data/panels/$maj_entry_panel/border.txt");
  2903.                                 }
  2904.                                 else {
  2905.                                         if (isset($maj_entry_panel_border)) {
  2906.                                                 unset($maj_entry_panel_border);
  2907.                                         }
  2908.                                 }
  2909.  
  2910.                                 if (file_exists("data/panels/$maj_entry_panel/bgcolor-t.txt")) {
  2911.                                         $maj_entry_panel_bgcolor_t = file_get_contents("data/panels/$maj_entry_panel/bgcolor-t.txt");
  2912.                                 }
  2913.                                 else {
  2914.                                         if (isset($maj_entry_panel_bgcolor_t)) {
  2915.                                                 unset($maj_entry_panel_bgcolor_t);
  2916.                                         }
  2917.                                 }
  2918.  
  2919.                                 if (file_exists("data/panels/$maj_entry_panel/bgcolor-c.txt")) {
  2920.                                         $maj_entry_panel_bgcolor_c = file_get_contents("data/panels/$maj_entry_panel/bgcolor-c.txt");
  2921.                                 }
  2922.                                 else {
  2923.                                         if (isset($maj_entry_panel_bgcolor_c)) {
  2924.                                                 unset($maj_entry_panel_bgcolor_c);
  2925.                                         }
  2926.                                 }
  2927.  
  2928.                                 if (file_exists("data/panels/$maj_entry_panel/text-t.txt")) {
  2929.                                         $maj_entry_panel_text_t = file_get_contents("data/panels/$maj_entry_panel/text-t.txt");
  2930.                                 }
  2931.                                 else {
  2932.                                         if (isset($maj_entry_panel_text_t)) {
  2933.                                                 unset($maj_entry_panel_text_t);
  2934.                                         }
  2935.                                 }
  2936.  
  2937.                                 if (file_exists("data/panels/$maj_entry_panel/text-c.txt")) {
  2938.                                         $maj_entry_panel_text_c = file_get_contents("data/panels/$maj_entry_panel/text-c.txt");
  2939.                                 }
  2940.                                 else {
  2941.                                         if (isset($maj_entry_panel_text_c)) {
  2942.                                                 unset($maj_entry_panel_text_c);
  2943.                                         }
  2944.                                 }
  2945.  
  2946.                                 echo '<div class="panel_title"';
  2947.  
  2948.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
  2949.                                         echo ' style="';
  2950.                                 }
  2951.  
  2952.                                 if (isset($maj_entry_panel_bgcolor_t)) {
  2953.                                         echo "background-color: $maj_entry_panel_bgcolor_t;";
  2954.                                 }
  2955.  
  2956.                                 if (isset($maj_entry_panel_text_t)) {
  2957.                                         echo "color: $maj_entry_panel_text_t;";
  2958.                                 }
  2959.  
  2960.                                 if (isset($maj_entry_panel_border)) {
  2961.                                         echo "border-color: $maj_entry_panel_border;";
  2962.                                 }
  2963.  
  2964.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
  2965.                                         echo '"';
  2966.                                 }
  2967.  
  2968.                                 echo '>';
  2969.  
  2970.                                 readfile("data/panels/$maj_entry_panel/title.txt");
  2971.  
  2972.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  2973.                                         echo "<a href=\"panels.php#{$maj_entry_panel}\">";
  2974.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  2975.                                 }
  2976.  
  2977.                                 if (file_exists("data/panels/$maj_entry_panel/private.txt")) {
  2978.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  2979.                                 }
  2980.  
  2981.                                 echo '</div>';
  2982.  
  2983.                                 echo '<div class="panel_body"';
  2984.  
  2985.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c) or isset($maj_entry_panel_text_c)) {
  2986.                                         echo ' style="';
  2987.                                 }
  2988.  
  2989.                                 if (isset($maj_entry_panel_bgcolor_c)) {
  2990.                                         echo "background-color: $maj_entry_panel_bgcolor_c;";
  2991.                                 }
  2992.  
  2993.                                 if (isset($maj_entry_panel_text_c)) {
  2994.                                         echo "color: $maj_entry_panel_text_c;";
  2995.                                 }
  2996.  
  2997.                                 if (isset($maj_entry_panel_border)) {
  2998.                                         echo "border-color: $maj_entry_panel_border;";
  2999.                                 }
  3000.  
  3001.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c) or isset($maj_entry_panel_text_c)) {
  3002.                                         echo '"';
  3003.                                 }
  3004.  
  3005.                                 echo '>';
  3006.                         }
  3007.  
  3008.                         if (file_exists("data/panels/$maj_entry_panel/free.txt")) {
  3009.                                 echo '<div class=panel_free>';
  3010.                         }
  3011.  
  3012.                         include("data/panels/$maj_entry_panel/panel.php");
  3013.  
  3014.                         echo '</div>';
  3015.  
  3016.                         if (file_exists("data/panels/$maj_entry_panel/free.txt") and !file_exists("data/panels/$maj_entry_panel/nomargin.txt")) {
  3017.                                 echo "<div style=\"height:10px;\"></div>";
  3018.                         }
  3019.                 }
  3020.         }
  3021.  
  3022.         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)))) {
  3023.  
  3024.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3025.  
  3026.                 echo '<div class="panel_title">Album';
  3027.                
  3028.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3029.                         echo '<a href=del.php?entry=';
  3030.                         echo $maj_d;
  3031.                         echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
  3032.                 }
  3033.                 echo '</div><div class=panel_body>';
  3034.  
  3035.                 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))) {
  3036.                         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.";
  3037.                 }
  3038.                 else {
  3039.                         if (file_exists("images/$maj_d/thumbnails")) {
  3040.                                 if ($maj_dh_album = opendir("images/$maj_d/thumbnails")) {
  3041.                                         while (($maj_thumbnail_album = readdir($maj_dh_album)) !== false) {
  3042.                                                 if ($maj_thumbnail_album != "." && $maj_thumbnail_album != "..") {
  3043.                                                         $maj_current_thumbnail = "images/$maj_d/thumbnails/$maj_thumbnail_album";
  3044.                                                         $maj_parent_image = str_replace("-thumbnail.jpg","",$maj_thumbnail_album);
  3045.                                                         $maj_parent_image = "images/$maj_d/album/$maj_parent_image";
  3046.                                                         if (file_exists($maj_current_thumbnail) and !file_exists($maj_parent_image)) {
  3047.                                                                 unlink($maj_current_thumbnail);
  3048.                                                         }
  3049.                                                 }
  3050.                                         }
  3051.                                 }
  3052.                         }
  3053.  
  3054.                         if (file_exists("data/items/$maj_d/album/captions")) {
  3055.                                 if ($maj_dh_album = opendir("data/items/$maj_d/album/captions")) {
  3056.                                         while (($maj_caption_album = readdir($maj_dh_album)) !== false) {
  3057.                                                 if ($maj_caption_album != "." && $maj_caption_album != "..") {
  3058.                                                         $maj_current_caption = "data/items/$maj_d/album/captions/$maj_caption_album";
  3059.                                                         $maj_parent_image = str_replace(".txt","",$maj_caption_album);
  3060.                                                         $maj_parent_image = "images/$maj_d/album/$maj_parent_image";
  3061.                                                         if (file_exists($maj_current_caption) and !file_exists($maj_parent_image)) {
  3062.                                                                 unlink($maj_current_caption);
  3063.                                                         }
  3064.                                                 }
  3065.                                         }
  3066.                                 }
  3067.                         }
  3068.        
  3069.                         if (file_exists("images/$maj_d/album")) {
  3070.                                 if ($maj_dh_album = opendir("images/$maj_d/album")) {
  3071.                                         while (($maj_entry_album = readdir($maj_dh_album)) !== false) {
  3072.                                                 if ($maj_entry_album != "." && $maj_entry_album != "..") {
  3073.                                                         $maj_sort_album[] = $maj_entry_album;
  3074.                                                 }
  3075.                                         }
  3076.                                 closedir($maj_dh_album);
  3077.                                 }
  3078.        
  3079.                                 sort($maj_sort_album);
  3080.                                 reset($maj_sort_album);
  3081.                                 $maj_count_album_entry = count($maj_sort_album);
  3082.                                
  3083.                                 if ($maj_count_album_entry < 1) {
  3084.                                         rmdirr("images/$maj_d/album");
  3085.                                         rmdirr("images/$maj_d/thumbnails");                            
  3086.                                 }
  3087.                                 else {
  3088.                                         foreach($maj_sort_album as $maj_album_entry) {
  3089.                                                 $maj_current_image = "images/$maj_d/album/$maj_album_entry";
  3090.                                                 $maj_current_image_size = getimagesize($maj_current_image);
  3091.                                                 $maj_current_width = $maj_current_image_size[0];
  3092.                                                 $maj_current_height = $maj_current_image_size[1];
  3093.                                                 $maj_max_width = 98;
  3094.                                                 $maj_max_height = 73;
  3095.  
  3096.                                                 if (($maj_current_width > $maj_max_width) || ($maj_current_height > $maj_max_height)) {  
  3097.  
  3098.                                                         if ($maj_current_height > $maj_current_width) {
  3099.                                                                 $maj_sizefactor = (double) ($maj_max_height / $maj_current_height);
  3100.                                                         }
  3101.                                                         else {
  3102.                                                                 $maj_sizefactor = (double) ($maj_max_width / $maj_current_width) ;
  3103.                                                         }
  3104.  
  3105.                                                         $maj_new_width = (int) ($maj_current_width * $maj_sizefactor);
  3106.                                                         $maj_new_height = (int) ($maj_current_height * $maj_sizefactor);
  3107.                                                 }
  3108.                                                 else {
  3109.                                                         $maj_new_width = $maj_current_width;
  3110.                                                         $maj_new_height = $maj_current_height;
  3111.                                                 }
  3112.        
  3113.                                                 if (!file_exists("images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg")) {
  3114.        
  3115.                                                         $maj_work_thumb = imagecreatetruecolor($maj_new_width,$maj_new_height);
  3116.                                                         $maj_get_mimetype = image_type_to_mime_type(exif_imagetype($maj_current_image));
  3117.  
  3118.                                                         switch($maj_get_mimetype) {
  3119.                                                                 case "image/jpg":
  3120.                                                                 case "image/jpeg":
  3121.                                                                         $maj_work_image = imagecreatefromjpeg($maj_current_image);
  3122.                                                                         break;
  3123.                                                                 case "image/gif":
  3124.                                                                         $maj_work_image = imagecreatefromgif($maj_current_image);
  3125.                                                                         break;
  3126.                                                                 case "image/png":
  3127.                                                                         $maj_work_image = imagecreatefrompng($maj_current_image);
  3128.                                                                         break;
  3129.                                                         }
  3130.        
  3131.                                                         imagecopyresampled($maj_work_thumb,$maj_work_image,0,0,0,0,$maj_new_width,$maj_new_height,$maj_current_width,$maj_current_height);
  3132.        
  3133.                                                         if (!file_exists("images/$maj_d/thumbnails")) {
  3134.                                                                 mkdir("images/$maj_d/thumbnails");
  3135.                                                         }
  3136.        
  3137.                                                         imagejpeg($maj_work_thumb,"images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg",80);
  3138.  
  3139.                                                         imagedestroy($maj_work_thumb);
  3140.                                                         imagedestroy($maj_work_image);
  3141.                                                 }
  3142.  
  3143.                                                 echo "<a href=\"album.php?entry=$maj_d&show=$maj_album_entry\">";
  3144.  
  3145.                                                 if (!file_exists("images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg")) {
  3146.                                                         echo "<img src=\"images/$maj_d/album/$maj_album_entry\" width=$maj_new_width height=$maj_new_height border=0 hspace=2 vspace=2";
  3147.                                                 }
  3148.                                                 else {
  3149.                                                         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";
  3150.                                                 }
  3151.  
  3152.                                                 if (file_exists("data/items/$maj_d/album/captions/{$maj_album_entry}.txt")) {
  3153.                                                         echo ' alt="';
  3154.                                                         $maj_img_alt = file_get_contents("data/items/$maj_d/album/captions/{$maj_album_entry}.txt");
  3155.                                                         $maj_img_alt = strip_tags($maj_img_alt);
  3156.                                                         echo $maj_img_alt;
  3157.                                                         echo '"';
  3158.                                                 }
  3159.                                                 echo "></a>";
  3160.                                         }
  3161.                                         unset($maj_sort_album);
  3162.                                 }
  3163.                         }
  3164.                 }
  3165.                 echo '</div>';
  3166.  
  3167.                 echo '</td></tr></table>';
  3168.  
  3169.         }
  3170.  
  3171.         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")) {
  3172.  
  3173.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3174.  
  3175.                 echo "<div class=panel_title>Filedrop";
  3176.  
  3177.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3178.                         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>";
  3179.                 }
  3180.                 echo "</div><div class=panel_body>";
  3181.  
  3182.                 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))) {
  3183.                         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.";
  3184.                 }
  3185.                 else {
  3186.  
  3187.                         if ($maj_dh_count = opendir("data/items/$maj_d/filedrop/count")) {
  3188.  
  3189.                                 while (($maj_dl_count = readdir($maj_dh_count)) !== false) {
  3190.  
  3191.                                         if ($maj_dl_count != "." && $maj_dl_count != "..") {
  3192.  
  3193.                                                 $maj_dl_match = substr("$maj_dl_count",0,-4);
  3194.  
  3195.                                                 if (file_exists("data/items/$maj_d/filedrop/count/$maj_dl_count") and !file_exists("data/items/$maj_d/filedrop/files/$maj_dl_match")) {
  3196.                                                         unlink("data/items/$maj_d/filedrop/count/$maj_dl_count");
  3197.                                                 }
  3198.                                         }
  3199.                                 }
  3200.                                 closedir($maj_dh_count);
  3201.                         }
  3202.  
  3203.                         if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
  3204.                                 while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
  3205.                                         if ($maj_dl_file != "." && $maj_dl_file != "..") {
  3206.                                                 $maj_filedrop_files[] = $maj_dl_file;
  3207.                                         }
  3208.                                 }
  3209.                         closedir($maj_dh_filedrop);
  3210.                         }
  3211.  
  3212.                         reset($maj_filedrop_files);
  3213.                         sort($maj_filedrop_files);
  3214.  
  3215.                         foreach ($maj_filedrop_files as $maj_filedrop_file) {
  3216.  
  3217.                                 echo "<table border=0 cellspacing=0 cellpadding=4><tr><td>";
  3218.                                 echo "<a href=\"index.php?entry=$maj_d&download=$maj_filedrop_file&type=filedrop\">";
  3219.                                 echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
  3220.                                 echo "<td><b>$maj_filedrop_file</b>";
  3221.  
  3222.                                 if (file_exists("data/items/$maj_d/filedrop/sha1.txt")) {
  3223.                                         $maj_sha1 = sha1_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
  3224.                                         echo "<br>$maj_sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
  3225.                                 }
  3226.                                 if (file_exists("data/items/$maj_d/filedrop/md5.txt")) {
  3227.                                         $maj_md5 = md5_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
  3228.                                         echo "<br>$maj_md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
  3229.                                 }
  3230.  
  3231.                                 $maj_size = filesize("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
  3232.                                 $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);
  3233.  
  3234.                                 echo "<br>$maj_size_string";
  3235.  
  3236.                                 $maj_filedrop_count_file = "data/items/$maj_d/filedrop/count/$maj_filedrop_file" . '.txt';
  3237.  
  3238.                                 if (file_exists($maj_filedrop_count_file)) {
  3239.                                         $maj_fp_filedrop_count = fopen($maj_filedrop_count_file,"r");
  3240.                                         $maj_filedrop_count = fread($maj_fp_filedrop_count,filesize($maj_filedrop_count_file));
  3241.                                         fclose($maj_fp_filedrop_count);
  3242.                                         echo "<br>$maj_filedrop_count";
  3243.                                
  3244.                                         if ($maj_filedrop_count == 1) {
  3245.                                                 echo " download";
  3246.                                         }
  3247.                                         if ($maj_filedrop_count > 1) {
  3248.                                                 echo " downloads";
  3249.                                         }
  3250.                                 }
  3251.                                 echo "</td></tr></table>";
  3252.                         }
  3253.                 }
  3254.                 echo "</div>";
  3255.  
  3256.                 echo '</td></tr></table>';
  3257.         }
  3258.  
  3259.         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")) {
  3260.  
  3261.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3262.  
  3263.                 echo '<div class="panel_title">PDF';
  3264.                
  3265.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3266.                         echo '<a href=del.php?entry=';
  3267.                         echo $maj_d;
  3268.                         echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
  3269.                 }
  3270.                 echo '</div><div class=panel_body>';
  3271.  
  3272.                 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))) {
  3273.                         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.";
  3274.                 }
  3275.                 else {
  3276.  
  3277.                         if ($maj_dh_pdf = opendir("data/items/$maj_d/pdf/file")) {
  3278.                                 while (($maj_dl_file = readdir($maj_dh_pdf)) !== false) {
  3279.                                         if ($maj_dl_file != "." && $maj_dl_file != "..") {
  3280.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  3281.                                                 echo "<a href=\"index.php?entry=$maj_d&download=$maj_dl_file&type=pdf\">";
  3282.                                                 echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
  3283.                                                 echo '<td><b>';
  3284.                                                 echo $maj_dl_file;
  3285.                                                 echo'</b><br>';
  3286.                                                 $maj_size = filesize("data/items/$maj_d/pdf/file/$maj_dl_file");
  3287.                                                 $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);
  3288.                                                 echo $maj_size_string;
  3289.                                                 $maj_pdf_count_file = "data/items/$maj_d/pdf/count/dl.txt";
  3290.                                                 if (file_exists($maj_pdf_count_file)) {
  3291.                                                         $maj_fp_pdf_count = fopen($maj_pdf_count_file,"r");
  3292.                                                         $maj_pdf_count = fread($maj_fp_pdf_count,filesize($maj_pdf_count_file));
  3293.                                                         fclose($maj_fp_pdf_count);
  3294.                                                         echo '<br>';
  3295.                                                         echo $maj_pdf_count;
  3296.                                                         if ($maj_pdf_count == 1) {
  3297.                                                                 echo ' download';
  3298.                                                         }
  3299.                                                         if ($maj_pdf_count > 1) {
  3300.                                                                 echo ' downloads';
  3301.                                                         }
  3302.                                                 }
  3303.                                                 echo '</td></tr></table>';
  3304.                                         }
  3305.                                 }
  3306.                         closedir($maj_dh_pdf);
  3307.                         }
  3308.                 }
  3309.                 echo '</div>';
  3310.  
  3311.                 echo '</td></tr></table>';
  3312.         }
  3313.  
  3314.         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'])))) {
  3315.  
  3316.                 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))) {
  3317.                 }
  3318.                 else {
  3319.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3320.  
  3321.                         if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
  3322.                                 while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
  3323.                                         if ($maj_live_comment != "." && $maj_live_comment != "..") {
  3324.                                                 $maj_show_comments[] = $maj_live_comment;
  3325.                                         }
  3326.                                 }
  3327.                         closedir($maj_dh_comments);
  3328.                         }
  3329.        
  3330.                         asort($maj_show_comments);
  3331.                         reset($maj_show_comments);
  3332.                         foreach ($maj_show_comments as $maj_comment) {
  3333.  
  3334.                                 echo "<a name=\"$maj_comment\"></a>";
  3335.  
  3336.                                 echo '<div class="panel_title">';
  3337.        
  3338.                                 if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
  3339.                                         echo '<a target=_maj href=';
  3340.                                         readfile("data/items/$maj_d/comments/live/$maj_comment/url.txt");
  3341.                                         echo '>';
  3342.                                 }
  3343.        
  3344.                                 readfile("data/items/$maj_d/comments/live/$maj_comment/firstname.txt");
  3345.                                 echo ' ';
  3346.                                 readfile("data/items/$maj_d/comments/live/$maj_comment/lastname.txt");
  3347.        
  3348.                                 if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
  3349.                                         echo '</a>';
  3350.                                 }
  3351.        
  3352.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3353.                                         echo '  &lt;';
  3354.                                         readfile("data/items/$maj_d/comments/live/$maj_comment/email.txt");
  3355.                                         echo '&gt;';
  3356.                                 }
  3357.        
  3358.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3359.                                         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>';
  3360.                                         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>';
  3361.                                         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>';
  3362.                                         //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>";
  3363.                                 }
  3364.                                 echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  3365.                                
  3366.                                 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")) {
  3367.                                         echo "<td width=85 valign=top>";
  3368.                                         $maj_c_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
  3369.                                         echo "<a href=member.php?id=$maj_c_author>";
  3370.                                         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"))) {
  3371.                                                 if (file_exists("images/avatar.gif")) {
  3372.                                                         $maj_c_avatar_gif_image_size = getimagesize("images/avatar.gif");
  3373.                                                         $maj_c_avatar_gif_image_width = $maj_c_avatar_gif_image_size[0];
  3374.                                                         $maj_c_avatar_gif_image_height = $maj_c_avatar_gif_image_size[1];
  3375.                        
  3376.                                                         $maj_c_max_avatar_gif_image_width = 80;
  3377.                                                
  3378.                                                         if ($maj_c_avatar_gif_image_width > $maj_c_max_avatar_gif_image_width) {  
  3379.  
  3380.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_gif_image_width / $maj_c_avatar_gif_image_width) ;
  3381.                                                                 $maj_c_avatar_gif_image_width = (int) ($maj_c_avatar_gif_image_width * $maj_sizefactor);
  3382.                                                                 $maj_c_avatar_gif_image_height = (int) ($maj_c_avatar_gif_image_height * $maj_sizefactor);
  3383.  
  3384.                                                                 if (file_exists("data/avatar-resize-gif.txt")) {
  3385.  
  3386.                                                                         $maj_c_avatar_gif_image_resize = imagecreatetruecolor($maj_c_avatar_gif_image_width,$maj_c_avatar_gif_image_height);
  3387.  
  3388.                                                                         imagealphablending($maj_c_avatar_gif_image_resize, false);
  3389.                                                                         imagesavealpha($maj_c_avatar_gif_image_resize, true);
  3390.  
  3391.                                                                         $maj_c_avatar_gif_image_original = imagecreatefromgif("images/avatar.gif");
  3392.                                                                         $maj_c_avatar_gif_transparent_index = imagecolortransparent($maj_c_avatar_gif_image_original);
  3393.  
  3394.                                                                         if ($maj_c_avatar_gif_transparent_index >= 0) {
  3395.                                                                                 $maj_c_avatar_gif_transparent_color = imagecolorsforindex($maj_c_avatar_gif_image_original, $maj_c_avatar_gif_transparent_index);
  3396.                                                                                 $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']);
  3397.  
  3398.                                                                                 imagefill($maj_c_avatar_gif_image_resize, 0, 0, $maj_c_avatar_gif_transparent_index);
  3399.                                                                                 imagecolortransparent($maj_c_avatar_gif_image_resize, $maj_c_avatar_gif_transparent_index);
  3400.                                                                         }
  3401.                        
  3402.                                                                         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]);
  3403.  
  3404.                                                                         unlink("images/avatar.gif");
  3405.  
  3406.                                                                         imagegif($maj_c_avatar_gif_image_resize,"images/avatar.gif",100);
  3407.  
  3408.                                                                         imagedestroy($maj_c_avatar_gif_image_resize);
  3409.                                                                         imagedestroy($maj_c_avatar_gif_image_original);
  3410.                                                                 }
  3411.                                                         }
  3412.                        
  3413.                                                         echo "<img src=images/avatar.gif border=0 width=";
  3414.                                                         echo $maj_c_avatar_gif_image_width;
  3415.                                                         echo " height=";
  3416.                                                         echo $maj_c_avatar_gif_image_height;
  3417.                                                 }
  3418.                                                 if (file_exists("images/avatar.jpg")) {
  3419.                                                         $maj_c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  3420.                                                         $maj_c_avatar_jpg_image_width = $maj_c_avatar_jpg_image_size[0];
  3421.                                                         $maj_c_avatar_jpg_image_height = $maj_c_avatar_jpg_image_size[1];
  3422.                                                
  3423.                                                         $maj_c_max_avatar_jpg_image_width = 80;
  3424.                                                
  3425.                                                         if ($maj_c_avatar_jpg_image_width > $maj_c_max_avatar_jpg_image_width) {  
  3426.  
  3427.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_jpg_image_width / $maj_c_avatar_jpg_image_width) ;
  3428.                                                                 $maj_c_avatar_jpg_image_width = (int) ($maj_c_avatar_jpg_image_width * $maj_sizefactor);
  3429.                                                                 $maj_c_avatar_jpg_image_height = (int) ($maj_c_avatar_jpg_image_height * $maj_sizefactor);
  3430.  
  3431.                                                                 if (file_exists("data/avatar-resize-jpg.txt")) {
  3432.  
  3433.                                                                         $maj_c_avatar_jpg_image_resize = imagecreatetruecolor($maj_c_avatar_jpg_image_width,$maj_c_avatar_jpg_image_height);
  3434.                                                                         $maj_c_avatar_jpg_image_original = imagecreatefromjpeg("images/avatar.jpg");
  3435.  
  3436.                                                                         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]);
  3437.  
  3438.                                                                         unlink("images/avatar.jpg");
  3439.  
  3440.                                                                         imagejpeg($maj_c_avatar_jpg_image_resize,"images/avatar.jpg",100);
  3441.  
  3442.                                                                         imagedestroy($maj_c_avatar_jpg_image_resize);
  3443.                                                                         imagedestroy($maj_c_avatar_jpg_image_original);
  3444.                                                                 }
  3445.                                                         }
  3446.                        
  3447.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  3448.                                                         echo $maj_c_avatar_jpg_image_width;
  3449.                                                         echo " height=";
  3450.                                                         echo $maj_c_avatar_jpg_image_height;
  3451.                                                 }
  3452.                                                 if (file_exists("images/avatar.png")) {
  3453.                                                         $maj_c_avatar_png_image_size = getimagesize("images/avatar.png");
  3454.                                                         $maj_c_avatar_png_image_width = $maj_c_avatar_png_image_size[0];
  3455.                                                         $maj_c_avatar_png_image_height = $maj_c_avatar_png_image_size[1];
  3456.                                                
  3457.                                                         $maj_c_max_avatar_png_image_width = 80;
  3458.                                                
  3459.                                                         if ($maj_c_avatar_png_image_width > $maj_c_max_avatar_png_image_width) {  
  3460.  
  3461.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_png_image_width / $maj_c_avatar_png_image_width) ;
  3462.                                                                 $maj_c_avatar_png_image_width = (int) ($maj_c_avatar_png_image_width * $maj_sizefactor);
  3463.                                                                 $maj_c_avatar_png_image_height = (int) ($maj_c_avatar_png_image_height * $maj_sizefactor);
  3464.  
  3465.                                                                 if (file_exists("data/avatar-resize-png.txt")) {
  3466.  
  3467.                                                                         $maj_c_avatar_png_image_resize = imagecreatetruecolor($maj_c_avatar_png_image_width,$maj_c_avatar_png_image_height);
  3468.  
  3469.                                                                         imagealphablending($maj_c_avatar_png_image_resize, false);
  3470.                                                                         imagesavealpha($maj_c_avatar_png_image_resize, true);
  3471.  
  3472.                                                                         $maj_c_avatar_png_image_original = imagecreatefrompng("images/avatar.png");
  3473.  
  3474.                                                                         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]);
  3475.  
  3476.                                                                         unlink("images/avatar.png");
  3477.  
  3478.                                                                         imagepng($maj_c_avatar_png_image_resize,"images/avatar.png",100);
  3479.  
  3480.                                                                         imagedestroy($maj_c_avatar_png_image_resize);
  3481.                                                                         imagedestroy($maj_c_avatar_png_image_original);
  3482.                                                                 }
  3483.                                                         }
  3484.                                                
  3485.                                                         echo "<img src=images/avatar.png border=0 width=";
  3486.                                                         echo $maj_c_avatar_png_image_width;
  3487.                                                         echo " height=";
  3488.                                                         echo $maj_c_avatar_png_image_height;
  3489.                                                 }
  3490.                                         echo "><br>";
  3491.                                         }
  3492.                                         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")) {
  3493.                                                 if (file_exists("images/members/$maj_c_author/avatar.gif")) {
  3494.                                                         $maj_c_avatar_gif_image_size = getimagesize("images/members/$maj_c_author/avatar.gif");
  3495.                                                         $maj_c_avatar_gif_image_width = $maj_c_avatar_gif_image_size[0];
  3496.                                                         $maj_c_avatar_gif_image_height = $maj_c_avatar_gif_image_size[1];
  3497.                        
  3498.                                                         $maj_c_max_avatar_gif_image_width = 80;
  3499.                                                
  3500.                                                         if ($maj_c_avatar_gif_image_width > $maj_c_max_avatar_gif_image_width) {  
  3501.  
  3502.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_gif_image_width / $maj_c_avatar_gif_image_width) ;
  3503.                                                                 $maj_c_avatar_gif_image_width = (int) ($maj_c_avatar_gif_image_width * $maj_sizefactor);
  3504.                                                                 $maj_c_avatar_gif_image_height = (int) ($maj_c_avatar_gif_image_height * $maj_sizefactor);
  3505.  
  3506.                                                                 if (file_exists("data/avatar-resize-gif.txt")) {
  3507.  
  3508.                                                                         $maj_c_avatar_gif_image_resize = imagecreatetruecolor($maj_c_avatar_gif_image_width,$maj_c_avatar_gif_image_height);
  3509.  
  3510.                                                                         imagealphablending($maj_c_avatar_gif_image_resize, false);
  3511.                                                                         imagesavealpha($maj_c_avatar_gif_image_resize, true);
  3512.  
  3513.                                                                         $maj_c_avatar_gif_image_original = imagecreatefromgif("images/members/$maj_c_author/avatar.gif");
  3514.                                                                         $maj_c_avatar_gif_transparent_index = imagecolortransparent($maj_c_avatar_gif_image_original);
  3515.  
  3516.                                                                         if ($maj_c_avatar_gif_transparent_index >= 0) {
  3517.  
  3518.                                                                                 $maj_c_avatar_gif_transparent_color = imagecolorsforindex($maj_c_avatar_gif_image_original, $maj_c_avatar_gif_transparent_index);
  3519.                                                                                 $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']);
  3520.  
  3521.                                                                                 imagefill($maj_c_avatar_gif_image_resize, 0, 0, $maj_c_avatar_gif_transparent_index);
  3522.                                                                                 imagecolortransparent($maj_c_avatar_gif_image_resize, $maj_c_avatar_gif_transparent_index);
  3523.                                                                         }
  3524.  
  3525.                                                                         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]);
  3526.  
  3527.                                                                         unlink("images/members/$maj_c_author/avatar.gif");
  3528.  
  3529.                                                                         imagegif($maj_c_avatar_gif_image_resize,"images/members/$maj_c_author/avatar.gif",100);
  3530.                        
  3531.                                                                         imagedestroy($maj_c_avatar_gif_image_resize);
  3532.                                                                         imagedestroy($maj_c_avatar_gif_image_original);
  3533.                                                                 }
  3534.                                                         }
  3535.                        
  3536.                                                         echo "<img src=images/members/$maj_c_author/avatar.gif border=0 width=";
  3537.                                                         echo $maj_c_avatar_gif_image_width;
  3538.                                                         echo " height=";
  3539.                                                         echo $maj_c_avatar_gif_image_height;
  3540.                                                 }
  3541.                                                 if (file_exists("images/members/$maj_c_author/avatar.jpg")) {
  3542.                                                         $maj_c_avatar_jpg_image_size = getimagesize("images/members/$maj_c_author/avatar.jpg");
  3543.                                                         $maj_c_avatar_jpg_image_width = $maj_c_avatar_jpg_image_size[0];
  3544.                                                         $maj_c_avatar_jpg_image_height = $maj_c_avatar_jpg_image_size[1];
  3545.                                                
  3546.                                                         $maj_c_max_avatar_jpg_image_width = 80;
  3547.                                                
  3548.                                                         if ($maj_c_avatar_jpg_image_width > $maj_c_max_avatar_jpg_image_width) {  
  3549.  
  3550.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_jpg_image_width / $maj_c_avatar_jpg_image_width) ;
  3551.                                                                 $maj_c_avatar_jpg_image_width = (int) ($maj_c_avatar_jpg_image_width * $maj_sizefactor);
  3552.                                                                 $maj_c_avatar_jpg_image_height = (int) ($maj_c_avatar_jpg_image_height * $maj_sizefactor);
  3553.  
  3554.                                                                 if (file_exists("data/avatar-resize-jpg.txt")) {
  3555.  
  3556.                                                                         $maj_c_avatar_jpg_image_resize = imagecreatetruecolor($maj_c_avatar_jpg_image_width,$maj_c_avatar_jpg_image_height);
  3557.                                                                         $maj_c_avatar_jpg_image_original = imagecreatefromjpeg("images/members/$maj_c_author/avatar.jpg");
  3558.  
  3559.                                                                         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]);
  3560.  
  3561.                                                                         unlink("images/members/$maj_c_author/avatar.jpg");
  3562.  
  3563.                                                                         imagejpeg($maj_c_avatar_jpg_image_resize,"images/members/$maj_c_author/avatar.jpg",100);
  3564.  
  3565.                                                                         imagedestroy($maj_c_avatar_jpg_image_resize);
  3566.                                                                         imagedestroy($maj_c_avatar_jpg_image_original);
  3567.                                                                 }
  3568.                                                         }
  3569.                        
  3570.                                                         echo "<img src=images/members/$maj_c_author/avatar.jpg border=0 width=";
  3571.                                                         echo $maj_c_avatar_jpg_image_width;
  3572.                                                         echo " height=";
  3573.                                                         echo $maj_c_avatar_jpg_image_height;
  3574.                                                 }
  3575.                                                 if (file_exists("images/members/$maj_c_author/avatar.png")) {
  3576.                                                         $maj_c_avatar_png_image_size = getimagesize("images/members/$maj_c_author/avatar.png");
  3577.                                                         $maj_c_avatar_png_image_width = $maj_c_avatar_png_image_size[0];
  3578.                                                         $maj_c_avatar_png_image_height = $maj_c_avatar_png_image_size[1];
  3579.                                                
  3580.                                                         $maj_c_max_avatar_png_image_width = 80;
  3581.                                                
  3582.                                                         if ($maj_c_avatar_png_image_width > $maj_c_max_avatar_png_image_width) {  
  3583.  
  3584.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_png_image_width / $maj_c_avatar_png_image_width) ;
  3585.                                                                 $maj_c_avatar_png_image_width = (int) ($maj_c_avatar_png_image_width * $maj_sizefactor);
  3586.                                                                 $maj_c_avatar_png_image_height = (int) ($maj_c_avatar_png_image_height * $maj_sizefactor);
  3587.  
  3588.                                                                 if (file_exists("data/avatar-resize-png.txt")) {
  3589.  
  3590.                                                                         $maj_c_avatar_png_image_resize = imagecreatetruecolor($maj_c_avatar_png_image_width,$maj_c_avatar_png_image_height);
  3591.  
  3592.                                                                         imagealphablending($maj_c_avatar_png_image_resize, false);
  3593.                                                                         imagesavealpha($maj_c_avatar_png_image_resize, true);
  3594.  
  3595.                                                                         $maj_c_avatar_png_image_original = imagecreatefrompng("images/members/$maj_c_author/avatar.png");
  3596.  
  3597.                                                                         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]);
  3598.  
  3599.                                                                         unlink("images/members/$maj_c_author/avatar.png");
  3600.  
  3601.                                                                         imagepng($maj_c_avatar_png_image_resize,"images/members/$maj_c_author/avatar.png",100);
  3602.  
  3603.                                                                         imagedestroy($maj_c_avatar_png_image_resize);
  3604.                                                                         imagedestroy($maj_c_avatar_png_image_original);
  3605.                                                                 }
  3606.                                                         }
  3607.                                                
  3608.                                                         echo "<img src=images/members/$maj_c_author/avatar.png border=0 width=";
  3609.                                                         echo $maj_c_avatar_png_image_width;
  3610.                                                         echo " height=";
  3611.                                                         echo $maj_c_avatar_png_image_height;
  3612.                                                 }
  3613.                                         echo "><br>";
  3614.                                         }
  3615.                                         echo "$maj_c_author</a><br>";
  3616.                                         if ((file_get_contents("data/username.txt") == $maj_c_author) and file_exists("data/rank.txt")) {
  3617.                                                 echo "administrator<br>";
  3618.                                         }
  3619.                                         elseif (file_exists("data/members/active/$maj_c_author/rank.txt") and file_exists("data/rank.txt")) {
  3620.                                                 $maj_c_rank = file_get_contents("data/members/active/$maj_c_author/rank.txt");
  3621.                                                 echo "$maj_c_rank<br>";
  3622.                                         }
  3623.                                         elseif (!file_exists("data/members/active/$maj_c_author/rank.txt") and file_exists("data/rank.txt")) {
  3624.                                                 echo "member<br>";
  3625.                                         }
  3626.                        
  3627.                                         if ($maj_c_dh_posts = opendir("data/items")) {
  3628.                                                 while (($maj_c_entry_posts = readdir($maj_c_dh_posts)) !== false) {
  3629.                        
  3630.                                                         if (file_exists("data/items/$maj_c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  3631.                                                                 continue;
  3632.                                                         }
  3633.                        
  3634.                                                         if (file_exists("data/items/$maj_c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  3635.                                                                 continue;
  3636.                                                         }
  3637.  
  3638.                                                         $maj_private_categories = "0";
  3639.                                
  3640.                                                         if (file_exists("data/items/$maj_entry_c_entry_posts/categories")) {
  3641.                                                        
  3642.                                                                 if ($maj_dh_cat2_c_entry_posts = opendir("data/items/$maj_entry_c_entry_posts/categories")) {
  3643.                                                        
  3644.                                                                         while (($maj_entry_cat2_c_entry_posts = readdir($maj_dh_cat2_c_entry_posts)) !== false) {
  3645.                                                        
  3646.                                                                                 if ($maj_entry_cat2_c_entry_posts != "." && $maj_entry_cat2_c_entry_posts != "..") {
  3647.                                                        
  3648.                                                                                         if (file_exists("data/categories/$maj_entry_cat2_c_entry_posts/private.txt")) {
  3649.                                                                                                 $maj_private_categories = $maj_private_categories + 1;
  3650.                                                                                         }
  3651.                                                                                 }
  3652.                                                                         }
  3653.                                                                         closedir($maj_dh_cat2_c_entry_posts);
  3654.                                                                 }
  3655.                                                         }
  3656.  
  3657.                                                         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")) {
  3658.                                                                 continue;
  3659.                                                         }
  3660.                        
  3661.                                                         if ($maj_c_entry_posts != "." && $maj_c_entry_posts != "..") {
  3662.                                                                 if (file_exists("data/members/active/$maj_c_author") and file_exists("data/bb.txt")) {
  3663.                                                                         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)) {
  3664.                                                                                 $maj_c_items_posts[] = $maj_c_entry_posts;
  3665.                                                                         }
  3666.                                                                 }
  3667.                                                                 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")) {
  3668.                                                                         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)) {
  3669.                                                                                 $maj_c_items_posts[] = $maj_c_entry_posts;
  3670.                                                                         }
  3671.                                                                 }
  3672.                                                         }
  3673.                                                 }
  3674.                                         closedir($maj_c_dh_posts);
  3675.                                         }
  3676.                                         $maj_c_posts = count($maj_c_items_posts);
  3677.                                         if ($maj_c_posts == 1) {
  3678.                                                 echo "$maj_c_posts post";
  3679.                                         }
  3680.                                         if ($maj_c_posts > 1) {
  3681.                                                 echo "$maj_c_posts posts";
  3682.                                         }
  3683.                                         unset($maj_c_items_posts);
  3684.                        
  3685.                                         echo "</td><td width=513 valign=top>";
  3686.                                 }
  3687.                                 else {
  3688.                                         echo "<td width=598 valign=top>";
  3689.                                 }
  3690.  
  3691.                                 echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
  3692.  
  3693.                                 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"))))) {
  3694.                                         $maj_cxavatar_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
  3695.                                         echo "<a href=member.php?id=$maj_cxavatar_author>$maj_cxavatar_author</a> - ";
  3696.                                 }
  3697.  
  3698.                                 entry2date($maj_comment);
  3699.  
  3700.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3701.  
  3702.                                         if (file_exists("data/items/$maj_d/comments/live/$maj_comment/revisions.txt")) {
  3703.                                                 echo '  (Revision ';
  3704.                                                 readfile("data/items/$maj_d/comments/live/$maj_comment/revisions.txt");
  3705.                                                 echo ')';
  3706.                                         }
  3707.                                 }
  3708.  
  3709.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  3710.  
  3711.                                 $maj_entry_comment = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/comment.txt");
  3712.  
  3713.                                 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"))))) {
  3714.                                         $maj_badwords = file_get_contents("data/pf-badwords.txt");
  3715.                                         if (file_exists("data/pf-censor.txt")) {
  3716.                                                 $maj_censor = file_get_contents("data/pf-censor.txt");
  3717.                                         }
  3718.                                         else {
  3719.                                                 $maj_censor = "[expletive]";
  3720.                                         }
  3721.                                         $maj_entry_comment = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_entry_comment);
  3722.                                 }
  3723.                                 echo $maj_entry_comment;
  3724.                                 echo '</tr></table></div>';
  3725.                         }
  3726.                         unset($maj_show_comments);
  3727.                         echo '</td></tr></table>';
  3728.  
  3729.                         if (isset($_SESSION['logged_in'])) {
  3730.  
  3731.                                 if (($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and file_exists("data/comments/unread/$maj_d")) {
  3732.                                         rmdirr("data/comments/unread/$maj_d");
  3733.  
  3734.                                         if (count(glob("data/comments/unread/*")) < 1) {
  3735.                                                 rmdirr("data/comments/unread");
  3736.                                         }
  3737.                                 }
  3738.                                 else {
  3739.                                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_d")) {
  3740.                                                 rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_d");
  3741.  
  3742.                                                 if (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) < 1) {
  3743.                                                         rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread");
  3744.                                                 }
  3745.                                         }
  3746.                                 }
  3747.                         }
  3748.                 }
  3749.  
  3750.                 echo "<a name=\"end\"></a>";
  3751.  
  3752.                 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")) {
  3753.  
  3754.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3755.  
  3756.                         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']}")))) {
  3757.        
  3758.                                 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']))) {
  3759.                                         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>";
  3760.                                 }
  3761.                         }
  3762.  
  3763.                         echo "<font style=\"font-size: $maj_font_Lpx;\"><b>Add Comment</b></font>";
  3764.  
  3765.                         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))) {
  3766.                                 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>";
  3767.                         }
  3768.                         else {
  3769.                                 $maj_captcha_rand = str_rand(7);
  3770.                
  3771.                                 echo "<p>Fill out the form below";
  3772.  
  3773.                                 if (!isset($_SESSION['logged_in'])) {
  3774.                                         echo " and enter <b>$maj_captcha_rand</b> in the CAPTCHA field";
  3775.                                 }
  3776.  
  3777.                                 echo " to add your comment.";
  3778.  
  3779.                                 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")))) {
  3780.                                         echo " Please wait for your comment to be approved and posted.";
  3781.  
  3782.                                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
  3783.                                                 echo " Comments with bogus contact information or spam will be discarded.";
  3784.                                         }
  3785.                                 }
  3786.                                 echo "</p>";
  3787.  
  3788.                                 ?>
  3789.                        
  3790.                                 <table border=0 cellspacing=2 cellpadding=0 width=500>
  3791.                                 <form enctype="multipart/form-data" action="index.php?entry=<?php echo $maj_d; ?>&show=comments" method="post">
  3792.                                 <input type=hidden name=captcha_get value="<?php echo $maj_captcha_rand; ?>">
  3793.                                 <tr>
  3794.  
  3795.                                 <?php
  3796.                                
  3797.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3798.                                
  3799.                                         $maj_logged_in_author = explode(" ",file_get_contents("data/author.txt"));
  3800.                                         $maj_logged_in_author_words = count($maj_logged_in_author);
  3801.                                         $maj_logged_in_author_last = $maj_logged_in_author_words - 1;
  3802.                                        
  3803.                                         if ($maj_logged_in_author_words == 2) {
  3804.                                                
  3805.                                                 $maj_logged_in_author_fname = str_replace(",","",$maj_logged_in_author[0]);
  3806.                                                 $maj_logged_in_author_lname = str_replace(",","",$maj_logged_in_author[1]);                                            
  3807.                                         }
  3808.                                        
  3809.                                         if ($maj_logged_in_author_words > 2) {
  3810.                                        
  3811.                                                 $maj_logged_in_author_mkfname = 0;
  3812.                                        
  3813.                                                 while ($maj_logged_in_author_mkfname < $maj_logged_in_author_last) {
  3814.                                                
  3815.                                                         $maj_logged_in_author_fname .= $maj_logged_in_author[$maj_logged_in_author_mkfname] . " ";
  3816.                                                        
  3817.                                                         $maj_logged_in_author_mkfname = $maj_logged_in_author_mkfname + 1;                                             
  3818.                                                 }
  3819.                                                
  3820.                                                 $maj_logged_in_author_lname = $maj_logged_in_author[$maj_logged_in_author_last];
  3821.                                         }
  3822.  
  3823.                                 ?>
  3824.                                         <td width=75></td><td><input type=hidden name=cauthor value="<?php echo $_SESSION['logged_in']; ?>">
  3825.                                        
  3826.                                         <input type="hidden" name="firstname" value="<?php echo $maj_logged_in_author_fname; ?>"></td>
  3827.  
  3828.                                         <?php
  3829.                                 }
  3830.                                 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")) {
  3831.                                         ?>
  3832.                                         <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>
  3833.                                         <?php
  3834.                                 }
  3835.                                 else {
  3836.                                         ?>
  3837.                                         <td width=75><nobr>First Name*</nobr></td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
  3838.                                         <?php
  3839.                                 }
  3840.                                 ?>
  3841.                                 <td rowspan=7 valign=top width=75 align=right>
  3842.                                 <table border=0 cellspacing=1 cellpadding=2>
  3843.                                 <tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
  3844.                                 <tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
  3845.                                 <tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
  3846.                                 <tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
  3847.                                 <tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
  3848.                                 <tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
  3849.                                 <tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
  3850.                                 <tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
  3851.                                 <tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
  3852.                                 <tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
  3853.                                 </td></tr>
  3854.                                 </table>
  3855.  
  3856.                                 <?php
  3857.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3858.                                         ?>
  3859.                                         <td width=75></td><td><input type=hidden name=lastname value="<?php echo $maj_logged_in_author_lname; ?>"></td>
  3860.                                         <?php
  3861.                                 }
  3862.                                 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")) {
  3863.                                         ?>
  3864.                                         <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>
  3865.                                         <?php
  3866.                                 }
  3867.                                 else {
  3868.                                         ?>
  3869.                                         <tr><td><nobr>Last Name*</nobr></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
  3870.                                         <?php
  3871.                                 }
  3872.  
  3873.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3874.  
  3875.                                         if (file_exists("data/email.txt")) {
  3876.                                                 ?>
  3877.                                                 <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
  3878.                                                 <?php
  3879.                                         }
  3880.                                         else {
  3881.                                                 echo "<tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
  3882.                                         }
  3883.                                 }
  3884.                                 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")) {
  3885.                                         ?>
  3886.                                         <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>
  3887.                                         <?php
  3888.                                 }
  3889.                                 else {
  3890.                                         ?>
  3891.                                         <tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
  3892.                                         <?php
  3893.                                 }
  3894.  
  3895.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3896.                                         ?>
  3897.                                         <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
  3898.                                         <?php
  3899.                                 }
  3900.                                 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")) {
  3901.                                         ?>
  3902.                                         <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>
  3903.                                         <?php
  3904.                                 }
  3905.                                 else {
  3906.                                         ?>
  3907.                                         <tr><td><nobr>Website</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
  3908.                                         <?php
  3909.                                 }
  3910.                                 ?>
  3911.                                 <tr><td><nobr>Comment*</nobr></td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
  3912.                                 <?php
  3913.  
  3914.                                 if (isset($_SESSION['logged_in'])) {
  3915.                                         echo "<input type=hidden name=captcha_put value=\"$maj_captcha_rand\">";
  3916.                                 }
  3917.                                 else {
  3918.                                         echo "<tr><td><nobr>CAPTCHA*</nobr></td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
  3919.                                 }
  3920.  
  3921.                                 ?>
  3922.                                 <tr><td></td><td><input class="click" type="submit" value="click here to submit your comment"></td></tr>
  3923.                                 </form>
  3924.                                 </table>
  3925.                                 <?php
  3926.                         }
  3927.                         ?>
  3928.                         </td></tr></table>
  3929.                         <?php
  3930.                 }
  3931.         }
  3932.  
  3933.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and isset($maj_req_entry) and !empty($maj_req_entry)) {
  3934.        
  3935.                 if ($maj_dh_pending_comments = opendir("data/items/$maj_d/comments/pending")) {
  3936.        
  3937.                         while (($maj_entry_pending_comments = readdir($maj_dh_pending_comments)) !== false) {
  3938.        
  3939.                                 if ($maj_entry_pending_comments != "." && $maj_entry_pending_comments != "..") {
  3940.                                         $maj_show_pending_comments[] = $maj_entry_pending_comments;
  3941.                                 }
  3942.                         }
  3943.                         closedir($maj_dh_pending_comments);
  3944.                 }
  3945.        
  3946.                 asort($maj_show_pending_comments);
  3947.                 reset($maj_show_pending_comments);
  3948.        
  3949.                 $maj_count_pending_comments = count($maj_show_pending_comments);
  3950.  
  3951.                 if ($maj_count_pending_comments > 0) {
  3952.  
  3953.                         echo '<a name="pending"></a>';
  3954.        
  3955.                         if ($maj_count_pending_comments == 1) {
  3956.                                 echo '<p><b>Pending Comment</b></p>';
  3957.                         }
  3958.                         else {
  3959.                                 echo '<p><b>Pending Comments</b></p>';
  3960.                         }
  3961.  
  3962.                         foreach ($maj_show_pending_comments as $maj_pending_comment) {
  3963.  
  3964.                                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3965.        
  3966.                                 echo '<div class="panel_title">';
  3967.        
  3968.                                 if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
  3969.                                         echo '<a target=_maj href=';
  3970.                                         readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt");
  3971.                                         echo '>';
  3972.                                 }
  3973.                
  3974.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/firstname.txt");
  3975.                                 echo ' ';
  3976.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/lastname.txt");
  3977.                
  3978.                                 if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
  3979.                                         echo '</a>';
  3980.                                 }
  3981.                
  3982.                                 echo ' &lt;';
  3983.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/email.txt");
  3984.                                 echo '&gt;';
  3985.        
  3986.                                 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>';
  3987.        
  3988.                                 $maj_pending_comment_key_file = "data/items/$maj_d/comments/pending/$maj_pending_comment/key.txt";
  3989.                                 $maj_open_pending_comment_key_file = fopen($maj_pending_comment_key_file,"r");
  3990.                                 $maj_pending_comment_login_key = fread($maj_open_pending_comment_key_file,filesize($maj_pending_comment_key_file));
  3991.                                 fclose($maj_open_pending_comment_key_file);
  3992.        
  3993.                                 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>";
  3994.        
  3995.                                 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>";
  3996.        
  3997.                                 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>';
  3998.        
  3999.                                 echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  4000.        
  4001.                                 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")) {
  4002.        
  4003.                                         echo "<td width=85 valign=top>";
  4004.        
  4005.                                         $maj_pc_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
  4006.        
  4007.                                         echo "<a href=member.php?id=$maj_pc_author>";
  4008.        
  4009.                                         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"))) {
  4010.        
  4011.                                                 if (file_exists("images/avatar.gif")) {
  4012.                                                         $maj_pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
  4013.                                                         $maj_pc_avatar_gif_image_width = $maj_pc_avatar_gif_image_size[0];
  4014.                                                         $maj_pc_avatar_gif_image_height = $maj_pc_avatar_gif_image_size[1];
  4015.                        
  4016.                                                         $maj_pc_max_avatar_gif_image_width = 80;
  4017.                                                
  4018.                                                         if ($maj_pc_avatar_gif_image_width > $maj_pc_max_avatar_gif_image_width) {  
  4019.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_gif_image_width / $maj_pc_avatar_gif_image_width) ;
  4020.                                                                 $maj_pc_avatar_gif_image_width = (int) ($maj_pc_avatar_gif_image_width * $maj_sizefactor);
  4021.                                                                 $maj_pc_avatar_gif_image_height = (int) ($maj_pc_avatar_gif_image_height * $maj_sizefactor);
  4022.                                                         }
  4023.                        
  4024.                                                         echo "<img src=images/avatar.gif border=0 width=";
  4025.                                                         echo $maj_pc_avatar_gif_image_width;
  4026.                                                         echo " height=";
  4027.                                                         echo $maj_pc_avatar_gif_image_height;
  4028.                                                 }
  4029.        
  4030.                                                 if (file_exists("images/avatar.jpg")) {
  4031.                                                         $maj_pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  4032.                                                         $maj_pc_avatar_jpg_image_width = $maj_pc_avatar_jpg_image_size[0];
  4033.                                                         $maj_pc_avatar_jpg_image_height = $maj_pc_avatar_jpg_image_size[1];
  4034.                                                
  4035.                                                         $maj_pc_max_avatar_jpg_image_width = 80;
  4036.                                                
  4037.                                                         if ($maj_pc_avatar_jpg_image_width > $maj_pc_max_avatar_jpg_image_width) {  
  4038.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_jpg_image_width / $maj_pc_avatar_jpg_image_width) ;
  4039.                                                                 $maj_pc_avatar_jpg_image_width = (int) ($maj_pc_avatar_jpg_image_width * $maj_sizefactor);
  4040.                                                                 $maj_pc_avatar_jpg_image_height = (int) ($maj_pc_avatar_jpg_image_height * $maj_sizefactor);
  4041.                                                         }
  4042.                        
  4043.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  4044.                                                         echo $maj_pc_avatar_jpg_image_width;
  4045.                                                         echo " height=";
  4046.                                                         echo $maj_pc_avatar_jpg_image_height;
  4047.                                                 }
  4048.        
  4049.                                                 if (file_exists("images/avatar.png")) {
  4050.                                                         $maj_pc_avatar_png_image_size = getimagesize("images/avatar.png");
  4051.                                                         $maj_pc_avatar_png_image_width = $maj_pc_avatar_png_image_size[0];
  4052.                                                         $maj_pc_avatar_png_image_height = $maj_pc_avatar_png_image_size[1];
  4053.                                        
  4054.                                                         $maj_pc_max_avatar_png_image_width = 80;
  4055.                                                
  4056.                                                         if ($maj_pc_avatar_png_image_width > $maj_pc_max_avatar_png_image_width) {  
  4057.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_png_image_width / $maj_pc_avatar_png_image_width) ;
  4058.                                                                 $maj_pc_avatar_png_image_width = (int) ($maj_pc_avatar_png_image_width * $maj_sizefactor);
  4059.                                                                 $maj_pc_avatar_png_image_height = (int) ($maj_pc_avatar_png_image_height * $maj_sizefactor);
  4060.                                                         }
  4061.                                                
  4062.                                                         echo "<img src=images/avatar.png border=0 width=";
  4063.                                                         echo $maj_pc_avatar_png_image_width;
  4064.                                                         echo " height=";
  4065.                                                         echo $maj_pc_avatar_png_image_height;
  4066.                                                 }
  4067.                                                 echo "><br>";
  4068.                                         }
  4069.                                         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")) {
  4070.        
  4071.                                                 if (file_exists("images/members/$maj_pc_author/avatar.gif")) {
  4072.                                                         $maj_pc_avatar_gif_image_size = getimagesize("images/members/$maj_pc_author/avatar.gif");
  4073.                                                         $maj_pc_avatar_gif_image_width = $maj_pc_avatar_gif_image_size[0];
  4074.                                                         $maj_pc_avatar_gif_image_height = $maj_pc_avatar_gif_image_size[1];
  4075.                        
  4076.                                                         $maj_pc_max_avatar_gif_image_width = 80;
  4077.                                                
  4078.                                                         if ($maj_pc_avatar_gif_image_width > $maj_pc_max_avatar_gif_image_width) {  
  4079.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_gif_image_width / $maj_pc_avatar_gif_image_width) ;
  4080.                                                                 $maj_pc_avatar_gif_image_width = (int) ($maj_pc_avatar_gif_image_width * $maj_sizefactor);
  4081.                                                                 $maj_pc_avatar_gif_image_height = (int) ($maj_pc_avatar_gif_image_height * $maj_sizefactor);
  4082.                                                         }
  4083.                        
  4084.                                                         echo "<img src=images/members/$maj_pc_author/avatar.gif border=0 width=";
  4085.                                                         echo $maj_pc_avatar_gif_image_width;
  4086.                                                         echo " height=";
  4087.                                                         echo $maj_pc_avatar_gif_image_height;
  4088.                                                 }
  4089.                
  4090.                                                 if (file_exists("images/members/$maj_pc_author/avatar.jpg")) {
  4091.                                                         $maj_pc_avatar_jpg_image_size = getimagesize("images/members/$maj_pc_author/avatar.jpg");
  4092.                                                         $maj_pc_avatar_jpg_image_width = $maj_pc_avatar_jpg_image_size[0];
  4093.                                                         $maj_pc_avatar_jpg_image_height = $maj_pc_avatar_jpg_image_size[1];
  4094.                                                
  4095.                                                         $maj_pc_max_avatar_jpg_image_width = 80;
  4096.                                                
  4097.                                                         if ($maj_pc_avatar_jpg_image_width > $maj_pc_max_avatar_jpg_image_width) {  
  4098.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_jpg_image_width / $maj_pc_avatar_jpg_image_width) ;
  4099.                                                                 $maj_pc_avatar_jpg_image_width = (int) ($maj_pc_avatar_jpg_image_width * $maj_sizefactor);
  4100.                                                                 $maj_pc_avatar_jpg_image_height = (int) ($maj_pc_avatar_jpg_image_height * $maj_sizefactor);
  4101.                                                         }
  4102.                        
  4103.                                                         echo "<img src=images/members/$maj_pc_author/avatar.jpg border=0 width=";
  4104.                                                         echo $maj_pc_avatar_jpg_image_width;
  4105.                                                         echo " height=";
  4106.                                                         echo $maj_pc_avatar_jpg_image_height;
  4107.                                                 }
  4108.                
  4109.                                                 if (file_exists("images/members/$maj_pc_author/avatar.png")) {
  4110.                                                         $maj_pc_avatar_png_image_size = getimagesize("images/members/$maj_pc_author/avatar.png");
  4111.                                                         $maj_pc_avatar_png_image_width = $maj_pc_avatar_png_image_size[0];
  4112.                                                         $maj_pc_avatar_png_image_height = $maj_pc_avatar_png_image_size[1];
  4113.                                                
  4114.                                                         $maj_pc_max_avatar_png_image_width = 80;
  4115.                                                
  4116.                                                         if ($maj_pc_avatar_png_image_width > $maj_pc_max_avatar_png_image_width) {  
  4117.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_png_image_width / $maj_pc_avatar_png_image_width) ;
  4118.                                                                 $maj_pc_avatar_png_image_width = (int) ($maj_pc_avatar_png_image_width * $maj_sizefactor);
  4119.                                                                 $maj_pc_avatar_png_image_height = (int) ($maj_pc_avatar_png_image_height * $maj_sizefactor);
  4120.                                                         }
  4121.                                                
  4122.                                                         echo "<img src=images/members/$maj_pc_author/avatar.png border=0 width=";
  4123.                                                         echo $maj_pc_avatar_png_image_width;
  4124.                                                         echo " height=";
  4125.                                                         echo $maj_pc_avatar_png_image_height;
  4126.                                                 }
  4127.                                                 echo "><br>";
  4128.                                         }
  4129.                                         echo "$maj_pc_author</a><br>";
  4130.  
  4131.                                         if ((file_get_contents("data/username.txt") == $maj_pc_author) and file_exists("data/rank.txt")) {
  4132.                                                 echo "administrator<br>";
  4133.                                         }
  4134.                                         elseif (file_exists("data/members/active/$maj_pc_author/rank.txt") and file_exists("data/rank.txt")) {
  4135.                                                 $maj_pc_rank = file_get_contents("data/members/active/$maj_pc_author/rank.txt");
  4136.                                                 echo "$maj_pc_rank<br>";
  4137.                                         }
  4138.                                         elseif (!file_exists("data/members/active/$maj_pc_author/rank.txt") and file_exists("data/rank.txt")) {
  4139.                                                 echo "member<br>";
  4140.                                         }
  4141.                
  4142.                                         if ($maj_pc_dh_posts = opendir("data/items")) {
  4143.        
  4144.                                                 while (($maj_pc_entry_posts = readdir($maj_pc_dh_posts)) !== false) {
  4145.                        
  4146.                                                         if (file_exists("data/items/$maj_pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4147.                                                                 continue;
  4148.                                                         }
  4149.                        
  4150.                                                         if (file_exists("data/items/$maj_pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  4151.                                                                 continue;
  4152.                                                         }
  4153.        
  4154.                                                         $maj_private_categories = "0";
  4155.        
  4156.                                                         if (file_exists("data/items/$maj_entry_pc_entry_posts/categories")) {
  4157.                                
  4158.                                                                 if ($maj_dh_cat2_pc_entry_posts = opendir("data/items/$maj_entry_pc_entry_posts/categories")) {
  4159.                                
  4160.                                                                         while (($maj_entry_cat2_pc_entry_posts = readdir($maj_dh_cat2_pc_entry_posts)) !== false) {
  4161.                                
  4162.                                                                                 if ($maj_entry_cat2_pc_entry_posts != "." && $maj_entry_cat2_pc_entry_posts != "..") {
  4163.                                
  4164.                                                                                         if (file_exists("data/categories/$maj_entry_cat2_pc_entry_posts/private.txt")) {
  4165.                                                                                                 $maj_private_categories = $maj_private_categories + 1;
  4166.                                                                                         }
  4167.                                                                                 }
  4168.                                                                         }
  4169.                                                                         closedir($maj_dh_cat2_pc_entry_posts);
  4170.                                                                 }
  4171.                                                         }
  4172.        
  4173.                                                         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")) {
  4174.                                                                 continue;
  4175.                                                         }
  4176.                        
  4177.                                                         if ($maj_pc_entry_posts != "." && $maj_pc_entry_posts != "..") {
  4178.                                                                 if (file_exists("data/members/active/$maj_pc_author") and file_exists("data/bb.txt")) {
  4179.                                                                         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)) {
  4180.                                                                                 $maj_pc_items_posts[] = $maj_pc_entry_posts;
  4181.                                                                         }
  4182.                                                                 }
  4183.                                                                 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")) {
  4184.                                                                         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)) {
  4185.                                                                                 $maj_pc_items_posts[] = $maj_pc_entry_posts;
  4186.                                                                         }
  4187.                                                                 }
  4188.                                                         }
  4189.                                                 }
  4190.                                                 closedir($maj_pc_dh_posts);
  4191.                                         }
  4192.                                         $maj_pc_posts = count($maj_pc_items_posts);
  4193.                                         if ($maj_pc_posts == 1) {
  4194.                                                 echo "$maj_pc_posts post";
  4195.                                         }
  4196.                                         if ($maj_pc_posts > 1) {
  4197.                                                 echo "$maj_pc_posts posts";
  4198.                                         }
  4199.                                         unset($maj_pc_items_posts);
  4200.                        
  4201.                                         echo "</td><td width=513 valign=top>";
  4202.                                 }
  4203.                                 else {
  4204.                                         echo "<td width=598 valign=top>";
  4205.                                 }
  4206.        
  4207.                                 echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
  4208.        
  4209.                                 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"))))) {
  4210.                                         $maj_pxavatar_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
  4211.                                         echo "<a href=member.php?id=$maj_pxavatar_author>$maj_pxavatar_author</a> - ";
  4212.                                 }
  4213.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/timestamp.txt");
  4214.        
  4215.                                 if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt")) {
  4216.                                         echo '  (Revision ';
  4217.                                         readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt");
  4218.                                         echo ')';
  4219.                                 }
  4220.        
  4221.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  4222.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/comment.txt");
  4223.                                 echo '</tr></table></div>';
  4224.        
  4225.                                 unset($maj_show_pending_comments);
  4226.                                 echo '</td></tr></table>';
  4227.                         }
  4228.                 }
  4229.         }
  4230. }
  4231.  
  4232. if ($maj_count_bottom_panels > 0) {
  4233.  
  4234.         foreach ($maj_bottom_panels as $maj_bottom_panel) {
  4235.  
  4236.                 if (!file_exists("data/panels/$maj_bottom_panel/free.txt")) {
  4237.  
  4238.                         if (file_exists("data/panels/$maj_bottom_panel/border.txt")) {
  4239.                                 $maj_bottom_panel_border = file_get_contents("data/panels/$maj_bottom_panel/border.txt");
  4240.                         }
  4241.                         else {
  4242.                                 if (isset($maj_bottom_panel_border)) {
  4243.                                         unset($maj_bottom_panel_border);
  4244.                                 }
  4245.                         }
  4246.  
  4247.                         if (file_exists("data/panels/$maj_bottom_panel/bgcolor-t.txt")) {
  4248.                                 $maj_bottom_panel_bgcolor_t = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-t.txt");
  4249.                         }
  4250.                         else {
  4251.                                 if (isset($maj_bottom_panel_bgcolor_t)) {
  4252.                                         unset($maj_bottom_panel_bgcolor_t);
  4253.                                 }
  4254.                         }
  4255.  
  4256.                         if (file_exists("data/panels/$maj_bottom_panel/bgcolor-c.txt")) {
  4257.                                 $maj_bottom_panel_bgcolor_c = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-c.txt");
  4258.                         }
  4259.                         else {
  4260.                                 if (isset($maj_bottom_panel_bgcolor_c)) {
  4261.                                         unset($maj_bottom_panel_bgcolor_c);
  4262.                                 }
  4263.                         }
  4264.  
  4265.                         if (file_exists("data/panels/$maj_bottom_panel/text-t.txt")) {
  4266.                                 $maj_bottom_panel_text_t = file_get_contents("data/panels/$maj_bottom_panel/text-t.txt");
  4267.                         }
  4268.                         else {
  4269.                                 if (isset($maj_bottom_panel_text_t)) {
  4270.                                         unset($maj_bottom_panel_text_t);
  4271.                                 }
  4272.                         }
  4273.  
  4274.                         if (file_exists("data/panels/$maj_bottom_panel/text-c.txt")) {
  4275.                                 $maj_bottom_panel_text_c = file_get_contents("data/panels/$maj_bottom_panel/text-c.txt");
  4276.                         }
  4277.                         else {
  4278.                                 if (isset($maj_bottom_panel_text_c)) {
  4279.                                         unset($maj_bottom_panel_text_c);
  4280.                                 }
  4281.                         }
  4282.  
  4283.                         echo '<div class="panel_title"';
  4284.  
  4285.                         if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_t) or isset($maj_bottom_panel_text_t)) {
  4286.                                 echo ' style="';
  4287.                         }
  4288.  
  4289.                         if (isset($maj_bottom_panel_bgcolor_t)) {
  4290.                                 echo "background-color: $maj_bottom_panel_bgcolor_t;";
  4291.                         }
  4292.  
  4293.                         if (isset($maj_bottom_panel_text_t)) {
  4294.                                 echo "color: $maj_bottom_panel_text_t;";
  4295.                         }
  4296.  
  4297.                         if (isset($maj_bottom_panel_border)) {
  4298.                                 echo "border-color: $maj_bottom_panel_border;";
  4299.                         }
  4300.  
  4301.                         if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_t) or isset($maj_bottom_panel_text_t)) {
  4302.                                 echo '"';
  4303.                         }
  4304.  
  4305.                         echo '>';
  4306.  
  4307.                         readfile("data/panels/$maj_bottom_panel/title.txt");
  4308.  
  4309.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4310.                                 echo "<a href=\"panels.php#{$maj_bottom_panel}\">";
  4311.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  4312.                         }
  4313.  
  4314.                         if (file_exists("data/panels/$maj_bottom_panel/private.txt")) {
  4315.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  4316.                         }
  4317.  
  4318.                         echo '</div>';
  4319.  
  4320.                         echo '<div class="panel_body"';
  4321.  
  4322.                         if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_c) or isset($maj_bottom_panel_text_c)) {
  4323.                                 echo ' style="';
  4324.                         }
  4325.  
  4326.                         if (isset($maj_bottom_panel_bgcolor_c)) {
  4327.                                 echo "background-color: $maj_bottom_panel_bgcolor_c;";
  4328.                         }
  4329.  
  4330.                         if (isset($maj_bottom_panel_text_c)) {
  4331.                                 echo "color: $maj_bottom_panel_text_c;";
  4332.                         }
  4333.  
  4334.                         if (isset($maj_bottom_panel_border)) {
  4335.                                 echo "border-color: $maj_bottom_panel_border;";
  4336.                         }
  4337.  
  4338.                         if (isset($maj_bottom_panel_border) or isset($maj_bottom_panel_bgcolor_c) or isset($maj_bottom_panel_text_c)) {
  4339.                                 echo '"';
  4340.                         }
  4341.  
  4342.                         echo '>';
  4343.                 }
  4344.  
  4345.                 if (file_exists("data/panels/$maj_bottom_panel/free.txt")) {
  4346.                         echo '<div class=panel_free>';
  4347.                 }
  4348.  
  4349.                 include("data/panels/$maj_bottom_panel/panel.php");
  4350.  
  4351.                 echo '</div>';
  4352.  
  4353.                 if (file_exists("data/panels/$maj_bottom_panel/free.txt") and !file_exists("data/panels/$maj_bottom_panel/nomargin.txt")) {
  4354.                         echo "<div style=\"height:10px;\"></div>";
  4355.                 }
  4356.         }
  4357. }
  4358.  
  4359. ?>
  4360.  
  4361. <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
  4362.  
  4363. <?php
  4364.  
  4365. if (($maj_start >= $maj_increase) and ($maj_start != 0)) {
  4366.  
  4367.         echo "<td align=left><a href=\"index.php?";
  4368.  
  4369.         if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
  4370.                 echo "category=$maj_req_category";
  4371.         }
  4372.  
  4373.         if (isset($maj_req_archive) and !empty($maj_req_archive)) {
  4374.                 echo "archive=$maj_req_archive";
  4375.         }
  4376.  
  4377.         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")) {
  4378.                 echo "author=$maj_req_author";
  4379.         }
  4380.  
  4381.         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")) {
  4382.                 echo "author=$maj_req_author";
  4383.         }
  4384.  
  4385.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "private")) {
  4386.                 echo "find=private";
  4387.         }
  4388.  
  4389.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "member")) {
  4390.                 echo "find=member";
  4391.         }
  4392.  
  4393.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "unfiled")) {
  4394.                 echo "find=unfiled";
  4395.         }
  4396.  
  4397.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "passwd")) {
  4398.                 echo "find=passwd";
  4399.         }
  4400.  
  4401.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "comments")) {
  4402.                 echo "find=comments";
  4403.         }
  4404.  
  4405.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "album")) {
  4406.                 echo "find=album";
  4407.         }
  4408.  
  4409.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "filedrop")) {
  4410.                 echo "find=filedrop";
  4411.         }
  4412.  
  4413.         echo "&start=" . ($maj_start-$maj_increase) . "\">previous</a></td>";
  4414. }
  4415.  
  4416. if ($maj_end < sizeof($maj_items)) {
  4417.  
  4418.         echo "<td align=right><a href=\"index.php?";
  4419.  
  4420.         if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
  4421.                 echo "category=$maj_req_category";
  4422.         }
  4423.         if (isset($maj_req_archive) and !empty($maj_req_archive)) {
  4424.                 echo "archive=$maj_req_archive";
  4425.         }
  4426.         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")) {
  4427.                 echo "author=$maj_req_author";
  4428.         }
  4429.         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")) {
  4430.                 echo "author=$maj_req_author";
  4431.         }
  4432.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "private")) {
  4433.                 echo "find=private";
  4434.         }
  4435.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "member")) {
  4436.                 echo "find=member";
  4437.         }
  4438.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "unfiled")) {
  4439.                 echo "find=unfiled";
  4440.         }
  4441.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "passwd")) {
  4442.                 echo "find=passwd";
  4443.         }
  4444.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "comments")) {
  4445.                 echo "find=comments";
  4446.         }
  4447.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "album")) {
  4448.                 echo "find=album";
  4449.         }
  4450.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "filedrop")) {
  4451.                 echo "find=filedrop";
  4452.         }
  4453.         echo "&start=" . ($maj_start+$maj_increase) . "\">next</a></td>";
  4454. }
  4455.  
  4456. // right side
  4457.  
  4458. echo "</tr></table></td><td width=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td><td width=\"$maj_wside\" valign=\"top\">";
  4459.  
  4460. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4461.         if ($maj_dh_pending_comment_flags = opendir("data/comments/pending")) {
  4462.                 while (($maj_entry_pending_comment_flags = readdir($maj_dh_pending_comment_flags)) !== false) {
  4463.                         if ($maj_entry_pending_comment_flags != "." && $maj_entry_pending_comment_flags != "..") {
  4464.                                 $maj_show_pending_comment_flags[] = $maj_entry_pending_comment_flags;
  4465.                         }
  4466.                 }
  4467.                 closedir($maj_dh_pending_comment_flags);
  4468.         }
  4469.  
  4470.         rsort($maj_show_pending_comment_flags);
  4471.         reset($maj_show_pending_comment_flags);
  4472.         $maj_count_pending_comment_flags = count($maj_show_pending_comment_flags);
  4473.  
  4474.         if (($maj_count_latest > 0) and ($maj_count_pending_comment_flags > 0)) {
  4475.  
  4476.                 echo '<div class="panel_title">Pending Comments</div>';
  4477.                
  4478.                 echo '<div class="panel_body">';
  4479.  
  4480.                 if ($maj_dh_list_pending_comment_flags = opendir("data/comments/pending")) {
  4481.  
  4482.                         while (($maj_entry_list_pending_comment_flags = readdir($maj_dh_list_pending_comment_flags)) !== false) {
  4483.  
  4484.                                 if ($maj_entry_list_pending_comment_flags != "." && $maj_entry_list_pending_comment_flags != "..") {
  4485.  
  4486.                                         echo "<a href=\"index.php?entry=$maj_entry_list_pending_comment_flags&show=comments#pending\">";
  4487.                                         readfile("data/items/$maj_entry_list_pending_comment_flags/title.txt");
  4488.                                         echo "</a><br><font style=\"font-size: $maj_font_Spx; color: #999999;\">";
  4489.                                         $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt","r");
  4490.                                         $maj_comment_count_value = fread($maj_fp_comment_count_txt,filesize("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt"));
  4491.                                         fclose($maj_fp_comment_count_txt);
  4492.  
  4493.                                         if ($maj_comment_count_value == 1) {
  4494.                                                 echo ' ( ' . $maj_comment_count_value . ' comment ) ';
  4495.                                         }
  4496.                                         elseif ($maj_comment_count_value > 1) {
  4497.                                                 echo ' ( ' . $maj_comment_count_value . ' comments ) ';
  4498.                                         }
  4499.                                         else {
  4500.                                                 echo '';
  4501.                                         }
  4502.                                         echo '</font><br>';
  4503.                                 }
  4504.                         }
  4505.                         closedir($maj_dh_list_pending_comment_flags);
  4506.                 }
  4507.                 echo '</div>';
  4508.         }
  4509. }
  4510.  
  4511. if (!file_exists("data/xucomment.txt") and isset($_SESSION['logged_in'])) {
  4512.  
  4513.         if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
  4514.  
  4515.                 if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
  4516.                        
  4517.                         if ($maj_dh_unread_comments = opendir("data/comments/unread")) {
  4518.                        
  4519.                                 while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
  4520.                        
  4521.                                         if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
  4522.  
  4523.                                                 if (!file_exists("data/items/$maj_unread_comment")) {
  4524.                                                         rmdirr("data/comments/unread/$maj_unread_comment");
  4525.                                                 }
  4526.                                                 else {
  4527.                                                         $maj_unread_comments[] = $maj_unread_comment;
  4528.                                                 }
  4529.                                         }
  4530.                                 }
  4531.                         closedir($maj_dh_unread_comments);
  4532.                         }
  4533.                 }
  4534.         }
  4535.         else {
  4536.                 if (file_exists("data/members/active/{$_SESSION['logged_in']}")) {
  4537.  
  4538.                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread") and (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) > 0)) {
  4539.                        
  4540.                                 if ($maj_dh_unread_comments = opendir("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
  4541.                        
  4542.                                         while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
  4543.                        
  4544.                                                 if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
  4545.  
  4546.                                                         if (!file_exists("data/items/$maj_unread_comment")) {
  4547.                                                                 rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_unread_comment");
  4548.                                                         }
  4549.                                                         else {
  4550.                                                                 $maj_unread_comments[] = $maj_unread_comment;
  4551.                                                         }
  4552.                                                 }
  4553.                                         }
  4554.                                 closedir($maj_dh_unread_comments);
  4555.                                 }
  4556.                         }
  4557.                 }
  4558.         }
  4559.  
  4560.         sort($maj_unread_comments);
  4561.         reset($maj_unread_comments);
  4562.  
  4563.         if (count($maj_unread_comments) > 0) {
  4564.  
  4565.                 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>';
  4566.                 echo '<div class="panel_body"><table border="0" cellspacing="0" cellpadding="0" width="100%">';
  4567.  
  4568.                 foreach ($maj_unread_comments as $maj_unread_comment) {
  4569.                
  4570.                         $maj_unread_comment_title = file_get_contents("data/items/$maj_unread_comment/title.txt");
  4571.  
  4572.                         echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$maj_unread_comment&show=comments\">$maj_unread_comment_title</a></td></tr>";
  4573.                 }
  4574.  
  4575.                 echo '</table></div>';
  4576.         }
  4577. }
  4578.  
  4579. 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")) {
  4580.         if ($maj_dh_pending_list = opendir("data/members/confirmed")) {
  4581.                 while (($maj_entry_pending_list = readdir($maj_dh_pending_list)) !== false) {
  4582.  
  4583.                         if ($maj_entry_pending_list != "." && $maj_entry_pending_list != "..") {
  4584.                                 $maj_show_pending_list[] = $maj_entry_pending_list;
  4585.                         }
  4586.                 }
  4587.                 closedir($maj_dh_pending_list);
  4588.         }
  4589.  
  4590.         sort($maj_show_pending_list);
  4591.         reset($maj_show_pending_list);
  4592.         $maj_count_pending_list = count($maj_show_pending_list);
  4593.        
  4594.         if ($maj_count_pending_list > 0) {
  4595.  
  4596.                 echo '<div class="panel_title">Pending Member';
  4597.                
  4598.                 if ($maj_count_pending_list > 1) {
  4599.                         echo "s";
  4600.                 }
  4601.                 echo "</div><div class=panel_body>Please approve or deny $maj_count_pending_list pending membership request";
  4602.                 if ($maj_count_pending_list > 1) {
  4603.                         echo "s";
  4604.                 }
  4605.                 echo " below.</div>";
  4606.  
  4607.                 foreach ($maj_show_pending_list as $maj_pending_list_entry) {
  4608.  
  4609.                         echo '<div class="panel_title">';
  4610.                         echo "$maj_pending_list_entry";
  4611.                         echo '<a href=reg.php?username=';
  4612.                         echo $maj_pending_list_entry;
  4613.                         echo '&key=';
  4614.                         readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
  4615.                         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=';
  4616.                         echo $maj_pending_list_entry;
  4617.                         echo '&key=';
  4618.                         readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
  4619.                         echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
  4620.                         echo "<div class=panel_body>";
  4621.                         if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
  4622.                                 echo "<a href=\"";
  4623.                                 readfile("data/members/confirmed/$maj_pending_list_entry/url.txt");
  4624.                                 echo "\" target=_pending>";
  4625.                         }
  4626.                         readfile("data/members/confirmed/$maj_pending_list_entry/firstname.txt");
  4627.                         echo "&nbsp;";
  4628.                         readfile("data/members/confirmed/$maj_pending_list_entry/lastname.txt");
  4629.                         if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
  4630.                                 echo "</a>";
  4631.                         }
  4632.                         echo "<br>";
  4633.                         $maj_pending_email = file_get_contents("data/members/confirmed/$maj_pending_list_entry/email.txt");
  4634.                         $maj_pending_email = wordwrap($maj_pending_email,30);
  4635.                         echo $maj_pending_email;
  4636.                         if (file_exists("data/members/confirmed/$maj_pending_list_entry/timestamp.txt")) {
  4637.                                 $maj_confirmed = file_get_contents("data/members/confirmed/$maj_pending_list_entry/timestamp.txt");
  4638.                                 $maj_confirmed_year = substr($maj_confirmed,0,4);
  4639.                                 $maj_confirmed_month = substr($maj_confirmed,4,2);
  4640.                                 $maj_confirmed_day = substr($maj_confirmed,6,2);
  4641.                                 $maj_confirmed_hh = substr($maj_confirmed,8,2);
  4642.                                 $maj_confirmed_mm = substr($maj_confirmed,10,2);
  4643.                                 $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));
  4644.                                 echo "<br>$maj_email_confirmed";
  4645.                         }
  4646.                         echo "</div>";
  4647.                 }
  4648.         }
  4649. }
  4650.  
  4651. if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
  4652.  
  4653.         echo '<div class="panel_title">Bulletin Board</div>';
  4654.        
  4655.         echo "<div class=panel_body>";
  4656.  
  4657.         if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
  4658.                 if ($maj_dh_active_list = opendir("data/members/active")) {
  4659.                         while (($maj_entry_active_list = readdir($maj_dh_active_list)) !== false) {
  4660.                                 if ($maj_entry_active_list != "." && $maj_entry_active_list != "..") {
  4661.                                         $maj_show_active_list[] = $maj_entry_active_list;
  4662.                                 }
  4663.                         }
  4664.                 closedir($maj_dh_active_list);
  4665.                 }
  4666.  
  4667.                 sort($maj_show_active_list);
  4668.                 reset($maj_show_active_list);
  4669.                 $maj_count_active_list = count($maj_show_active_list);
  4670.                 if ($maj_count_active_list > 0) {
  4671.                         echo "Registered Members: $maj_count_active_list";
  4672.                 }
  4673.         }
  4674.  
  4675.         if (file_exists("data/items")) {
  4676.                 if ($maj_dh_mempost_list = opendir("data/items")) {
  4677.                         while (($maj_entry_mempost_list = readdir($maj_dh_mempost_list)) !== false) {
  4678.  
  4679.                                 if (file_exists("data/items/$maj_entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4680.                                         continue;
  4681.                                 }
  4682.  
  4683.                                 $maj_private_categories = "0";
  4684.  
  4685.                                 if (file_exists("data/items/$maj_entry_mempost_list/categories")) {
  4686.                        
  4687.                                         if ($maj_dh_entry_categories_mempost_list = opendir("data/items/$maj_entry_mempost_list/categories")) {
  4688.                        
  4689.                                                 while (($maj_entry_category_mempost_list = readdir($maj_dh_entry_categories_mempost_list)) !== false) {
  4690.                        
  4691.                                                         if ($maj_entry_category_mempost_list != "." && $maj_entry_category_mempost_list != "..") {
  4692.                        
  4693.                                                                 if (file_exists("data/categories/$maj_entry_category_mempost_list/private.txt")) {
  4694.                                                                         $maj_private_categories = $maj_private_categories + 1;
  4695.                                                                 }
  4696.                                                         }
  4697.                                                 }
  4698.                                                 closedir($maj_dh_entry_categories_mempost_list);
  4699.                                         }
  4700.                                 }
  4701.  
  4702.                                 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")) {
  4703.                                         continue;
  4704.                                 }
  4705.        
  4706.                                 if ($maj_entry_mempost_list != "." && $maj_entry_mempost_list != "..") {
  4707.                                         $maj_entry_mempost_list = substr("$maj_entry_mempost_list",0,6);
  4708.                                         $maj_show_mempost_list[] = $maj_entry_mempost_list;
  4709.                                 }
  4710.                         }
  4711.                         closedir($maj_dh_mempost_list);
  4712.                 }
  4713.                 rsort($maj_show_mempost_list);
  4714.                 $maj_count_mempost_list = count($maj_show_mempost_list);
  4715.                 echo "<br>Total Posts: $maj_count_mempost_list";
  4716.                 unset($maj_show_mempost_list);
  4717.         }
  4718.  
  4719.         if (file_exists("data/bb-new.txt")) {
  4720.                 $maj_bb_new = file_get_contents("data/bb-new.txt");
  4721.                 echo "<br>Newest User: <a href=member.php?id=$maj_bb_new>$maj_bb_new</a>";
  4722.         }
  4723.         if (file_exists("data/bb-last.txt")) {
  4724.                 $maj_bb_last = file_get_contents("data/bb-last.txt");
  4725.                 echo "<br>Latest Login: <a href=member.php?id=$maj_bb_last>$maj_bb_last</a>";
  4726.         }
  4727.         echo "</div>";
  4728. }
  4729.  
  4730. if (($maj_count_grand > 0) and (!file_exists("data/xsearch.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
  4731.        
  4732.         echo '<div class="panel_title">';
  4733.  
  4734.         ?>
  4735.  
  4736.         Search</div>
  4737.         <form enctype="multipart/form-data" action="dig.php" method="post">
  4738.         <div class="panel_body">
  4739.         <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
  4740.         </form>
  4741.         </div>
  4742.  
  4743.         <?php
  4744. }
  4745.  
  4746.  
  4747. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4748.  
  4749.         echo '<div class="panel_title">Find Entries</div>';
  4750.        
  4751.         echo "<div class=panel_body>";
  4752.         echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
  4753.         if (file_exists("data/bb.txt")) {
  4754.                 echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
  4755.         }
  4756.         echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
  4757.         echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
  4758.         echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
  4759.         echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
  4760.         echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
  4761.         echo "</div>";
  4762. }
  4763.  
  4764. if (file_exists("data/categories")) {
  4765.         if ($maj_dh_categories = opendir("data/categories")) {
  4766.                 while (($maj_entry_categories = readdir($maj_dh_categories)) !== false) {
  4767.  
  4768.                         if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4769.                                 continue;
  4770.                         }
  4771.  
  4772.                         if (file_exists("data/categories/$maj_entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4773.                                 continue;
  4774.                         }
  4775.  
  4776.                         if ($maj_entry_categories != "." && $maj_entry_categories != "..") {
  4777.                                 $maj_show_categories[] = $maj_entry_categories;
  4778.                         }
  4779.                 }
  4780.                 closedir($maj_dh_categories);
  4781.         }
  4782.  
  4783.         sort($maj_show_categories);
  4784.         reset($maj_show_categories);
  4785.         $maj_count_categories = count($maj_show_categories);
  4786.  
  4787.         if ($maj_count_categories > 0) {
  4788.  
  4789.                 echo '<div class="panel_title">Categories</div>';
  4790.                
  4791.                 echo '<div class=panel_body>';
  4792.  
  4793.                 foreach ($maj_show_categories as $maj_category) {
  4794.  
  4795.                         echo "<a class=\"navlink\" href=\"index.php?category=$maj_category\">";
  4796.  
  4797.                         if (file_exists("data/categories/$maj_category/title.txt")) {
  4798.                                 $maj_category_title = file_get_contents("data/categories/$maj_category/title.txt");
  4799.                         }
  4800.                         else {
  4801.                                 $maj_category_title = ucfirst(str_replace("_"," ",$maj_category));
  4802.                         }
  4803.  
  4804.                         echo $maj_category_title;
  4805.                         echo "</a><br>";
  4806.                 }
  4807.  
  4808.                 echo '</div>';
  4809.         }
  4810. }
  4811.  
  4812. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4813.  
  4814.         echo '<div class="panel_title">Statistics</div>';
  4815.        
  4816.         echo '<div class=panel_body>';
  4817.         echo "Total Entries: $maj_count_latest";
  4818.         if (file_exists("data/hits.txt")) {
  4819.                 echo '<br>Site Hits: ';
  4820.                 readfile("data/hits.txt");
  4821.         }
  4822.         if (file_exists("data/google.txt")) {
  4823.                 echo '<br>Google Visits: ';
  4824.                 readfile("data/google.txt");
  4825.         }
  4826.         if (file_exists("data/rss-0.91.txt")) {
  4827.                 echo '<br>RSS 0.91 Hits: ';
  4828.                 readfile("data/rss-0.91.txt");
  4829.         }
  4830.         if (file_exists("data/rss-1.0.txt")) {
  4831.                 echo '<br>RSS 1.0 Hits: ';
  4832.                 readfile("data/rss-1.0.txt");
  4833.         }
  4834.         if (file_exists("data/rss-2.0.txt")) {
  4835.                 echo '<br>RSS 2.0 Hits: ';
  4836.                 readfile("data/rss-2.0.txt");
  4837.         }
  4838.         if (file_exists("data/sitemap.txt")) {
  4839.                 echo '<br>Sitemap Requests: ';
  4840.                 readfile("data/sitemap.txt");
  4841.         }
  4842.  
  4843.         echo '</div>';
  4844. }
  4845.  
  4846. 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")))) {
  4847.  
  4848.         echo '<div class="panel_title">Recent Entries</div>';
  4849.        
  4850.         echo '<div class=panel_body>';
  4851.  
  4852.         $maj_increment_recent_entries = "0";
  4853.  
  4854.         if ($maj_count_latest < 10) {
  4855.                 $maj_max_recent_entries = $maj_count_latest;
  4856.         }
  4857.         else {
  4858.                 $maj_max_recent_entries = "10";
  4859.         }
  4860.  
  4861.         while ($maj_increment_recent_entries < $maj_max_recent_entries) {
  4862.  
  4863.                 echo "<a class=\"navlink\" href=\"index.php?entry=$maj_latest[$maj_increment_recent_entries]\">";
  4864.                 readfile("data/items/$maj_latest[$maj_increment_recent_entries]/title.txt");
  4865.                 echo "</a><br>";
  4866.  
  4867.                 $maj_increment_recent_entries = $maj_increment_recent_entries + 1;
  4868.         }
  4869.  
  4870.         echo '</div>';
  4871. }
  4872.  
  4873. if ($maj_count_albums > 0) {
  4874.  
  4875.         echo "<div class=\"panel_title\">Albums</div>";
  4876.        
  4877.         echo "<div class=\"panel_body\">";
  4878.  
  4879.         foreach ($maj_albums as $maj_album) {
  4880.                 echo "<a class=\"navlink\" href=\"index.php?entry=$maj_album&show=album\">";
  4881.                 readfile("data/items/$maj_album/title.txt");
  4882.                 echo "</a><br>";
  4883.         }
  4884.         echo '</div>';
  4885. }
  4886.  
  4887. if (!file_exists("data/xrand.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4888.        
  4889.         shuffle($maj_random);
  4890.         reset($maj_random);
  4891.  
  4892.         if (file_exists("data/increase.txt")) {
  4893.                 $maj_limit_random = file_get_contents("data/increase.txt");
  4894.         }
  4895.         else {
  4896.                 $maj_limit_random = 5;
  4897.         }
  4898.        
  4899.         if ($maj_count_random > $maj_limit_random) {
  4900.        
  4901.                 echo '<div class="panel_title">Random Entries</div>';
  4902.                
  4903.                 echo "<div class=\"panel_body\">";
  4904.        
  4905.                 $maj_increment_random = 0;
  4906.        
  4907.                 if ($maj_count_random <= $maj_limit_random * 2) {
  4908.                         $maj_show_random = $maj_count_random - 1;
  4909.                 }
  4910.                 else {
  4911.                         $maj_show_random = $maj_limit_random * 2 - 1;
  4912.                 }
  4913.        
  4914.                 while ($maj_increment_random <= $maj_show_random) {
  4915.                         echo "<a class=\"navlink\" href=\"index.php?entry={$maj_random[$maj_increment_random]}\">";
  4916.                         readfile("data/items/$maj_random[$maj_increment_random]/title.txt");
  4917.                         echo "</a><br>";
  4918.        
  4919.                         $maj_increment_random = $maj_increment_random + 1;
  4920.                 }
  4921.         }
  4922.        
  4923.         if ($maj_count_random > $maj_limit_random) {
  4924.                 echo "</div>"; 
  4925.         }
  4926. }
  4927. ?>
  4928.  
  4929.  
  4930. <?php
  4931.  
  4932. 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")))) {
  4933.  
  4934.         $maj_archive_entries = implode(" ",$maj_archives);
  4935.  
  4936.         $maj_unique_archive_list = array_unique($maj_archives);
  4937.  
  4938.         echo "<div class=\"panel_title\">Archives ($maj_count_archives)</div>";
  4939.         echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
  4940.  
  4941.         foreach ($maj_unique_archive_list as $maj_archive_list_entry) {
  4942.  
  4943.                 $maj_archive_list_value = substr($maj_archive_list_entry,0,6);
  4944.                 $maj_archive_list_year = substr($maj_archive_list_entry,0,4);
  4945.                 $maj_archive_list_month = substr($maj_archive_list_entry,4,2);
  4946.                 $maj_archive_list_month = date("F",mktime(0,0,0,$maj_archive_list_month));
  4947.                 $maj_archive_list_num = substr_count($maj_archive_entries,$maj_archive_list_entry);
  4948.  
  4949.                 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>";
  4950.         }
  4951.         echo "</table></div>";
  4952. }
  4953.  
  4954. if ($maj_count_right_panels > 0) {
  4955.  
  4956.         foreach ($maj_right_panels as $maj_right_panel) {
  4957.  
  4958.                 if (!file_exists("data/panels/$maj_right_panel/free.txt")) {
  4959.  
  4960.                         if (file_exists("data/panels/$maj_right_panel/border.txt")) {
  4961.                                 $maj_right_panel_border = file_get_contents("data/panels/$maj_right_panel/border.txt");
  4962.                         }
  4963.                         else {
  4964.                                 if (isset($maj_right_panel_border)) {
  4965.                                         unset($maj_right_panel_border);
  4966.                                 }
  4967.                         }
  4968.  
  4969.                         if (file_exists("data/panels/$maj_right_panel/bgcolor-t.txt")) {
  4970.                                 $maj_right_panel_bgcolor_t = file_get_contents("data/panels/$maj_right_panel/bgcolor-t.txt");
  4971.                         }
  4972.                         else {
  4973.                                 if (isset($maj_right_panel_bgcolor_t)) {
  4974.                                         unset($maj_right_panel_bgcolor_t);
  4975.                                 }
  4976.                         }
  4977.  
  4978.                         if (file_exists("data/panels/$maj_right_panel/bgcolor-c.txt")) {
  4979.                                 $maj_right_panel_bgcolor_c = file_get_contents("data/panels/$maj_right_panel/bgcolor-c.txt");
  4980.                         }
  4981.                         else {
  4982.                                 if (isset($maj_right_panel_bgcolor_c)) {
  4983.                                         unset($maj_right_panel_bgcolor_c);
  4984.                                 }
  4985.                         }
  4986.  
  4987.                         if (file_exists("data/panels/$maj_right_panel/text-t.txt")) {
  4988.                                 $maj_right_panel_text_t = file_get_contents("data/panels/$maj_right_panel/text-t.txt");
  4989.                         }
  4990.                         else {
  4991.                                 if (isset($maj_right_panel_text_t)) {
  4992.                                         unset($maj_right_panel_text_t);
  4993.                                 }
  4994.                         }
  4995.  
  4996.                         if (file_exists("data/panels/$maj_right_panel/text-c.txt")) {
  4997.                                 $maj_right_panel_text_c = file_get_contents("data/panels/$maj_right_panel/text-c.txt");
  4998.                         }
  4999.                         else {
  5000.                                 if (isset($maj_right_panel_text_c)) {
  5001.                                         unset($maj_right_panel_text_c);
  5002.                                 }
  5003.                         }
  5004.  
  5005.                         echo '<div class="panel_title"';
  5006.  
  5007.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
  5008.                                 echo ' style="';
  5009.                         }
  5010.  
  5011.                         if (isset($maj_right_panel_bgcolor_t)) {
  5012.                                 echo "background-color: $maj_right_panel_bgcolor_t;";
  5013.                         }
  5014.  
  5015.                         if (isset($maj_right_panel_text_t)) {
  5016.                                 echo "color: $maj_right_panel_text_t;";
  5017.                         }
  5018.  
  5019.                         if (isset($maj_right_panel_border)) {
  5020.                                 echo "border-color: $maj_right_panel_border;";
  5021.                         }
  5022.  
  5023.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
  5024.                                 echo '"';
  5025.                         }
  5026.  
  5027.                                 echo '>';
  5028.  
  5029.                         readfile("data/panels/$maj_right_panel/title.txt");
  5030.  
  5031.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  5032.                                 echo "<a href=\"panels.php#{$maj_right_panel}\">";
  5033.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  5034.                         }
  5035.  
  5036.                         if (file_exists("data/panels/$maj_right_panel/private.txt")) {
  5037.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  5038.                         }
  5039.  
  5040.                         echo '</div>';
  5041.  
  5042.                         echo '<div class="panel_body"';
  5043.  
  5044.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c) or isset($maj_right_panel_text_c)) {
  5045.                                 echo ' style="';
  5046.                         }
  5047.  
  5048.                         if (isset($maj_right_panel_bgcolor_c)) {
  5049.                                 echo "background-color: $maj_right_panel_bgcolor_c;";
  5050.                         }
  5051.  
  5052.                         if (isset($maj_right_panel_text_c)) {
  5053.                                 echo "color: $maj_right_panel_text_c;";
  5054.                         }
  5055.  
  5056.                         if (isset($maj_right_panel_border)) {
  5057.                                 echo "border-color: $maj_right_panel_border;";
  5058.                         }
  5059.  
  5060.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c) or isset($maj_right_panel_text_c)) {
  5061.                                 echo '"';
  5062.                         }
  5063.  
  5064.                         echo '>';
  5065.                 }
  5066.  
  5067.                 if (file_exists("data/panels/$maj_right_panel/free.txt")) {
  5068.                         echo '<div class=panel_free>';
  5069.                 }
  5070.  
  5071.                 include("data/panels/$maj_right_panel/panel.php");
  5072.  
  5073.                 echo '</div>';
  5074.  
  5075.                 if (file_exists("data/panels/$maj_right_panel/free.txt") and !file_exists("data/panels/$maj_right_panel/nomargin.txt")) {
  5076.                         echo "<div style=\"height:10px;\"></div>";
  5077.                 }
  5078.         }
  5079. }
  5080.  
  5081. if ($maj_count_latest > 0) {
  5082.         echo '<table border="0" cellspacing="2" cellpadding="0" width="100%">';
  5083.         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>';
  5084.         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>';
  5085.         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>';
  5086.         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>';
  5087.         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>';
  5088.         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>';
  5089.         echo '</table>';
  5090. }
  5091.  
  5092. echo "</td></tr>";
  5093. 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>";
  5094. echo "</table>";
  5095.  
  5096. if (file_exists("data/footer.txt")) {
  5097.  
  5098.         $maj_footer_panel = file_get_contents("data/footer.txt");
  5099.  
  5100.         if (file_exists("data/panels/$maj_footer_panel") and (!file_exists("data/panels/$maj_footer_panel/private.txt") or isset($_SESSION['logged_in']))) {
  5101.                 include("data/panels/$maj_footer_panel/panel.php");
  5102.         }
  5103.  
  5104. }
  5105.  
  5106. if (file_exists("data/center.txt")) {
  5107.         echo "</center>";
  5108. }
  5109.  
  5110. ?>
  5111.  
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