maj.world

maj.world

Git

This blob has been accessed 410 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();
  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/top.txt")) {
  1036.                                         $maj_top_panels[] = $maj_panel;
  1037.                                         continue;
  1038.                                 }
  1039.  
  1040.                                 if (file_exists("data/panels/$maj_panel/center.txt")) {
  1041.                                         $maj_center_panels[] = $maj_panel;
  1042.                                         continue;
  1043.                                 }
  1044.  
  1045.                                 if (file_exists("data/panels/$maj_panel/entry.txt")) {
  1046.                                         $maj_entry_panels[] = $maj_panel;
  1047.                                         continue;
  1048.                                 }
  1049.  
  1050.                                 if (file_exists("data/panels/$maj_panel/right.txt")) {
  1051.                                         $maj_right_panels[] = $maj_panel;
  1052.                                         continue;
  1053.                                 }
  1054.  
  1055.                                 if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $maj_panel)) {
  1056.                                         continue;
  1057.                                 }
  1058.  
  1059.                                 if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $maj_panel)) {
  1060.                                         continue;
  1061.                                 }
  1062.  
  1063.                                 $maj_left_panels[] = $maj_panel;
  1064.                         }
  1065.                 }
  1066.                 closedir($maj_dh_panels);
  1067.         }
  1068.  
  1069.         sort($maj_left_panels);
  1070.         reset($maj_left_panels);
  1071.  
  1072.         $maj_count_left_panels = count($maj_left_panels);
  1073.  
  1074.         sort($maj_top_panels);
  1075.         reset($maj_top_panels);
  1076.  
  1077.         $maj_count_top_panels = count($maj_top_panels);
  1078.  
  1079.         sort($maj_center_panels);
  1080.         reset($maj_center_panels);
  1081.  
  1082.         $maj_count_center_panels = count($maj_center_panels);
  1083.  
  1084.         sort($maj_entry_panels);
  1085.         reset($maj_entry_panels);
  1086.  
  1087.         $maj_count_entry_panels = count($maj_entry_panels);
  1088.  
  1089.         sort($maj_right_panels);
  1090.         reset($maj_right_panels);
  1091.  
  1092.         $maj_count_right_panels = count($maj_right_panels);
  1093.  
  1094.         if ($maj_count_left_panels > 0) {
  1095.  
  1096.                 foreach ($maj_left_panels as $maj_left_panel) {
  1097.  
  1098.                         if (!file_exists("data/panels/$maj_left_panel/free.txt")) {
  1099.  
  1100.                                 if (file_exists("data/panels/$maj_left_panel/border.txt")) {
  1101.                                         $maj_left_panel_border = file_get_contents("data/panels/$maj_left_panel/border.txt");
  1102.                                 }
  1103.                                 else {
  1104.                                         if (isset($maj_left_panel_border)) {
  1105.                                                 unset($maj_left_panel_border);
  1106.                                         }
  1107.                                 }
  1108.  
  1109.                                 if (file_exists("data/panels/$maj_left_panel/bgcolor-t.txt")) {
  1110.                                         $maj_left_panel_bgcolor_t = file_get_contents("data/panels/$maj_left_panel/bgcolor-t.txt");
  1111.                                 }
  1112.                                 else {
  1113.                                         if (isset($maj_left_panel_bgcolor_t)) {
  1114.                                                 unset($maj_left_panel_bgcolor_t);
  1115.                                         }
  1116.                                 }
  1117.  
  1118.                                 if (file_exists("data/panels/$maj_left_panel/bgcolor-c.txt")) {
  1119.                                         $maj_left_panel_bgcolor_c = file_get_contents("data/panels/$maj_left_panel/bgcolor-c.txt");
  1120.                                 }
  1121.                                 else {
  1122.                                         if (isset($maj_left_panel_bgcolor_c)) {
  1123.                                                 unset($maj_left_panel_bgcolor_c);
  1124.                                         }
  1125.                                 }
  1126.  
  1127.                                 if (file_exists("data/panels/$maj_left_panel/text-t.txt")) {
  1128.                                         $maj_left_panel_text_t = file_get_contents("data/panels/$maj_left_panel/text-t.txt");
  1129.                                 }
  1130.                                 else {
  1131.                                         if (isset($maj_left_panel_text_t)) {
  1132.                                                 unset($maj_left_panel_text_t);
  1133.                                         }
  1134.                                 }
  1135.  
  1136.                                 if (file_exists("data/panels/$maj_left_panel/text-c.txt")) {
  1137.                                         $maj_left_panel_text_c = file_get_contents("data/panels/$maj_left_panel/text-c.txt");
  1138.                                 }
  1139.                                 else {
  1140.                                         if (isset($maj_left_panel_text_c)) {
  1141.                                                 unset($maj_left_panel_text_c);
  1142.                                         }
  1143.                                 }
  1144.  
  1145.                                 echo '<div class="panel_title"';
  1146.  
  1147.                                 if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t) or isset($maj_left_panel_text_t)) {
  1148.                                         echo ' style="';
  1149.                                 }
  1150.  
  1151.                                 if (isset($maj_left_panel_bgcolor_t)) {
  1152.                                         echo "background-color: $maj_left_panel_bgcolor_t;";
  1153.                                 }
  1154.  
  1155.                                 if (isset($maj_left_panel_text_t)) {
  1156.                                         echo "color: $maj_left_panel_text_t;";
  1157.                                 }
  1158.  
  1159.                                 if (isset($maj_left_panel_border)) {
  1160.                                         echo "border-color: $maj_left_panel_border;";
  1161.                                 }
  1162.  
  1163.                                 if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t) or isset($maj_left_panel_text_t)) {
  1164.                                         echo '"';
  1165.                                 }
  1166.  
  1167.                                 echo '>';
  1168.  
  1169.                                 readfile("data/panels/$maj_left_panel/title.txt");
  1170.  
  1171.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  1172.                                         echo "<a href=\"panels.php#{$maj_left_panel}\">";
  1173.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  1174.                                 }
  1175.  
  1176.                                 if (file_exists("data/panels/$maj_left_panel/private.txt")) {
  1177.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  1178.                                 }
  1179.  
  1180.                                 echo '</div>';
  1181.  
  1182.                                 echo '<div class="panel_body"';
  1183.  
  1184.                                 if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c) or isset($maj_left_panel_text_c)) {
  1185.                                         echo ' style="';
  1186.                                 }
  1187.  
  1188.                                 if (isset($maj_left_panel_bgcolor_c)) {
  1189.                                         echo "background-color: $maj_left_panel_bgcolor_c;";
  1190.                                 }
  1191.  
  1192.                                 if (isset($maj_left_panel_text_c)) {
  1193.                                         echo "color: $maj_left_panel_text_c;";
  1194.                                 }
  1195.  
  1196.                                 if (isset($maj_left_panel_border)) {
  1197.                                         echo "border-color: $maj_left_panel_border;";
  1198.                                 }
  1199.  
  1200.                                 if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c) or isset($maj_left_panel_text_c)) {
  1201.                                         echo '"';
  1202.                                 }
  1203.  
  1204.                                 echo '>';
  1205.                         }
  1206.  
  1207.                         if (file_exists("data/panels/$maj_left_panel/free.txt")) {
  1208.                                 echo '<div class=panel_free>';
  1209.                         }
  1210.  
  1211.                         include("data/panels/$maj_left_panel/panel.php");
  1212.  
  1213.                         echo '</div>';
  1214.  
  1215.                         if (file_exists("data/panels/$maj_left_panel/free.txt") and !file_exists("data/panels/$maj_left_panel/nomargin.txt")) {
  1216.                                 echo "<div style=\"height:10px;\"></div>";
  1217.                         }
  1218.                 }
  1219.         }
  1220. }
  1221.  
  1222. echo "</td><td width=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td>";
  1223.  
  1224. // main
  1225.  
  1226. echo "<td valign=\"top\" width=\"$maj_wmain\">";
  1227.  
  1228. if ($maj_count_top_panels > 0) {
  1229.  
  1230.         foreach ($maj_top_panels as $maj_top_panel) {
  1231.  
  1232.                 if (!file_exists("data/panels/$maj_top_panel/free.txt")) {
  1233.  
  1234.                         if (file_exists("data/panels/$maj_top_panel/border.txt")) {
  1235.                                 $maj_top_panel_border = file_get_contents("data/panels/$maj_top_panel/border.txt");
  1236.                         }
  1237.                         else {
  1238.                                 if (isset($maj_top_panel_border)) {
  1239.                                         unset($maj_top_panel_border);
  1240.                                 }
  1241.                         }
  1242.  
  1243.                         if (file_exists("data/panels/$maj_top_panel/bgcolor-t.txt")) {
  1244.                                 $maj_top_panel_bgcolor_t = file_get_contents("data/panels/$maj_top_panel/bgcolor-t.txt");
  1245.                         }
  1246.                         else {
  1247.                                 if (isset($maj_top_panel_bgcolor_t)) {
  1248.                                         unset($maj_top_panel_bgcolor_t);
  1249.                                 }
  1250.                         }
  1251.  
  1252.                         if (file_exists("data/panels/$maj_top_panel/bgcolor-c.txt")) {
  1253.                                 $maj_top_panel_bgcolor_c = file_get_contents("data/panels/$maj_top_panel/bgcolor-c.txt");
  1254.                         }
  1255.                         else {
  1256.                                 if (isset($maj_top_panel_bgcolor_c)) {
  1257.                                         unset($maj_top_panel_bgcolor_c);
  1258.                                 }
  1259.                         }
  1260.  
  1261.                         if (file_exists("data/panels/$maj_top_panel/text-t.txt")) {
  1262.                                 $maj_top_panel_text_t = file_get_contents("data/panels/$maj_top_panel/text-t.txt");
  1263.                         }
  1264.                         else {
  1265.                                 if (isset($maj_top_panel_text_t)) {
  1266.                                         unset($maj_top_panel_text_t);
  1267.                                 }
  1268.                         }
  1269.  
  1270.                         if (file_exists("data/panels/$maj_top_panel/text-c.txt")) {
  1271.                                 $maj_top_panel_text_c = file_get_contents("data/panels/$maj_top_panel/text-c.txt");
  1272.                         }
  1273.                         else {
  1274.                                 if (isset($maj_top_panel_text_c)) {
  1275.                                         unset($maj_top_panel_text_c);
  1276.                                 }
  1277.                         }
  1278.  
  1279.                         echo '<div class="panel_title"';
  1280.  
  1281.                         if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t) or isset($maj_top_panel_text_t)) {
  1282.                                 echo ' style="';
  1283.                         }
  1284.  
  1285.                         if (isset($maj_top_panel_bgcolor_t)) {
  1286.                                 echo "background-color: $maj_top_panel_bgcolor_t;";
  1287.                         }
  1288.  
  1289.                         if (isset($maj_top_panel_text_t)) {
  1290.                                 echo "color: $maj_top_panel_text_t;";
  1291.                         }
  1292.  
  1293.                         if (isset($maj_top_panel_border)) {
  1294.                                 echo "border-color: $maj_top_panel_border;";
  1295.                         }
  1296.  
  1297.                         if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t) or isset($maj_top_panel_text_t)) {
  1298.                                 echo '"';
  1299.                         }
  1300.  
  1301.                         echo '>';
  1302.  
  1303.                         readfile("data/panels/$maj_top_panel/title.txt");
  1304.  
  1305.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  1306.                                 echo "<a href=\"panels.php#{$maj_top_panel}\">";
  1307.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  1308.                         }
  1309.  
  1310.                         if (file_exists("data/panels/$maj_top_panel/private.txt")) {
  1311.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  1312.                         }
  1313.  
  1314.                         echo '</div>';
  1315.  
  1316.                         echo '<div class="panel_body"';
  1317.  
  1318.                         if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c) or isset($maj_top_panel_text_c)) {
  1319.                                 echo ' style="';
  1320.                         }
  1321.  
  1322.                         if (isset($maj_top_panel_bgcolor_c)) {
  1323.                                 echo "background-color: $maj_top_panel_bgcolor_c;";
  1324.                         }
  1325.  
  1326.                         if (isset($maj_top_panel_text_c)) {
  1327.                                 echo "color: $maj_top_panel_text_c;";
  1328.                         }
  1329.  
  1330.                         if (isset($maj_top_panel_border)) {
  1331.                                 echo "border-color: $maj_top_panel_border;";
  1332.                         }
  1333.  
  1334.                         if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c) or isset($maj_top_panel_text_c)) {
  1335.                                 echo '"';
  1336.                         }
  1337.  
  1338.                         echo '>';
  1339.                 }
  1340.  
  1341.                 if (file_exists("data/panels/$maj_top_panel/free.txt")) {
  1342.                         echo '<div class=panel_free>';
  1343.                 }
  1344.  
  1345.                 include("data/panels/$maj_top_panel/panel.php");
  1346.  
  1347.                 echo '</div>';
  1348.  
  1349.                 if (file_exists("data/panels/$maj_top_panel/free.txt") and !file_exists("data/panels/$maj_top_panel/nomargin.txt")) {
  1350.                         echo "<div style=\"height:10px;\"></div>";
  1351.                 }
  1352.         }
  1353. }
  1354.  
  1355. // clean-up (start)
  1356.  
  1357. if (file_exists("data/albums")) {
  1358.         rmdirr("data/albums");
  1359. }
  1360.  
  1361. // clean-up (end)
  1362.  
  1363. // global entry items (start)
  1364.  
  1365. if ($maj_dh_items = opendir("data/items")) {
  1366.  
  1367.         while (($maj_item = readdir($maj_dh_items)) !== false) {
  1368.  
  1369.                 if ($maj_item != "." && $maj_item != "..") {
  1370.  
  1371.                         if (file_exists("data/items/$maj_item/categories")) {
  1372.  
  1373.                                 if ($maj_dh_egroups = opendir("data/items/$maj_item/categories")) {
  1374.  
  1375.                                         while (($maj_egroup = readdir($maj_dh_egroups)) !== false) {
  1376.  
  1377.                                                 if ($maj_egroup != "." && $maj_egroup != "..") {
  1378.                                                        
  1379.                                                         if (!file_exists("data/categories/$maj_egroup")) {
  1380.                                                                 rmdirr("data/items/$maj_item/categories/$maj_egroup");
  1381.                                                         }
  1382.  
  1383.                                                         if (file_exists("data/categories/$maj_egroup/members")) {
  1384.  
  1385.                                                                 if ($maj_dh_mgroups = opendir("data/categories/$maj_egroup/members")) {
  1386.  
  1387.                                                                         while (($maj_mgroup = readdir($maj_dh_mgroups)) !== false) {
  1388.  
  1389.                                                                                 if ($maj_mgroup != "." && $maj_mgroup != "..") {
  1390.                                                                
  1391.                                                                                         if (!file_exists("data/items/$maj_item/members/$maj_mgroup")) {
  1392.  
  1393.                                                                                                 if (!file_exists("data/items/$maj_item/members")) {
  1394.                                                                                                         mkdir("data/items/$maj_item/members");
  1395.                                                                                                 }
  1396.  
  1397.                                                                                                 mkdir("data/items/$maj_item/members/$maj_mgroup");
  1398.                                                                                         }
  1399.                                                                                 }
  1400.                                                                         }
  1401.                                                                         closedir($maj_dh_mgroups);
  1402.                                                                 }
  1403.                                                         }
  1404.                                                 }
  1405.                                         }
  1406.                                         closedir($maj_dh_egroups);
  1407.                                 }
  1408.                         }
  1409.  
  1410.                         if (file_exists("data/items/$maj_item/categories") and (count(glob("data/items/$maj_item/categories/*")) < 1)) {
  1411.                                 rmdirr("data/items/$maj_item/categories");
  1412.                         }
  1413.  
  1414.                         if (file_exists("data/items/$maj_item/members")) {
  1415.  
  1416.                                 if ($maj_dh_members = opendir("data/items/$maj_item/members")) {
  1417.  
  1418.                                         while (($maj_member = readdir($maj_dh_members)) !== false) {
  1419.  
  1420.                                                 if ($maj_member != "." && $maj_member != "..") {
  1421.  
  1422.                                                         if (!file_exists("data/members/active/$maj_member")) {
  1423.                                                                 rmdirr("data/items/$maj_item/members/$maj_member");
  1424.                                                         }
  1425.                                                 }
  1426.                                         }
  1427.                                         closedir("data/items/$maj_item/members");
  1428.                                 }
  1429.                         }
  1430.  
  1431.                         if (file_exists("data/items/$maj_item/members") and (count(glob("data/items/$maj_item/members/*")) < 1)) {
  1432.                                 rmdirr("data/items/$maj_item/members");
  1433.                         }
  1434.  
  1435.                         if (file_exists("data/items/$maj_item/comments/live") and (count(glob("data/items/$maj_item/comments/live/*")) < 1)) {
  1436.                                 rmdirr("data/items/$maj_item/comments/live");
  1437.                         }
  1438.  
  1439.                         if (file_exists("data/items/$maj_item/comments/pending") and (count(glob("data/items/$maj_item/comments/pending/*")) < 1)) {
  1440.                                 rmdirr("data/items/$maj_item/comments/pending");
  1441.                         }
  1442.  
  1443.                         if (file_exists("data/items/$maj_item/comments") and (count(glob("data/items/$maj_item/comments/*")) < 1)) {
  1444.                                 rmdirr("data/items/$maj_item/comments");
  1445.                         }
  1446.  
  1447.                         if (file_exists("data/items/$maj_item/filedrop/files") and (count(glob("data/items/$maj_item/filedrop/files/*")) < 1)) {
  1448.                                 rmdirr("data/items/$maj_item/filedrop/files");
  1449.                         }
  1450.  
  1451.                         if (file_exists("data/items/$maj_item/filedrop/count") and (count(glob("data/items/$maj_item/filedrop/count/*")) < 1)) {
  1452.                                 rmdirr("data/items/$maj_item/filedrop/count");
  1453.                         }
  1454.  
  1455.                         if (file_exists("data/items/$maj_item/filedrop") and (count(glob("data/items/$maj_item/filedrop/*")) < 1)) {
  1456.                                 rmdirr("data/items/$maj_item/filedrop");
  1457.                         }
  1458.  
  1459.                         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)) {
  1460.                                 rmdirr("data/items/$maj_item/album/captions");
  1461.                         }
  1462.  
  1463.                         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)) {
  1464.                                 rmdirr("data/items/$maj_item/album/views");
  1465.                                 unlink("data/items/$maj_item/album/views.txt");
  1466.                         }
  1467.  
  1468.                         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)) {
  1469.                                 rmdirr("data/items/$maj_item/album");
  1470.                         }
  1471.  
  1472.                         if (file_exists("images/$maj_item/album") and (count(glob("images/$maj_item/album/*")) < 1)) {
  1473.                                 rmdirr("images/$maj_item/album");
  1474.                         }
  1475.  
  1476.                         if (file_exists("images/$maj_item") and (count(glob("images/$maj_item/*")) < 1)) {
  1477.                                 rmdirr("images/$maj_item");
  1478.                         }
  1479.  
  1480.                         if (file_exists("images/$maj_item/categories") and (count(glob("images/$maj_item/categories/*")) < 1)) {
  1481.                                 rmdirr("images/$maj_item/categories");
  1482.                         }
  1483.  
  1484.                         $maj_grand[] = $maj_item;
  1485.  
  1486.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  1487.  
  1488.                                 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)) {
  1489.        
  1490.                                         if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
  1491.                                                 $maj_items[] = $maj_req_entry;
  1492.                                         }
  1493.  
  1494.                                         if (isset($maj_req_category) and file_exists("data/categories/$maj_req_category") and file_exists("data/items/$maj_item/categories/$maj_req_category")) {
  1495.                                                 $maj_items[] = $maj_item;
  1496.                                         }
  1497.  
  1498.                                         if (isset($maj_req_archive) and fnmatch("$maj_req_archive*",$maj_item)) {
  1499.                                                 $maj_items[] = $maj_item;
  1500.                                         }
  1501.  
  1502.                                         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)) {
  1503.                                                 $maj_items[] = $maj_item;
  1504.                                         }
  1505.  
  1506.                                         if (isset($maj_req_find)) {
  1507.  
  1508.                                                 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")) {
  1509.                                                         $maj_items[] = $maj_item;
  1510.                                                 }
  1511.  
  1512.                                                 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")) {
  1513.                                                         $maj_items[] = $maj_item;
  1514.                                                 }
  1515.  
  1516.                                                 if (($maj_req_find == "unfiled") and !file_exists("data/items/$maj_item/categories")) {
  1517.                                                         $maj_items[] = $maj_item;
  1518.                                                 }
  1519.                                         }
  1520.                                 }
  1521.                                 else {
  1522.                                         $maj_items[] = $maj_item;
  1523.                                 }
  1524.  
  1525.                                 $maj_latest[] = $maj_item;
  1526.  
  1527.                                 if (file_exists("data/items/$maj_item/album")) {
  1528.                                         $maj_albums[] = $maj_item;
  1529.                                 }
  1530.  
  1531.                                 $maj_random[] = $maj_item;                     
  1532.  
  1533.                                 $maj_archives[] = substr($maj_item,0,6);
  1534.                         }
  1535.                         else {
  1536.  
  1537.                                 // non-admin stuff (start)
  1538.  
  1539.                                 $maj_today = date("YmdHis",time() + $maj_offset);
  1540.        
  1541.                                 if ($maj_item > $maj_today) {
  1542.                                         continue;
  1543.                                 }
  1544.  
  1545.                                 if (file_exists("data/items/$maj_item/private.txt")) {
  1546.                                         continue;
  1547.                                 }
  1548.  
  1549.                                 $maj_private_categories = "0";
  1550.  
  1551.                                 if (file_exists("data/items/$maj_item/categories")) {
  1552.                        
  1553.                                         if ($maj_dh_entry_categories = opendir("data/items/$maj_item/categories")) {
  1554.                        
  1555.                                                 while (($maj_item_category = readdir($maj_dh_entry_categories)) !== false) {
  1556.                        
  1557.                                                         if ($maj_item_category != "." && $maj_item_category != "..") {
  1558.                        
  1559.                                                                 if (file_exists("data/categories/$maj_item_category/private.txt")) {
  1560.                                                                         $maj_private_categories = $maj_private_categories + 1;
  1561.                                                                 }
  1562.                                                         }
  1563.                                                 }
  1564.                                                 closedir($maj_dh_entry_categories);
  1565.                                         }
  1566.                                 }
  1567.  
  1568.                                 if (($maj_private_categories > 0) and !file_exists("data/items/$maj_item/cat.txt")) {
  1569.                                         continue;
  1570.                                 }
  1571.  
  1572.                                 $maj_latest[] = $maj_item;
  1573.  
  1574.                                 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']}"))) {
  1575.                                         continue;
  1576.                                 }
  1577.  
  1578.                                 if (file_exists("data/items/$maj_item/member.txt") and (!isset($_SESSION['logged_in']))) {
  1579.                                         continue;
  1580.                                 }
  1581.  
  1582.                                 if (file_exists("data/items/$maj_item/album")) {
  1583.                                         $maj_albums[] = $maj_item;
  1584.                                 }
  1585.  
  1586.                                 $maj_random[] = $maj_item;
  1587.                                 $maj_archives[] = substr($maj_item,0,6);
  1588.  
  1589.                                 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))) {
  1590.                                         continue;
  1591.                                 }
  1592.  
  1593.                                 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)) {
  1594.        
  1595.                                         if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
  1596.                                                
  1597.                                                 if ($maj_req_entry != $maj_item) {
  1598.                                                         continue;
  1599.                                                 }
  1600.                                                 $maj_items[] = $maj_item;
  1601.                                         }
  1602.  
  1603.                                         if (isset($maj_req_category) and file_exists("data/categories/$maj_req_category") and file_exists("data/items/$maj_item/categories/$maj_req_category")) {
  1604.                                                 $maj_items[] = $maj_item;
  1605.                                         }
  1606.  
  1607.                                         if (isset($maj_req_archive) and fnmatch("$maj_req_archive*",$maj_item)) {
  1608.                                                 $maj_items[] = $maj_item;
  1609.                                         }
  1610.  
  1611.                                         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)) {
  1612.                                                 $maj_items[] = $maj_item;
  1613.                                         }
  1614.                                 }
  1615.                                 else {
  1616.                                         $maj_items[] = $maj_item;
  1617.                                 }
  1618.  
  1619.                                 // non-admin stuff (end)
  1620.                         }
  1621.                 }
  1622.         }
  1623.         closedir($maj_dh_items);
  1624. }
  1625.  
  1626. sort($maj_grand);
  1627. reset($maj_grand);
  1628.  
  1629. $maj_count_grand = count($maj_grand);
  1630.  
  1631. if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
  1632.  
  1633.         if (file_exists("data/items/$maj_req_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  1634.                 unset($maj_items);
  1635.         }
  1636.  
  1637.         if (file_exists("data/items/$maj_req_entry/member.txt") and !isset($_SESSION['logged_in'])) {
  1638.                 unset($maj_items);
  1639.         }
  1640. }
  1641.  
  1642. $maj_items = array_unique($maj_items);
  1643. $maj_items = array_values($maj_items);
  1644.  
  1645. if (file_exists("data/old.txt")) {
  1646.         sort($maj_items);
  1647. }
  1648. else {
  1649.         rsort($maj_items);
  1650. }
  1651.  
  1652. reset($maj_items);
  1653.  
  1654. $maj_count_items = count($maj_items);
  1655.  
  1656. rsort($maj_latest);
  1657. reset($maj_latest);
  1658.  
  1659. $maj_count_latest = count($maj_latest);
  1660.  
  1661. rsort($maj_albums);
  1662. reset($maj_albums);
  1663.  
  1664. $maj_count_albums = count($maj_albums);
  1665.  
  1666. rsort($maj_random);
  1667. reset($maj_random);
  1668.  
  1669. $maj_count_random = count($maj_random);
  1670.  
  1671. rsort($maj_archives);
  1672. reset($maj_archives);
  1673.  
  1674. $maj_count_archives = count($maj_archives);
  1675.  
  1676. 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)) {
  1677.  
  1678.         if ($maj_count_latest > 0) {
  1679.  
  1680.                 echo "<div class=\"panel_title\">Latest Entries</div>";
  1681.                
  1682.                 echo "<div class=\"panel_body\">";
  1683.                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\">";
  1684.                 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>";
  1685.  
  1686.                 $maj_increment_latest = 0;
  1687.  
  1688.                 while ($maj_increment_latest <= 4) {
  1689.  
  1690.                         echo "<tr><td bgcolor=\"#ffffff\"><a href=\"index.php?entry=$maj_latest[$maj_increment_latest]";
  1691.  
  1692.                         if ($maj_dh_summary_comments = opendir("data/items/$maj_latest[$maj_increment_latest]/comments/live")) {
  1693.  
  1694.                                 while (($maj_entry_summary_comments = readdir($maj_dh_summary_comments)) !== false) {
  1695.  
  1696.                                         if ($maj_entry_summary_comments != "." && $maj_entry_summary_comments != "..") {
  1697.                                                 $maj_items_summary_comments[] = $maj_entry_summary_comments;
  1698.                                         }
  1699.                                 }
  1700.                                 closedir($maj_dh_summary_comments);
  1701.                         }
  1702.  
  1703.                         rsort($maj_items_summary_comments);
  1704.  
  1705.                         $maj_summary_comments = count($maj_items_summary_comments);
  1706.        
  1707.                         if ($maj_summary_comments > 0) {
  1708.                                 echo "&show=comments";
  1709.                         }
  1710.        
  1711.                         echo "\">";
  1712.                         readfile("data/items/$maj_latest[$maj_increment_latest]/title.txt");
  1713.                         echo "</a></td>";
  1714.  
  1715.                         echo "<td bgcolor=\"#ffffff\"><a href=\"member.php?id=";
  1716.                         readfile("data/items/$maj_latest[$maj_increment_latest]/author.txt");
  1717.                         echo "\">";
  1718.                         readfile("data/items/$maj_latest[$maj_increment_latest]/author.txt");
  1719.                         echo "</a></td>";
  1720.                         echo "<td bgcolor=\"#ffffff\" align=\"right\">";
  1721.  
  1722.                         if (!file_exists("data/items/$maj_latest[$maj_increment_latest]/views.txt")) {
  1723.                                 echo 0;
  1724.                         }
  1725.                         else {
  1726.                                 readfile("data/items/$maj_latest[$maj_increment_latest]/views.txt");
  1727.                         }
  1728.        
  1729.                         echo "</td>";
  1730.  
  1731.                         if ($maj_summary_comments < 1) {
  1732.  
  1733.                                 $maj_iso_year = substr($maj_latest[$maj_increment_latest],0,4);
  1734.                                 $maj_iso_month = substr($maj_latest[$maj_increment_latest],4,2);
  1735.                                 $maj_iso_day = substr($maj_latest[$maj_increment_latest],6,2);
  1736.                                 $maj_iso_last = $maj_iso_year . "-" . $maj_iso_month . "-" . $maj_iso_day;
  1737.  
  1738.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">0</td>";
  1739.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$maj_iso_last</td>";
  1740.                         }
  1741.                         else {
  1742.                                 $maj_iso_year = substr($maj_items_summary_comments[0],0,4);
  1743.                                 $maj_iso_month = substr($maj_items_summary_comments[0],4,2);
  1744.                                 $maj_iso_day = substr($maj_items_summary_comments[0],6,2);
  1745.                                 $maj_iso_last = $maj_iso_year . "-" . $maj_iso_month . "-" . $maj_iso_day;
  1746.  
  1747.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$maj_summary_comments</td>";
  1748.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$maj_iso_last</td>";
  1749.                         }
  1750.        
  1751.                         unset($maj_items_summary_comments);
  1752.  
  1753.                         $maj_increment_latest = $maj_increment_latest + 1;
  1754.                 }
  1755.         }
  1756.  
  1757.         if ($maj_count_latest > 0) {
  1758.  
  1759.                 echo "</table></div>";
  1760.         }
  1761.  
  1762. }
  1763.  
  1764. if ($maj_count_center_panels > 0) {
  1765.  
  1766.         foreach ($maj_center_panels as $maj_center_panel) {
  1767.  
  1768.                 if (!file_exists("data/panels/$maj_center_panel/free.txt")) {
  1769.  
  1770.                         if (file_exists("data/panels/$maj_center_panel/border.txt")) {
  1771.                                 $maj_center_panel_border = file_get_contents("data/panels/$maj_center_panel/border.txt");
  1772.                         }
  1773.                         else {
  1774.                                 if (isset($maj_center_panel_border)) {
  1775.                                         unset($maj_center_panel_border);
  1776.                                 }
  1777.                         }
  1778.  
  1779.                         if (file_exists("data/panels/$maj_center_panel/bgcolor-t.txt")) {
  1780.                                 $maj_center_panel_bgcolor_t = file_get_contents("data/panels/$maj_center_panel/bgcolor-t.txt");
  1781.                         }
  1782.                         else {
  1783.                                 if (isset($maj_center_panel_bgcolor_t)) {
  1784.                                         unset($maj_center_panel_bgcolor_t);
  1785.                                 }
  1786.                         }
  1787.  
  1788.                         if (file_exists("data/panels/$maj_center_panel/bgcolor-c.txt")) {
  1789.                                 $maj_center_panel_bgcolor_c = file_get_contents("data/panels/$maj_center_panel/bgcolor-c.txt");
  1790.                         }
  1791.                         else {
  1792.                                 if (isset($maj_center_panel_bgcolor_c)) {
  1793.                                         unset($maj_center_panel_bgcolor_c);
  1794.                                 }
  1795.                         }
  1796.  
  1797.                         if (file_exists("data/panels/$maj_center_panel/text-t.txt")) {
  1798.                                 $maj_center_panel_text_t = file_get_contents("data/panels/$maj_center_panel/text-t.txt");
  1799.                         }
  1800.                         else {
  1801.                                 if (isset($maj_center_panel_text_t)) {
  1802.                                         unset($maj_center_panel_text_t);
  1803.                                 }
  1804.                         }
  1805.  
  1806.                         if (file_exists("data/panels/$maj_center_panel/text-c.txt")) {
  1807.                                 $maj_center_panel_text_c = file_get_contents("data/panels/$maj_center_panel/text-c.txt");
  1808.                         }
  1809.                         else {
  1810.                                 if (isset($maj_center_panel_text_c)) {
  1811.                                         unset($maj_center_panel_text_c);
  1812.                                 }
  1813.                         }
  1814.  
  1815.                         echo '<div class="panel_title"';
  1816.  
  1817.                         if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t) or isset($maj_center_panel_text_t)) {
  1818.                                 echo ' style="';
  1819.                         }
  1820.  
  1821.                         if (isset($maj_center_panel_bgcolor_t)) {
  1822.                                 echo "background-color: $maj_center_panel_bgcolor_t;";
  1823.                         }
  1824.  
  1825.                         if (isset($maj_center_panel_text_t)) {
  1826.                                 echo "color: $maj_center_panel_text_t;";
  1827.                         }
  1828.  
  1829.                         if (isset($maj_center_panel_border)) {
  1830.                                 echo "border-color: $maj_center_panel_border;";
  1831.                         }
  1832.  
  1833.                         if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t) or isset($maj_center_panel_text_t)) {
  1834.                                 echo '"';
  1835.                         }
  1836.  
  1837.                         echo '>';
  1838.  
  1839.                         readfile("data/panels/$maj_center_panel/title.txt");
  1840.  
  1841.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  1842.                                 echo "<a href=\"panels.php#{$maj_center_panel}\">";
  1843.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  1844.                         }
  1845.  
  1846.                         if (file_exists("data/panels/$maj_center_panel/private.txt")) {
  1847.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  1848.                         }
  1849.  
  1850.                         echo '</div>';
  1851.  
  1852.                         echo '<div class="panel_body"';
  1853.  
  1854.                         if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c) or isset($maj_center_panel_text_c)) {
  1855.                                 echo ' style="';
  1856.                         }
  1857.  
  1858.                         if (isset($maj_center_panel_bgcolor_c)) {
  1859.                                 echo "background-color: $maj_center_panel_bgcolor_c;";
  1860.                         }
  1861.  
  1862.                         if (isset($maj_center_panel_text_c)) {
  1863.                                 echo "color: $maj_center_panel_text_c;";
  1864.                         }
  1865.  
  1866.                         if (isset($maj_center_panel_border)) {
  1867.                                 echo "border-color: $maj_center_panel_border;";
  1868.                         }
  1869.  
  1870.                         if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c) or isset($maj_center_panel_text_c)) {
  1871.                                 echo '"';
  1872.                         }
  1873.  
  1874.                         echo '>';
  1875.                 }
  1876.  
  1877.                 if (file_exists("data/panels/$maj_center_panel/free.txt")) {
  1878.                         echo '<div class=panel_free>';
  1879.                 }
  1880.  
  1881.                 include("data/panels/$maj_center_panel/panel.php");
  1882.  
  1883.                 echo '</div>';
  1884.  
  1885.                 if (file_exists("data/panels/$maj_center_panel/free.txt") and !file_exists("data/panels/$maj_center_panel/nomargin.txt")) {
  1886.                         echo "<div style=\"height:10px;\"></div>";
  1887.                 }
  1888.         }
  1889. }
  1890.  
  1891. if (isset($maj_req_category) and !empty($maj_req_category)) {
  1892.  
  1893.         if (file_exists("data/categories/$maj_req_category/book.txt")) {
  1894.                 sort($maj_items);
  1895.                 reset($maj_items);
  1896.         }
  1897. }
  1898.  
  1899. if ($maj_count_items == 0) {
  1900.  
  1901.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">";
  1902.  
  1903.         echo '<div class="panel_title">Oops!</div>';
  1904.        
  1905.         echo "<div class=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
  1906.         echo "<td valign=middle><img src=images/oops.png width=36 height=36 border=0></td><td valign=middle>";
  1907.  
  1908.         if (($maj_count_grand == 0) and (count($_GET) == 0)) {
  1909.                 echo "No entries found. Perhaps this is a fresh install.";
  1910.         }
  1911.         else {
  1912.                 if (count($_GET) > 0) {
  1913.                         echo "The entry you are looking for does not exist or is off limits to you.";
  1914.                 }
  1915.                 else {
  1916.                         echo "Login required. Entries are off limits without proper credentials.";
  1917.                 }
  1918.         }
  1919.  
  1920.         echo '</td></tr></table></div>';
  1921.  
  1922.         echo "</td></tr></table>";
  1923. }
  1924.  
  1925. $maj_start = $_REQUEST['start'];
  1926.  
  1927. if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
  1928.         $maj_start = 0;
  1929. }
  1930.  
  1931. $maj_end = $maj_start + $maj_increase;
  1932.    
  1933. $maj_disp = array_slice($maj_items,$maj_start,$maj_increase);
  1934.  
  1935. foreach ($maj_disp as $maj_d) {
  1936.  
  1937.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">";
  1938.  
  1939.         if (file_exists("data/items/$maj_d/border.txt")) {
  1940.                 $maj_d_border = file_get_contents("data/items/$maj_d/border.txt");
  1941.         }
  1942.         else {
  1943.                 if (isset($maj_d_border)) {
  1944.                         unset($maj_d_border);
  1945.                 }
  1946.         }
  1947.  
  1948.         if (file_exists("data/items/$maj_d/bgcolor-t.txt")) {
  1949.                 $maj_d_bgcolor_t = file_get_contents("data/items/$maj_d/bgcolor-t.txt");
  1950.         }
  1951.         else {
  1952.                 if (isset($maj_d_bgcolor_t)) {
  1953.                         unset($maj_d_bgcolor_t);
  1954.                 }
  1955.         }
  1956.  
  1957.         if (file_exists("data/items/$maj_d/bgcolor-b.txt")) {
  1958.                 $maj_d_bgcolor_b = file_get_contents("data/items/$maj_d/bgcolor-b.txt");
  1959.         }
  1960.         else {
  1961.                 if (isset($maj_d_bgcolor_b)) {
  1962.                         unset($maj_d_bgcolor_b);
  1963.                 }
  1964.         }
  1965.  
  1966.         if (file_exists("data/items/$maj_d/bgcolor-c.txt")) {
  1967.                 $maj_d_bgcolor_c = file_get_contents("data/items/$maj_d/bgcolor-c.txt");
  1968.         }
  1969.         else {
  1970.                 if (isset($maj_d_bgcolor_c)) {
  1971.                         unset($maj_d_bgcolor_c);
  1972.                 }
  1973.         }
  1974.  
  1975.         if (file_exists("data/items/$maj_d/bgcolor-f.txt")) {
  1976.                 $maj_d_bgcolor_f = file_get_contents("data/items/$maj_d/bgcolor-f.txt");
  1977.         }
  1978.         else {
  1979.                 if (isset($maj_d_bgcolor_f)) {
  1980.                         unset($maj_d_bgcolor_f);
  1981.                 }
  1982.         }
  1983.  
  1984.         if (file_exists("data/items/$maj_d/text-t.txt")) {
  1985.                 $maj_d_text_t = file_get_contents("data/items/$maj_d/text-t.txt");
  1986.         }
  1987.         else {
  1988.                 if (isset($maj_d_text_t)) {
  1989.                         unset($maj_d_text_t);
  1990.                 }
  1991.         }
  1992.  
  1993.         if (file_exists("data/items/$maj_d/text-b.txt")) {
  1994.                 $maj_d_text_b = file_get_contents("data/items/$maj_d/text-b.txt");
  1995.         }
  1996.         else {
  1997.                 if (isset($maj_d_text_b)) {
  1998.                         unset($maj_d_text_b);
  1999.                 }
  2000.         }
  2001.  
  2002.         if (file_exists("data/items/$maj_d/text-c.txt")) {
  2003.                 $maj_d_text_c = file_get_contents("data/items/$maj_d/text-c.txt");
  2004.         }
  2005.         else {
  2006.                 if (isset($maj_d_text_c)) {
  2007.                         unset($maj_d_text_c);
  2008.                 }
  2009.         }
  2010.  
  2011.         if (file_exists("data/items/$maj_d/text-f.txt")) {
  2012.                 $maj_d_text_f = file_get_contents("data/items/$maj_d/text-f.txt");
  2013.         }
  2014.         else {
  2015.                 if (isset($maj_d_text_f)) {
  2016.                         unset($maj_d_text_f);
  2017.                 }
  2018.         }
  2019.  
  2020.         echo '<div class="panel_title"';
  2021.  
  2022.         if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
  2023.                 echo ' style="';
  2024.         }
  2025.  
  2026.         if (isset($maj_d_bgcolor_t)) {
  2027.                 echo "background-color: $maj_d_bgcolor_t;";
  2028.         }
  2029.  
  2030.         if (isset($maj_d_text_t)) {
  2031.                 echo "color: $maj_d_text_t;";
  2032.         }
  2033.  
  2034.         if (isset($maj_d_border)) {
  2035.                 echo "border-color: $maj_d_border;";
  2036.         }
  2037.  
  2038.         if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
  2039.                 echo '"';
  2040.         }
  2041.  
  2042.         echo '>';
  2043.  
  2044.         readfile("data/items/$maj_d/title.txt");
  2045.  
  2046.         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")) {
  2047.  
  2048.                 if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
  2049.                         echo "<a href=\"wiki.php?entry=$maj_d\">";
  2050.                         echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
  2051.                         echo "</a>";
  2052.                 }
  2053.  
  2054.                 if (!file_exists("data/items/$maj_d/lock.txt")) {
  2055.                         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>";
  2056.                 }
  2057.         }
  2058.  
  2059.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  2060.  
  2061.                 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>";
  2062.  
  2063.                 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)) {
  2064.                         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>";
  2065.                 }
  2066.  
  2067.                 if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
  2068.                         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>";
  2069.                 }
  2070.  
  2071.                 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>";
  2072.  
  2073.                 if (file_exists("data/items/$maj_d/passwd.txt")) {
  2074.                         echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
  2075.                 }
  2076.  
  2077.                 if (file_exists("data/items/$maj_d/private.txt")) {
  2078.                         echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
  2079.                 }
  2080.  
  2081.                 if (file_exists("data/items/$maj_d/member.txt")) {
  2082.                         echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
  2083.                 }
  2084.  
  2085.                 if (file_exists("data/items/$maj_d/cat.txt")) {
  2086.                         echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
  2087.                 }
  2088.  
  2089.                 if (file_exists("data/items/$maj_d/categories/$maj_req_category")) {
  2090.  
  2091.                         $maj_private_categories = "0";
  2092.                         $maj_book_categories = "0";
  2093.        
  2094.                         if (file_exists("data/items/$maj_d/categories")) {
  2095.                                
  2096.                                 if ($maj_dh_read_cat_dir = opendir("data/items/$maj_d/categories")) {
  2097.                                
  2098.                                         while (($maj_read_cat_dir = readdir($maj_dh_read_cat_dir)) !== false) {
  2099.                                
  2100.                                                 if ($maj_read_cat_dir != "." && $maj_read_cat_dir != "..") {
  2101.                                
  2102.                                                         if (file_exists("data/categories/$maj_read_cat_dir/private.txt")) {
  2103.                                                                 $maj_private_categories = $maj_private_categories + 1;
  2104.                                                         }
  2105.  
  2106.                                                         if (file_exists("data/categories/$maj_read_cat_dir/book.txt")) {
  2107.                                                                 $maj_book_categories = $maj_book_categories + 1;
  2108.                                                         }
  2109.                                                 }
  2110.                                         }
  2111.                                         closedir($maj_dh_read_cat_dir);
  2112.                                 }
  2113.                         }
  2114.  
  2115.                         if ($maj_private_categories > 0) {
  2116.                                 echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
  2117.                         }
  2118.  
  2119.                         if (file_exists("data/nocat.txt")) {
  2120.                                 echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
  2121.                         }
  2122.  
  2123.                         if ($maj_book_categories > 0) {
  2124.                                 echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
  2125.                         }
  2126.  
  2127.                         echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
  2128.                 }
  2129.  
  2130.         }
  2131.  
  2132.         echo "</div><div class=\"panel_entry_body\"";
  2133.  
  2134.         if (isset($maj_d_border) or isset($maj_d_bgcolor_b) or isset($maj_d_text_b)) {
  2135.                 echo ' style="';
  2136.         }
  2137.  
  2138.         if (isset($maj_d_bgcolor_b)) {
  2139.                 echo "background-color: $maj_d_bgcolor_b;";
  2140.         }
  2141.  
  2142.         if (isset($maj_d_text_b)) {
  2143.                 echo "color: $maj_d_text_b;";
  2144.         }
  2145.  
  2146.         if (isset($maj_d_border)) {
  2147.                 echo "border-color: $maj_d_border;";
  2148.         }
  2149.  
  2150.         if (isset($maj_d_border) or isset($maj_d_bgcolor_b) or isset($maj_d_text_b)) {
  2151.                 echo '"';
  2152.         }
  2153.  
  2154.         echo '>';
  2155.  
  2156.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
  2157.  
  2158.         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$maj_d/author.txt")) {
  2159.  
  2160.                 echo "<td width=\"85\" valign=\"top\">";
  2161.  
  2162.                 $maj_author = file_get_contents("data/items/$maj_d/author.txt");
  2163.  
  2164.                 echo "<a href=\"member.php?id=$maj_author\">";
  2165.  
  2166.                 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"))) {
  2167.  
  2168.                         if (file_exists("images/avatar.gif")) {
  2169.  
  2170.                                 $maj_avatar_gif_image_size = getimagesize("images/avatar.gif");
  2171.                                 $maj_avatar_gif_image_width = $maj_avatar_gif_image_size[0];
  2172.                                 $maj_avatar_gif_image_height = $maj_avatar_gif_image_size[1];
  2173.  
  2174.                                 $maj_max_avatar_gif_image_width = 80;
  2175.                        
  2176.                                 if ($maj_avatar_gif_image_width > $maj_max_avatar_gif_image_width) {  
  2177.  
  2178.                                         $maj_sizefactor = (double) ($maj_max_avatar_gif_image_width / $maj_avatar_gif_image_width) ;
  2179.                                         $maj_avatar_gif_image_width = (int) ($maj_avatar_gif_image_width * $maj_sizefactor);
  2180.                                         $maj_avatar_gif_image_height = (int) ($maj_avatar_gif_image_height * $maj_sizefactor);
  2181.  
  2182.                                         if (file_exists("data/avatar-resize-gif.txt")) {
  2183.  
  2184.                                                 $maj_avatar_gif_image_resize = imagecreatetruecolor($maj_avatar_gif_image_width,$maj_avatar_gif_image_height);
  2185.  
  2186.                                                 imagealphablending($maj_avatar_gif_image_resize, false);
  2187.                                                 imagesavealpha($maj_avatar_gif_image_resize, true);
  2188.  
  2189.                                                 $maj_avatar_gif_image_original = imagecreatefromgif("images/avatar.gif");
  2190.                                                 $maj_avatar_gif_transparent_index = imagecolortransparent($maj_avatar_gif_image_original);
  2191.  
  2192.                                                 if ($maj_avatar_gif_transparent_index >= 0) {
  2193.  
  2194.                                                         $maj_avatar_gif_transparent_color = imagecolorsforindex($maj_avatar_gif_image_original, $maj_avatar_gif_transparent_index);
  2195.                                                         $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']);
  2196.  
  2197.                                                         imagefill($maj_avatar_gif_image_resize, 0, 0, $maj_avatar_gif_transparent_index);
  2198.                                                         imagecolortransparent($maj_avatar_gif_image_resize, $maj_avatar_gif_transparent_index);
  2199.                                                 }
  2200.  
  2201.                                                 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]);
  2202.  
  2203.                                                 unlink("images/avatar.gif");
  2204.  
  2205.                                                 imagegif($maj_avatar_gif_image_resize,"images/avatar.gif",100);
  2206.  
  2207.                                                 imagedestroy($maj_avatar_gif_image_resize);
  2208.                                                 imagedestroy($maj_avatar_gif_image_original);
  2209.                                         }
  2210.                                 }
  2211.                                 echo "<img src=\"images/avatar.gif\" border=\"0\" width=\"$maj_avatar_gif_image_width\" height=\"$maj_avatar_gif_image_height\">";
  2212.                         }
  2213.  
  2214.                         if (file_exists("images/avatar.jpg")) {
  2215.  
  2216.                                 $maj_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  2217.                                 $maj_avatar_jpg_image_width = $maj_avatar_jpg_image_size[0];
  2218.                                 $maj_avatar_jpg_image_height = $maj_avatar_jpg_image_size[1];
  2219.                        
  2220.                                 $maj_max_avatar_jpg_image_width = 80;
  2221.                        
  2222.                                 if ($maj_avatar_jpg_image_width > $maj_max_avatar_jpg_image_width) {  
  2223.  
  2224.                                         $maj_sizefactor = (double) ($maj_max_avatar_jpg_image_width / $maj_avatar_jpg_image_width) ;
  2225.                                         $maj_avatar_jpg_image_width = (int) ($maj_avatar_jpg_image_width * $maj_sizefactor);
  2226.                                         $maj_avatar_jpg_image_height = (int) ($maj_avatar_jpg_image_height * $maj_sizefactor);
  2227.  
  2228.                                         if (file_exists("data/avatar-resize-jpg.txt")) {
  2229.  
  2230.                                                 $maj_avatar_jpg_image_resize = imagecreatetruecolor($maj_avatar_jpg_image_width,$maj_avatar_jpg_image_height);
  2231.                                                 $maj_avatar_jpg_image_original = imagecreatefromjpeg("images/avatar.jpg");
  2232.  
  2233.                                                 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]);
  2234.  
  2235.                                                 unlink("images/avatar.jpg");
  2236.  
  2237.                                                 imagejpeg($maj_avatar_jpg_image_resize,"images/avatar.jpg",100);
  2238.  
  2239.                                                 imagedestroy($maj_avatar_jpg_image_resize);
  2240.                                                 imagedestroy($maj_avatar_jpg_image_original);
  2241.                                         }
  2242.                                 }
  2243.                                 echo "<img src=\"images/avatar.jpg\" border=\"0\" width=\"$maj_avatar_jpg_image_width\" height=\"$maj_avatar_jpg_image_height\">";
  2244.                         }
  2245.  
  2246.                         if (file_exists("images/avatar.png")) {
  2247.  
  2248.                                 $maj_avatar_png_image_size = getimagesize("images/avatar.png");
  2249.                                 $maj_avatar_png_image_width = $maj_avatar_png_image_size[0];
  2250.                                 $maj_avatar_png_image_height = $maj_avatar_png_image_size[1];
  2251.                        
  2252.                                 $maj_max_avatar_png_image_width = 80;
  2253.                        
  2254.                                 if ($maj_avatar_png_image_width > $maj_max_avatar_png_image_width) {  
  2255.  
  2256.                                         $maj_sizefactor = (double) ($maj_max_avatar_png_image_width / $maj_avatar_png_image_width) ;
  2257.                                         $maj_avatar_png_image_width = (int) ($maj_avatar_png_image_width * $maj_sizefactor);
  2258.                                         $maj_avatar_png_image_height = (int) ($maj_avatar_png_image_height * $maj_sizefactor);
  2259.  
  2260.                                         if (file_exists("data/avatar-resize-png.txt")) {
  2261.  
  2262.                                                 $maj_avatar_png_image_resize = imagecreatetruecolor($maj_avatar_png_image_width,$maj_avatar_png_image_height);
  2263.  
  2264.                                                 imagealphablending($maj_avatar_png_image_resize, false);
  2265.                                                 imagesavealpha($maj_avatar_png_image_resize, true);
  2266.  
  2267.                                                 $maj_avatar_png_image_original = imagecreatefrompng("images/avatar.png");
  2268.  
  2269.                                                 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]);
  2270.  
  2271.                                                 unlink("images/avatar.png");
  2272.  
  2273.                                                 imagepng($maj_avatar_png_image_resize,"images/avatar.png",100);
  2274.  
  2275.                                                 imagedestroy($maj_avatar_png_image_resize);
  2276.                                                 imagedestroy($maj_avatar_png_image_original);
  2277.                                         }
  2278.                                 }
  2279.                        
  2280.                                 echo "<img src=\"images/avatar.png\" border=\"0\" width=\"$maj_avatar_png_image_width\" height=\"$maj_avatar_png_image_height\">";
  2281.                         }
  2282.                         echo "<br>";
  2283.                 }
  2284.                 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")) {
  2285.  
  2286.                         if (file_exists("images/members/$maj_author/avatar.gif")) {
  2287.  
  2288.                                 $maj_avatar_gif_image_size = getimagesize("images/members/$maj_author/avatar.gif");
  2289.                                 $maj_avatar_gif_image_width = $maj_avatar_gif_image_size[0];
  2290.                                 $maj_avatar_gif_image_height = $maj_avatar_gif_image_size[1];
  2291.  
  2292.                                 $maj_max_avatar_gif_image_width = 80;
  2293.                        
  2294.                                 if ($maj_avatar_gif_image_width > $maj_max_avatar_gif_image_width) {  
  2295.  
  2296.                                         $maj_sizefactor = (double) ($maj_max_avatar_gif_image_width / $maj_avatar_gif_image_width) ;
  2297.                                         $maj_avatar_gif_image_width = (int) ($maj_avatar_gif_image_width * $maj_sizefactor);
  2298.                                         $maj_avatar_gif_image_height = (int) ($maj_avatar_gif_image_height * $maj_sizefactor);
  2299.  
  2300.                                         if (file_exists("data/avatar-resize-gif.txt")) {
  2301.  
  2302.                                                 $maj_avatar_gif_image_resize = imagecreatetruecolor($maj_avatar_gif_image_width,$maj_avatar_gif_image_height);
  2303.  
  2304.                                                 imagealphablending($maj_avatar_gif_image_resize, false);
  2305.                                                 imagesavealpha($maj_avatar_gif_image_resize, true);
  2306.  
  2307.                                                 $maj_avatar_gif_image_original = imagecreatefromgif("images/members/$maj_author/avatar.gif");
  2308.                                                 $maj_avatar_gif_transparent_index = imagecolortransparent($maj_avatar_gif_image_original);
  2309.  
  2310.                                                 if ($maj_avatar_gif_transparent_index >= 0) {
  2311.  
  2312.                                                         $maj_avatar_gif_transparent_color = imagecolorsforindex($maj_avatar_gif_image_original, $maj_avatar_gif_transparent_index);
  2313.                                                         $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']);
  2314.  
  2315.                                                         imagefill($maj_avatar_gif_image_resize, 0, 0, $maj_avatar_gif_transparent_index);
  2316.                                                         imagecolortransparent($maj_avatar_gif_image_resize, $maj_avatar_gif_transparent_index);
  2317.                                                 }
  2318.  
  2319.                                                 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]);
  2320.  
  2321.                                                 unlink("images/members/$maj_author/avatar.gif");
  2322.  
  2323.                                                 imagegif($maj_avatar_gif_image_resize,"images/members/$maj_author/avatar.gif",100);
  2324.  
  2325.                                                 imagedestroy($maj_avatar_gif_image_resize);
  2326.                                                 imagedestroy($maj_avatar_gif_image_original);
  2327.                                         }
  2328.                                 }
  2329.                                 echo "<img src=\"images/members/$maj_author/avatar.gif\" border=\"0\" width=\"$maj_avatar_gif_image_width\" height=\"$maj_avatar_gif_image_height\">";
  2330.                         }
  2331.  
  2332.                         if (file_exists("images/members/$maj_author/avatar.jpg")) {
  2333.  
  2334.                                 $maj_avatar_jpg_image_size = getimagesize("images/members/$maj_author/avatar.jpg");
  2335.                                 $maj_avatar_jpg_image_width = $maj_avatar_jpg_image_size[0];
  2336.                                 $maj_avatar_jpg_image_height = $maj_avatar_jpg_image_size[1];
  2337.                        
  2338.                                 $maj_max_avatar_jpg_image_width = 80;
  2339.                        
  2340.                                 if ($maj_avatar_jpg_image_width > $maj_max_avatar_jpg_image_width) {  
  2341.  
  2342.                                         $maj_sizefactor = (double) ($maj_max_avatar_jpg_image_width / $maj_avatar_jpg_image_width) ;
  2343.                                         $maj_avatar_jpg_image_width = (int) ($maj_avatar_jpg_image_width * $maj_sizefactor);
  2344.                                         $maj_avatar_jpg_image_height = (int) ($maj_avatar_jpg_image_height * $maj_sizefactor);
  2345.  
  2346.                                         if (file_exists("data/avatar-resize-jpg.txt")) {
  2347.  
  2348.                                                 $maj_avatar_jpg_image_resize = imagecreatetruecolor($maj_avatar_jpg_image_width,$maj_avatar_jpg_image_height);
  2349.                                                 $maj_avatar_jpg_image_original = imagecreatefromjpeg("images/members/$maj_author/avatar.jpg");
  2350.  
  2351.                                                 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]);
  2352.  
  2353.                                                 unlink("images/members/$maj_author/avatar.jpg");
  2354.  
  2355.                                                 imagejpeg($maj_avatar_jpg_image_resize,"images/members/$maj_author/avatar.jpg",100);
  2356.  
  2357.                                                 imagedestroy($maj_avatar_jpg_image_resize);
  2358.                                                 imagedestroy($maj_avatar_jpg_image_original);
  2359.                                         }
  2360.                                 }
  2361.                                 echo "<img src=\"images/members/$maj_author/avatar.jpg\" border=\"0\" width=\"$maj_avatar_jpg_image_width\" height=\"$maj_avatar_jpg_image_height\">";
  2362.                         }
  2363.  
  2364.                         if (file_exists("images/members/$maj_author/avatar.png")) {
  2365.  
  2366.                                 $maj_avatar_png_image_size = getimagesize("images/members/$maj_author/avatar.png");
  2367.                                 $maj_avatar_png_image_width = $maj_avatar_png_image_size[0];
  2368.                                 $maj_avatar_png_image_height = $maj_avatar_png_image_size[1];
  2369.                        
  2370.                                 $maj_max_avatar_png_image_width = 80;
  2371.                        
  2372.                                 if ($maj_avatar_png_image_width > $maj_max_avatar_png_image_width) {  
  2373.                                         $maj_sizefactor = (double) ($maj_max_avatar_png_image_width / $maj_avatar_png_image_width) ;
  2374.                                         $maj_avatar_png_image_width = (int) ($maj_avatar_png_image_width * $maj_sizefactor);
  2375.                                         $maj_avatar_png_image_height = (int) ($maj_avatar_png_image_height * $maj_sizefactor);
  2376.  
  2377.                                         if (file_exists("data/avatar-resize-png.txt")) {
  2378.  
  2379.                                                 $maj_avatar_png_image_resize = imagecreatetruecolor($maj_avatar_png_image_width,$maj_avatar_png_image_height);
  2380.  
  2381.                                                 imagealphablending($maj_avatar_png_image_resize, false);
  2382.                                                 imagesavealpha($maj_avatar_png_image_resize, true);
  2383.  
  2384.                                                 $maj_avatar_png_image_original = imagecreatefrompng("images/members/$maj_author/avatar.png");
  2385.  
  2386.                                                 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]);
  2387.  
  2388.                                                 unlink("images/members/$maj_author/avatar.png");
  2389.  
  2390.                                                 imagepng($maj_avatar_png_image_resize,"images/members/$maj_author/avatar.png",100);
  2391.  
  2392.                                                 imagedestroy($maj_avatar_png_image_resize);
  2393.                                                 imagedestroy($maj_avatar_png_image_original);
  2394.                                         }
  2395.                                 }
  2396.                        
  2397.                                 echo "<img src=\"images/members/$maj_author/avatar.png\" border=\"0\" width=\"$maj_avatar_png_image_width\" height=\"$maj_avatar_png_image_height\">";
  2398.                         }
  2399.                         echo "<br>";
  2400.                 }
  2401.  
  2402.                 echo "<b>$maj_author</b></a><br>";
  2403.  
  2404.                 if ((file_get_contents("data/username.txt") == $maj_author) and file_exists("data/rank.txt")) {
  2405.                         echo "administrator<br>";
  2406.                 }
  2407.                 elseif (file_exists("data/members/active/$maj_author/rank.txt") and file_exists("data/rank.txt")) {
  2408.                         $maj_rank = file_get_contents("data/members/active/$maj_author/rank.txt");
  2409.                         echo "$maj_rank<br>";
  2410.                 }
  2411.                 elseif (!file_exists("data/members/active/$maj_author/rank.txt") and file_exists("data/rank.txt")) {
  2412.                         echo "member<br>";
  2413.                 }
  2414.  
  2415.                 if ($maj_dh_author_posts = opendir("data/items")) {
  2416.  
  2417.                         while (($maj_author_post = readdir($maj_dh_author_posts)) !== false) {
  2418.  
  2419.                                 if ($maj_author_post != "." && $maj_author_post != "..") {
  2420.  
  2421.                                         if (file_exists("data/items/$maj_author_post/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  2422.                                                 continue;
  2423.                                         }
  2424.  
  2425.                                         $maj_private_categories = "0";
  2426.        
  2427.                                         if (file_exists("data/items/$maj_author_post/categories")) {
  2428.                                
  2429.                                                 if ($maj_dh_entry_categories_posts = opendir("data/items/$maj_author_post/categories")) {
  2430.                                
  2431.                                                         while (($maj_entry_category_posts = readdir($maj_dh_entry_categories_posts)) !== false) {
  2432.                                
  2433.                                                                 if ($maj_entry_category_posts != "." && $maj_entry_category_posts != "..") {
  2434.                                
  2435.                                                                         if (file_exists("data/categories/$maj_entry_category_posts/private.txt")) {
  2436.                                                                                 $maj_private_categories = $maj_private_categories + 1;
  2437.                                                                         }
  2438.                                                                 }
  2439.                                                         }
  2440.                                                         closedir($maj_dh_entry_categories_posts);
  2441.                                                 }
  2442.                                         }
  2443.        
  2444.                                         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")) {
  2445.                                                 continue;
  2446.                                         }
  2447.  
  2448.                                         if (file_exists("data/members/active/$maj_author") and file_exists("data/bb.txt")) {
  2449.  
  2450.                                                 if (file_exists("data/items/$maj_author_post/author.txt") and (file_get_contents("data/items/$maj_author_post/author.txt") == $maj_author)) {
  2451.                                                         $maj_items_posts[] = $maj_author_post;
  2452.                                                 }
  2453.                                         }
  2454.                                         elseif (!file_exists("data/members/active/$maj_author") and (file_get_contents("data/username.txt") == $maj_author) and file_exists("data/bb.txt")) {
  2455.  
  2456.                                                 if (file_exists("data/items/$maj_author_post/author.txt") and (file_get_contents("data/items/$maj_author_post/author.txt") == $maj_author)) {
  2457.                                                         $maj_items_posts[] = $maj_author_post;
  2458.                                                 }
  2459.                                         }
  2460.                                 }
  2461.                         }
  2462.                         closedir($maj_dh_author_posts);
  2463.                 }
  2464.  
  2465.                 $maj_posts = count($maj_items_posts);
  2466.  
  2467.                 if ($maj_posts == 1) {
  2468.                         echo "$maj_posts post";
  2469.                 }
  2470.  
  2471.                 if ($maj_posts > 1) {
  2472.                         echo "$maj_posts posts";
  2473.                 }
  2474.  
  2475.                 unset($maj_items_posts);
  2476.  
  2477.                 echo "</td><td width=513 valign=top>";
  2478.         }
  2479.         else {
  2480.                 echo "<td width=598 valign=top>";
  2481.         }
  2482.  
  2483.         if (file_exists("data/items/$maj_d/passwd.txt")) {
  2484.                 $maj_passwd = file_get_contents("data/items/$maj_d/passwd.txt");
  2485.         }
  2486.  
  2487.         if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
  2488.                 $maj_crypt_passwd = sha1($_REQUEST['passwd']);
  2489.                 $maj_crypt_passwd = md5($maj_crypt_passwd);
  2490.                 $maj_crypt_passwd = crypt($maj_crypt_passwd,$maj_crypt_passwd);
  2491.         }
  2492.  
  2493.         echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
  2494.  
  2495.         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"))))) {
  2496.                 $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
  2497.                 echo "$maj_xavatar_author - ";
  2498.         }
  2499.  
  2500.         entry2date($maj_d);
  2501.  
  2502.         if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) or file_exists("data/items/$maj_d/lastmod.txt")) {
  2503.  
  2504.                 if (file_exists("data/items/$maj_d/revisions.txt")) {
  2505.                         echo " (Revision ";
  2506.                         readfile("data/items/$maj_d/revisions.txt");
  2507.                         echo " - ";
  2508.                         echo date("l, M j, Y, g:i A",filemtime("data/items/$maj_d/body.txt"));
  2509.                         echo ")";
  2510.                 }
  2511.         }
  2512.  
  2513.         echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
  2514.  
  2515.         if (isset($maj_d_text_b)) {
  2516.                 echo "<font style=\"color: $maj_d_text_b;\">";
  2517.         }
  2518.  
  2519.         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))) {
  2520.                 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.";
  2521.         }
  2522.         else {
  2523.                 $maj_entry_body = file_get_contents("data/items/$maj_d/body.txt");
  2524.  
  2525.                 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"))))) {
  2526.  
  2527.                         $maj_badwords = file_get_contents("data/pf-badwords.txt");
  2528.  
  2529.                         if (file_exists("data/pf-censor.txt")) {
  2530.                                 $maj_censor = file_get_contents("data/pf-censor.txt");
  2531.                         }
  2532.                         else {
  2533.                                 $maj_censor = "[expletive]";
  2534.                         }
  2535.                         $maj_entry_body = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_entry_body);
  2536.                 }
  2537.  
  2538.                 // if (file_exists("data/items/$maj_d/maxlines.txt") and (!isset($_REQUEST['view']) or ($_REQUEST['view'] != "full"))) {
  2539.                 if (file_exists("data/items/$maj_d/maxlines.txt") and (!isset($maj_req_entry) or empty($maj_req_entry))) {
  2540.  
  2541.                         $maj_entry_shorten = file_get_contents("data/items/$maj_d/maxlines.txt");
  2542.  
  2543.                         $maj_entry_lines = explode("\r",$maj_entry_body);
  2544.  
  2545.                         if (count($maj_entry_lines) > $maj_entry_shorten) {
  2546.                                 $maj_entry_body = implode("",array_slice($maj_entry_lines,0,$maj_entry_shorten));
  2547.                                 $maj_entry_body = $maj_entry_body . "<br><br><a href=\"index.php?entry=$maj_d\">read more</a>";
  2548.                         }
  2549.                 }
  2550.  
  2551.                 echo $maj_entry_body;
  2552.         }
  2553.  
  2554.         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")) {
  2555.                 $maj_sig = file_get_contents("data/sig.txt");
  2556.                 echo "<br><br>--<br>$maj_sig";
  2557.         }
  2558.         elseif (file_exists("data/members/active/$maj_author/sig.txt") and file_exists("data/bb.txt")  and file_exists("data/bb-sig.txt")) {
  2559.                 $maj_sig = file_get_contents("data/members/active/$maj_author/sig.txt");
  2560.                 echo "<br><br>--<br>$maj_sig";
  2561.         }
  2562.  
  2563.         if (isset($maj_d_text_b)) {
  2564.                 echo "</font>";
  2565.         }
  2566.  
  2567.         echo "</td></tr></table>";
  2568.  
  2569.         echo "</div>";
  2570.  
  2571.         if (file_exists("data/items/$maj_d/categories") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2572.                
  2573.                 if ($maj_dh_entry_categories = opendir("data/items/$maj_d/categories")) {
  2574.                
  2575.                         while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
  2576.                
  2577.                                 if ($maj_entry_category != "." && $maj_entry_category != "..") {
  2578.                                         $maj_entry_categories[] = $maj_entry_category;
  2579.                                 }
  2580.                         }
  2581.                         closedir($maj_dh_entry_categories);
  2582.                 }
  2583.  
  2584.                 sort($maj_entry_categories);
  2585.                 reset($maj_entry_categories);
  2586.  
  2587.                 if (count($maj_entry_categories) > 0) {
  2588.  
  2589.                         if (count($maj_entry_categories) > 1) {
  2590.                                 $maj_category_list = "categories";
  2591.                         }
  2592.                         else {
  2593.                                 $maj_category_list = "category";
  2594.                         }
  2595.  
  2596.                         foreach ($maj_entry_categories as $maj_filed_under) {
  2597.                                 $maj_category_list = $maj_category_list . " | <a href=\"index.php?category=$maj_filed_under\" class=\"status\">$maj_filed_under</a>";
  2598.                         }
  2599.  
  2600.                         echo "<div class=\"panel_category\"";
  2601.  
  2602.                         if (isset($maj_d_border) or isset($maj_d_bgcolor_c) or isset($maj_d_text_c)) {
  2603.                                 echo ' style="';
  2604.                         }
  2605.  
  2606.                         if (isset($maj_d_bgcolor_c)) {
  2607.                                 echo "background-color: $maj_d_bgcolor_c;";
  2608.                         }
  2609.  
  2610.                         if (isset($maj_d_text_c)) {
  2611.                                 echo "color: $maj_d_text_c;";
  2612.                         }
  2613.  
  2614.                         if (isset($maj_d_border)) {
  2615.                                 echo "border-color: $maj_d_border;";
  2616.                         }
  2617.  
  2618.                         if (isset($maj_d_border) or isset($maj_d_bgcolor_c) or isset($maj_d_text_c)) {
  2619.                                 echo '"';
  2620.                         }
  2621.  
  2622.                         echo ">$maj_category_list</div>";
  2623.                 }
  2624.                 unset($maj_entry_categories);
  2625.         }
  2626.  
  2627.         echo "<div class=\"panel_footer\"";
  2628.  
  2629.         if (isset($maj_d_border) or isset($maj_d_bgcolor_f) or isset($maj_d_text_f)) {
  2630.                 echo ' style="';
  2631.         }
  2632.  
  2633.         if (isset($maj_d_bgcolor_f)) {
  2634.                 echo "background-color: $maj_d_bgcolor_f;";
  2635.         }
  2636.  
  2637.         if (isset($maj_d_text_f)) {
  2638.                 echo "color: $maj_d_text_f;";
  2639.         }
  2640.  
  2641.         if (isset($maj_d_border)) {
  2642.                 echo "border-color: $maj_d_border;";
  2643.         }
  2644.  
  2645.         if (isset($maj_d_border) or isset($maj_d_bgcolor_f) or isset($maj_d_text_f)) {
  2646.                 echo '"';
  2647.         }
  2648.  
  2649.         echo '>';
  2650.  
  2651.         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")) {
  2652.  
  2653.                 if (!file_exists("data/items/$maj_d/comments/live")) {
  2654.                         echo "<a href=\"index.php?entry=$maj_d&show=comments\" class=\"status\">add comment</a>";
  2655.                 }
  2656.                 else {
  2657.                         if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
  2658.        
  2659.                                 while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
  2660.        
  2661.                                         if ($maj_live_comment != "." && $maj_live_comment != "..") {
  2662.                                                 $maj_live_comments[] = $maj_live_comment;
  2663.                                         }
  2664.                                 }
  2665.                                 closedir($maj_dh_comments);
  2666.                         }
  2667.  
  2668.                         $maj_count_live_comments = count($maj_live_comments);
  2669.  
  2670.                         echo "<a href=\"index.php?entry=$maj_d&show=comments\" class=\"status\">";
  2671.  
  2672.                         if ($maj_count_live_comments == 1) {
  2673.                                 echo "$maj_count_live_comments comment";
  2674.                         }
  2675.                         elseif ($maj_count_live_comments < 1) {
  2676.                                 echo "add comment";
  2677.                         }
  2678.                         else {
  2679.                                 echo "$maj_count_live_comments comments";
  2680.                         }
  2681.                         echo "</a>";
  2682.  
  2683.                         unset($maj_live_comments);
  2684.                 }
  2685.         }
  2686.         else {
  2687.                 echo "<a href=\"index.php?entry=$maj_d\" class=\"status\">permalink</a>";
  2688.         }
  2689.  
  2690.         if (file_exists("data/items/$maj_d/views.txt")) {
  2691.  
  2692.                 $maj_views_value = file_get_contents("data/items/$maj_d/views.txt");
  2693.  
  2694.                 if ($maj_views_value == 1) {
  2695.                         echo " ( $maj_views_value view ) ";
  2696.                 }
  2697.                 elseif ($maj_views_value > 1) {
  2698.                         echo " ( $maj_views_value views ) ";
  2699.                 }
  2700.                 else {
  2701.                         echo " ";
  2702.                 }
  2703.         }
  2704.  
  2705.         if (!file_exists("images/$maj_d/album")) {
  2706.                 echo " ";
  2707.         }
  2708.         else {
  2709.                 if ($maj_dh_album = opendir("images/$maj_d/album")) {
  2710.  
  2711.                         while (($maj_entry_album = readdir($maj_dh_album)) !== false) {
  2712.  
  2713.                                 if ($maj_entry_album != "." && $maj_entry_album != "..") {
  2714.                                         $maj_items_album[] = $maj_entry_album;
  2715.                                 }
  2716.                         }
  2717.                         closedir($maj_dh_album);
  2718.                 }
  2719.  
  2720.                 $maj_album = count($maj_items_album);
  2721.  
  2722.                 echo " | <a href=\"index.php?entry=$maj_d&show=album\" class=\"status\">";
  2723.  
  2724.                 if ($maj_album == 1) {
  2725.                         echo "$maj_album image";
  2726.                 }
  2727.                 elseif ($maj_album < 1) {
  2728.                         echo "album";
  2729.                 }
  2730.                 else {
  2731.                         echo "$maj_album images";
  2732.                 }
  2733.  
  2734.                 echo "</a>";
  2735.  
  2736.                 unset($maj_items_album);
  2737.         }
  2738.  
  2739.         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)) {
  2740.  
  2741.                 if (!file_exists("data/items/$maj_d/album")) {
  2742.                         mkdir("data/items/$maj_d/album");
  2743.                 }
  2744.  
  2745.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  2746.  
  2747.                         $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
  2748.  
  2749.                         $maj_album_views_value = $maj_album_views_value + 1;
  2750.  
  2751.                         $maj_fp_album_views_txt = fopen("data/items/$maj_d/album/views.txt","w");
  2752.                         fwrite($maj_fp_album_views_txt,$maj_album_views_value);
  2753.                         fclose($maj_fp_album_views_txt);
  2754.                 }
  2755.         }
  2756.  
  2757.  
  2758.         $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
  2759.  
  2760.         if ($maj_album_views_value == 1) {
  2761.                 echo " ( $maj_album_views_value view ) ";
  2762.         }
  2763.         elseif ($maj_album_views_value > 1) {
  2764.                 echo " ( $maj_album_views_value views ) ";
  2765.         }
  2766.         else {
  2767.                 echo " ";
  2768.         }
  2769.  
  2770.         if (!file_exists("data/items/$maj_d/filedrop/files")) {
  2771.                 echo " ";
  2772.         }
  2773.         else {
  2774.                 if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
  2775.  
  2776.                         while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
  2777.  
  2778.                                 if ($maj_dl_file != "." && $maj_dl_file != "..") {
  2779.                                         $maj_items_filedrop[] = $maj_dl_file;
  2780.                                 }
  2781.                         }
  2782.                         closedir($maj_dh_filedrop);
  2783.                 }
  2784.  
  2785.                 $maj_filedrop = count($maj_items_filedrop);
  2786.  
  2787.                 echo " | <a href=\"index.php?entry=$maj_d&show=filedrop\" class=\"status\">";
  2788.  
  2789.                 if ($maj_filedrop == 1) {
  2790.                         echo "$maj_filedrop file";
  2791.                 }
  2792.                 elseif ($maj_filedrop < 1) {
  2793.                         echo "filedrop";
  2794.                 }
  2795.                 else {
  2796.                         echo "$maj_filedrop files";
  2797.                 }
  2798.  
  2799.                 echo "</a> ";
  2800.  
  2801.                 unset($maj_items_filedrop);
  2802.         }
  2803.  
  2804.         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)) {
  2805.  
  2806.                 if (!file_exists("data/items/$maj_d/filedrop")) {
  2807.                         mkdir("data/items/$maj_d/filedrop");
  2808.                 }
  2809.  
  2810.                 if (file_exists("data/items/$maj_d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  2811.  
  2812.                         $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
  2813.  
  2814.                         $maj_filedrop_views_value = $maj_filedrop_views_value + 1;
  2815.  
  2816.                         $maj_fp_filedrop_views_txt = fopen("data/items/$maj_d/filedrop/views.txt","w");
  2817.                         fwrite($maj_fp_filedrop_views_txt,$maj_filedrop_views_value);
  2818.                         fclose($maj_fp_filedrop_views_txt);
  2819.                 }
  2820.         }
  2821.  
  2822.  
  2823.         $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
  2824.  
  2825.         if ($maj_filedrop_views_value == 1) {
  2826.                 echo " ( $maj_filedrop_views_value view ) ";
  2827.         }
  2828.         elseif ($maj_filedrop_views_value > 1) {
  2829.                 echo " ( $maj_filedrop_views_value views ) ";
  2830.         }
  2831.         else {
  2832.                 echo " ";
  2833.         }
  2834.  
  2835.         if (!file_exists("data/nopdf.txt") and file_exists("data/items/$maj_d/pdf/file")) {
  2836.  
  2837.                 echo "| <a href=\"index.php?entry=$maj_d&show=pdf\" class=\"status\">pdf</a> ";
  2838.  
  2839.                 if (($maj_req_show == pdf) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  2840.  
  2841.                         $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
  2842.  
  2843.                         $maj_pdf_views_value = $maj_pdf_views_value + 1;
  2844.  
  2845.                         $maj_fp_pdf_views_txt = fopen("data/items/$maj_d/pdf/count/views.txt","w");
  2846.                         fwrite($maj_fp_pdf_views_txt,$maj_pdf_views_value);
  2847.                         fclose($maj_fp_pdf_views_txt);
  2848.                 }
  2849.  
  2850.                 $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
  2851.  
  2852.                 if ($maj_pdf_views_value == 1) {
  2853.                         echo " ( $maj_pdf_views_value view ) ";
  2854.                 }
  2855.                 elseif ($maj_pdf_views_value > 1) {
  2856.                         echo " ( $maj_pdf_views_value views ) ";
  2857.                 }
  2858.                 else {
  2859.                         echo " ";
  2860.                 }
  2861.         }
  2862.  
  2863.         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")) {
  2864.                 echo "| <a href=\"index.php?entry=$maj_d\" class=\"status\">permalink</a>";
  2865.         }
  2866.  
  2867.         echo "</div>";
  2868.  
  2869.         echo "</td></tr></table>";
  2870.  
  2871.         if ($maj_count_entry_panels > 0) {
  2872.  
  2873.                 foreach ($maj_entry_panels as $maj_entry_panel) {
  2874.  
  2875.                         if (!file_exists("data/panels/$maj_entry_panel/free.txt")) {
  2876.  
  2877.                                 if (file_exists("data/panels/$maj_entry_panel/border.txt")) {
  2878.                                         $maj_entry_panel_border = file_get_contents("data/panels/$maj_entry_panel/border.txt");
  2879.                                 }
  2880.                                 else {
  2881.                                         if (isset($maj_entry_panel_border)) {
  2882.                                                 unset($maj_entry_panel_border);
  2883.                                         }
  2884.                                 }
  2885.  
  2886.                                 if (file_exists("data/panels/$maj_entry_panel/bgcolor-t.txt")) {
  2887.                                         $maj_entry_panel_bgcolor_t = file_get_contents("data/panels/$maj_entry_panel/bgcolor-t.txt");
  2888.                                 }
  2889.                                 else {
  2890.                                         if (isset($maj_entry_panel_bgcolor_t)) {
  2891.                                                 unset($maj_entry_panel_bgcolor_t);
  2892.                                         }
  2893.                                 }
  2894.  
  2895.                                 if (file_exists("data/panels/$maj_entry_panel/bgcolor-c.txt")) {
  2896.                                         $maj_entry_panel_bgcolor_c = file_get_contents("data/panels/$maj_entry_panel/bgcolor-c.txt");
  2897.                                 }
  2898.                                 else {
  2899.                                         if (isset($maj_entry_panel_bgcolor_c)) {
  2900.                                                 unset($maj_entry_panel_bgcolor_c);
  2901.                                         }
  2902.                                 }
  2903.  
  2904.                                 if (file_exists("data/panels/$maj_entry_panel/text-t.txt")) {
  2905.                                         $maj_entry_panel_text_t = file_get_contents("data/panels/$maj_entry_panel/text-t.txt");
  2906.                                 }
  2907.                                 else {
  2908.                                         if (isset($maj_entry_panel_text_t)) {
  2909.                                                 unset($maj_entry_panel_text_t);
  2910.                                         }
  2911.                                 }
  2912.  
  2913.                                 if (file_exists("data/panels/$maj_entry_panel/text-c.txt")) {
  2914.                                         $maj_entry_panel_text_c = file_get_contents("data/panels/$maj_entry_panel/text-c.txt");
  2915.                                 }
  2916.                                 else {
  2917.                                         if (isset($maj_entry_panel_text_c)) {
  2918.                                                 unset($maj_entry_panel_text_c);
  2919.                                         }
  2920.                                 }
  2921.  
  2922.                                 echo '<div class="panel_title"';
  2923.  
  2924.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
  2925.                                         echo ' style="';
  2926.                                 }
  2927.  
  2928.                                 if (isset($maj_entry_panel_bgcolor_t)) {
  2929.                                         echo "background-color: $maj_entry_panel_bgcolor_t;";
  2930.                                 }
  2931.  
  2932.                                 if (isset($maj_entry_panel_text_t)) {
  2933.                                         echo "color: $maj_entry_panel_text_t;";
  2934.                                 }
  2935.  
  2936.                                 if (isset($maj_entry_panel_border)) {
  2937.                                         echo "border-color: $maj_entry_panel_border;";
  2938.                                 }
  2939.  
  2940.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
  2941.                                         echo '"';
  2942.                                 }
  2943.  
  2944.                                 echo '>';
  2945.  
  2946.                                 readfile("data/panels/$maj_entry_panel/title.txt");
  2947.  
  2948.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  2949.                                         echo "<a href=\"panels.php#{$maj_entry_panel}\">";
  2950.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  2951.                                 }
  2952.  
  2953.                                 if (file_exists("data/panels/$maj_entry_panel/private.txt")) {
  2954.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  2955.                                 }
  2956.  
  2957.                                 echo '</div>';
  2958.  
  2959.                                 echo '<div class="panel_body"';
  2960.  
  2961.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c) or isset($maj_entry_panel_text_c)) {
  2962.                                         echo ' style="';
  2963.                                 }
  2964.  
  2965.                                 if (isset($maj_entry_panel_bgcolor_c)) {
  2966.                                         echo "background-color: $maj_entry_panel_bgcolor_c;";
  2967.                                 }
  2968.  
  2969.                                 if (isset($maj_entry_panel_text_c)) {
  2970.                                         echo "color: $maj_entry_panel_text_c;";
  2971.                                 }
  2972.  
  2973.                                 if (isset($maj_entry_panel_border)) {
  2974.                                         echo "border-color: $maj_entry_panel_border;";
  2975.                                 }
  2976.  
  2977.                                 if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c) or isset($maj_entry_panel_text_c)) {
  2978.                                         echo '"';
  2979.                                 }
  2980.  
  2981.                                 echo '>';
  2982.                         }
  2983.  
  2984.                         if (file_exists("data/panels/$maj_entry_panel/free.txt")) {
  2985.                                 echo '<div class=panel_free>';
  2986.                         }
  2987.  
  2988.                         include("data/panels/$maj_entry_panel/panel.php");
  2989.  
  2990.                         echo '</div>';
  2991.  
  2992.                         if (file_exists("data/panels/$maj_entry_panel/free.txt") and !file_exists("data/panels/$maj_entry_panel/nomargin.txt")) {
  2993.                                 echo "<div style=\"height:10px;\"></div>";
  2994.                         }
  2995.                 }
  2996.         }
  2997.  
  2998.         if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == album) and file_exists("images/$maj_d/album")) {
  2999.  
  3000.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3001.  
  3002.                 echo '<div class="panel_title">Album';
  3003.                
  3004.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3005.                         echo '<a href=del.php?entry=';
  3006.                         echo $maj_d;
  3007.                         echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
  3008.                 }
  3009.                 echo '</div><div class=panel_body>';
  3010.  
  3011.                 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))) {
  3012.                         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.";
  3013.                 }
  3014.                 else {
  3015.                         if (file_exists("images/$maj_d/thumbnails")) {
  3016.                                 if ($maj_dh_album = opendir("images/$maj_d/thumbnails")) {
  3017.                                         while (($maj_thumbnail_album = readdir($maj_dh_album)) !== false) {
  3018.                                                 if ($maj_thumbnail_album != "." && $maj_thumbnail_album != "..") {
  3019.                                                         $maj_current_thumbnail = "images/$maj_d/thumbnails/$maj_thumbnail_album";
  3020.                                                         $maj_parent_image = str_replace("-thumbnail.jpg","",$maj_thumbnail_album);
  3021.                                                         $maj_parent_image = "images/$maj_d/album/$maj_parent_image";
  3022.                                                         if (file_exists($maj_current_thumbnail) and !file_exists($maj_parent_image)) {
  3023.                                                                 unlink($maj_current_thumbnail);
  3024.                                                         }
  3025.                                                 }
  3026.                                         }
  3027.                                 }
  3028.                         }
  3029.  
  3030.                         if (file_exists("data/items/$maj_d/album/captions")) {
  3031.                                 if ($maj_dh_album = opendir("data/items/$maj_d/album/captions")) {
  3032.                                         while (($maj_caption_album = readdir($maj_dh_album)) !== false) {
  3033.                                                 if ($maj_caption_album != "." && $maj_caption_album != "..") {
  3034.                                                         $maj_current_caption = "data/items/$maj_d/album/captions/$maj_caption_album";
  3035.                                                         $maj_parent_image = str_replace(".txt","",$maj_caption_album);
  3036.                                                         $maj_parent_image = "images/$maj_d/album/$maj_parent_image";
  3037.                                                         if (file_exists($maj_current_caption) and !file_exists($maj_parent_image)) {
  3038.                                                                 unlink($maj_current_caption);
  3039.                                                         }
  3040.                                                 }
  3041.                                         }
  3042.                                 }
  3043.                         }
  3044.        
  3045.                         if (file_exists("images/$maj_d/album")) {
  3046.                                 if ($maj_dh_album = opendir("images/$maj_d/album")) {
  3047.                                         while (($maj_entry_album = readdir($maj_dh_album)) !== false) {
  3048.                                                 if ($maj_entry_album != "." && $maj_entry_album != "..") {
  3049.                                                         $maj_sort_album[] = $maj_entry_album;
  3050.                                                 }
  3051.                                         }
  3052.                                 closedir($maj_dh_album);
  3053.                                 }
  3054.        
  3055.                                 sort($maj_sort_album);
  3056.                                 reset($maj_sort_album);
  3057.                                 $maj_count_album_entry = count($maj_sort_album);
  3058.                                
  3059.                                 if ($maj_count_album_entry < 1) {
  3060.                                         rmdirr("images/$maj_d/album");
  3061.                                         rmdirr("images/$maj_d/thumbnails");                            
  3062.                                 }
  3063.                                 else {
  3064.                                         foreach($maj_sort_album as $maj_album_entry) {
  3065.                                                 $maj_current_image = "images/$maj_d/album/$maj_album_entry";
  3066.                                                 $maj_current_image_size = getimagesize($maj_current_image);
  3067.                                                 $maj_current_width = $maj_current_image_size[0];
  3068.                                                 $maj_current_height = $maj_current_image_size[1];
  3069.                                                 $maj_max_width = 98;
  3070.                                                 $maj_max_height = 73;
  3071.  
  3072.                                                 if (($maj_current_width > $maj_max_width) || ($maj_current_height > $maj_max_height)) {  
  3073.  
  3074.                                                         if ($maj_current_height > $maj_current_width) {
  3075.                                                                 $maj_sizefactor = (double) ($maj_max_height / $maj_current_height);
  3076.                                                         }
  3077.                                                         else {
  3078.                                                                 $maj_sizefactor = (double) ($maj_max_width / $maj_current_width) ;
  3079.                                                         }
  3080.  
  3081.                                                         $maj_new_width = (int) ($maj_current_width * $maj_sizefactor);
  3082.                                                         $maj_new_height = (int) ($maj_current_height * $maj_sizefactor);
  3083.                                                 }
  3084.                                                 else {
  3085.                                                         $maj_new_width = $maj_current_width;
  3086.                                                         $maj_new_height = $maj_current_height;
  3087.                                                 }
  3088.        
  3089.                                                 if (!file_exists("images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg")) {
  3090.        
  3091.                                                         $maj_work_thumb = imagecreatetruecolor($maj_new_width,$maj_new_height);
  3092.                                                         $maj_get_mimetype = image_type_to_mime_type(exif_imagetype($maj_current_image));
  3093.  
  3094.                                                         switch($maj_get_mimetype) {
  3095.                                                                 case "image/jpg":
  3096.                                                                 case "image/jpeg":
  3097.                                                                         $maj_work_image = imagecreatefromjpeg($maj_current_image);
  3098.                                                                         break;
  3099.                                                                 case "image/gif":
  3100.                                                                         $maj_work_image = imagecreatefromgif($maj_current_image);
  3101.                                                                         break;
  3102.                                                                 case "image/png":
  3103.                                                                         $maj_work_image = imagecreatefrompng($maj_current_image);
  3104.                                                                         break;
  3105.                                                         }
  3106.        
  3107.                                                         imagecopyresampled($maj_work_thumb,$maj_work_image,0,0,0,0,$maj_new_width,$maj_new_height,$maj_current_width,$maj_current_height);
  3108.        
  3109.                                                         if (!file_exists("images/$maj_d/thumbnails")) {
  3110.                                                                 mkdir("images/$maj_d/thumbnails");
  3111.                                                         }
  3112.        
  3113.                                                         imagejpeg($maj_work_thumb,"images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg",80);
  3114.  
  3115.                                                         imagedestroy($maj_work_thumb);
  3116.                                                         imagedestroy($maj_work_image);
  3117.                                                 }
  3118.  
  3119.                                                 echo "<a href=\"album.php?entry=$maj_d&show=$maj_album_entry\">";
  3120.  
  3121.                                                 if (!file_exists("images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg")) {
  3122.                                                         echo "<img src=\"images/$maj_d/album/$maj_album_entry\" width=$maj_new_width height=$maj_new_height border=0 hspace=2 vspace=2";
  3123.                                                 }
  3124.                                                 else {
  3125.                                                         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";
  3126.                                                 }
  3127.  
  3128.                                                 if (file_exists("data/items/$maj_d/album/captions/{$maj_album_entry}.txt")) {
  3129.                                                         echo ' alt="';
  3130.                                                         $maj_img_alt = file_get_contents("data/items/$maj_d/album/captions/{$maj_album_entry}.txt");
  3131.                                                         $maj_img_alt = strip_tags($maj_img_alt);
  3132.                                                         echo $maj_img_alt;
  3133.                                                         echo '"';
  3134.                                                 }
  3135.                                                 echo "></a>";
  3136.                                         }
  3137.                                 }
  3138.                         }
  3139.                 }
  3140.                 echo '</div>';
  3141.  
  3142.                 echo '</td></tr></table>';
  3143.  
  3144.         }
  3145.  
  3146.         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")) {
  3147.  
  3148.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3149.  
  3150.                 echo "<div class=panel_title>Filedrop";
  3151.  
  3152.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3153.                         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>";
  3154.                 }
  3155.                 echo "</div><div class=panel_body>";
  3156.  
  3157.                 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))) {
  3158.                         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.";
  3159.                 }
  3160.                 else {
  3161.  
  3162.                         if ($maj_dh_count = opendir("data/items/$maj_d/filedrop/count")) {
  3163.  
  3164.                                 while (($maj_dl_count = readdir($maj_dh_count)) !== false) {
  3165.  
  3166.                                         if ($maj_dl_count != "." && $maj_dl_count != "..") {
  3167.  
  3168.                                                 $maj_dl_match = substr("$maj_dl_count",0,-4);
  3169.  
  3170.                                                 if (file_exists("data/items/$maj_d/filedrop/count/$maj_dl_count") and !file_exists("data/items/$maj_d/filedrop/files/$maj_dl_match")) {
  3171.                                                         unlink("data/items/$maj_d/filedrop/count/$maj_dl_count");
  3172.                                                 }
  3173.                                         }
  3174.                                 }
  3175.                                 closedir($maj_dh_count);
  3176.                         }
  3177.  
  3178.                         if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
  3179.                                 while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
  3180.                                         if ($maj_dl_file != "." && $maj_dl_file != "..") {
  3181.                                                 $maj_filedrop_files[] = $maj_dl_file;
  3182.                                         }
  3183.                                 }
  3184.                         closedir($maj_dh_filedrop);
  3185.                         }
  3186.  
  3187.                         reset($maj_filedrop_files);
  3188.                         sort($maj_filedrop_files);
  3189.  
  3190.                         foreach ($maj_filedrop_files as $maj_filedrop_file) {
  3191.  
  3192.                                 echo "<table border=0 cellspacing=0 cellpadding=4><tr><td>";
  3193.                                 echo "<a href=\"index.php?entry=$maj_d&download=$maj_filedrop_file&type=filedrop\">";
  3194.                                 echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
  3195.                                 echo "<td><b>$maj_filedrop_file</b>";
  3196.  
  3197.                                 if (file_exists("data/items/$maj_d/filedrop/sha1.txt")) {
  3198.                                         $maj_sha1 = sha1_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
  3199.                                         echo "<br>$maj_sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
  3200.                                 }
  3201.                                 if (file_exists("data/items/$maj_d/filedrop/md5.txt")) {
  3202.                                         $maj_md5 = md5_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
  3203.                                         echo "<br>$maj_md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
  3204.                                 }
  3205.  
  3206.                                 $maj_size = filesize("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
  3207.                                 $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);
  3208.  
  3209.                                 echo "<br>$maj_size_string";
  3210.  
  3211.                                 $maj_filedrop_count_file = "data/items/$maj_d/filedrop/count/$maj_filedrop_file" . '.txt';
  3212.  
  3213.                                 if (file_exists($maj_filedrop_count_file)) {
  3214.                                         $maj_fp_filedrop_count = fopen($maj_filedrop_count_file,"r");
  3215.                                         $maj_filedrop_count = fread($maj_fp_filedrop_count,filesize($maj_filedrop_count_file));
  3216.                                         fclose($maj_fp_filedrop_count);
  3217.                                         echo "<br>$maj_filedrop_count";
  3218.                                
  3219.                                         if ($maj_filedrop_count == 1) {
  3220.                                                 echo " download";
  3221.                                         }
  3222.                                         if ($maj_filedrop_count > 1) {
  3223.                                                 echo " downloads";
  3224.                                         }
  3225.                                 }
  3226.                                 echo "</td></tr></table>";
  3227.                         }
  3228.                 }
  3229.                 echo "</div>";
  3230.  
  3231.                 echo '</td></tr></table>';
  3232.         }
  3233.  
  3234.         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")) {
  3235.  
  3236.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3237.  
  3238.                 echo '<div class="panel_title">PDF';
  3239.                
  3240.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3241.                         echo '<a href=del.php?entry=';
  3242.                         echo $maj_d;
  3243.                         echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
  3244.                 }
  3245.                 echo '</div><div class=panel_body>';
  3246.  
  3247.                 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))) {
  3248.                         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.";
  3249.                 }
  3250.                 else {
  3251.  
  3252.                         if ($maj_dh_pdf = opendir("data/items/$maj_d/pdf/file")) {
  3253.                                 while (($maj_dl_file = readdir($maj_dh_pdf)) !== false) {
  3254.                                         if ($maj_dl_file != "." && $maj_dl_file != "..") {
  3255.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  3256.                                                 echo "<a href=\"index.php?entry=$maj_d&download=$maj_dl_file&type=pdf\">";
  3257.                                                 echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
  3258.                                                 echo '<td><b>';
  3259.                                                 echo $maj_dl_file;
  3260.                                                 echo'</b><br>';
  3261.                                                 $maj_size = filesize("data/items/$maj_d/pdf/file/$maj_dl_file");
  3262.                                                 $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);
  3263.                                                 echo $maj_size_string;
  3264.                                                 $maj_pdf_count_file = "data/items/$maj_d/pdf/count/dl.txt";
  3265.                                                 if (file_exists($maj_pdf_count_file)) {
  3266.                                                         $maj_fp_pdf_count = fopen($maj_pdf_count_file,"r");
  3267.                                                         $maj_pdf_count = fread($maj_fp_pdf_count,filesize($maj_pdf_count_file));
  3268.                                                         fclose($maj_fp_pdf_count);
  3269.                                                         echo '<br>';
  3270.                                                         echo $maj_pdf_count;
  3271.                                                         if ($maj_pdf_count == 1) {
  3272.                                                                 echo ' download';
  3273.                                                         }
  3274.                                                         if ($maj_pdf_count > 1) {
  3275.                                                                 echo ' downloads';
  3276.                                                         }
  3277.                                                 }
  3278.                                                 echo '</td></tr></table>';
  3279.                                         }
  3280.                                 }
  3281.                         closedir($maj_dh_pdf);
  3282.                         }
  3283.                 }
  3284.                 echo '</div>';
  3285.  
  3286.                 echo '</td></tr></table>';
  3287.         }
  3288.  
  3289.         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'])))) {
  3290.  
  3291.                 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))) {
  3292.                 }
  3293.                 else {
  3294.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3295.  
  3296.                         if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
  3297.                                 while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
  3298.                                         if ($maj_live_comment != "." && $maj_live_comment != "..") {
  3299.                                                 $maj_show_comments[] = $maj_live_comment;
  3300.                                         }
  3301.                                 }
  3302.                         closedir($maj_dh_comments);
  3303.                         }
  3304.        
  3305.                         asort($maj_show_comments);
  3306.                         reset($maj_show_comments);
  3307.                         foreach ($maj_show_comments as $maj_comment) {
  3308.  
  3309.                                 echo "<a name=\"$maj_comment\"></a>";
  3310.  
  3311.                                 echo '<div class="panel_title">';
  3312.        
  3313.                                 if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
  3314.                                         echo '<a target=_maj href=';
  3315.                                         readfile("data/items/$maj_d/comments/live/$maj_comment/url.txt");
  3316.                                         echo '>';
  3317.                                 }
  3318.        
  3319.                                 readfile("data/items/$maj_d/comments/live/$maj_comment/firstname.txt");
  3320.                                 echo ' ';
  3321.                                 readfile("data/items/$maj_d/comments/live/$maj_comment/lastname.txt");
  3322.        
  3323.                                 if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
  3324.                                         echo '</a>';
  3325.                                 }
  3326.        
  3327.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3328.                                         echo '  &lt;';
  3329.                                         readfile("data/items/$maj_d/comments/live/$maj_comment/email.txt");
  3330.                                         echo '&gt;';
  3331.                                 }
  3332.        
  3333.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3334.                                         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>';
  3335.                                         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>';
  3336.                                         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>';
  3337.                                         //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>";
  3338.                                 }
  3339.                                 echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  3340.                                
  3341.                                 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")) {
  3342.                                         echo "<td width=85 valign=top>";
  3343.                                         $maj_c_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
  3344.                                         echo "<a href=member.php?id=$maj_c_author>";
  3345.                                         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"))) {
  3346.                                                 if (file_exists("images/avatar.gif")) {
  3347.                                                         $maj_c_avatar_gif_image_size = getimagesize("images/avatar.gif");
  3348.                                                         $maj_c_avatar_gif_image_width = $maj_c_avatar_gif_image_size[0];
  3349.                                                         $maj_c_avatar_gif_image_height = $maj_c_avatar_gif_image_size[1];
  3350.                        
  3351.                                                         $maj_c_max_avatar_gif_image_width = 80;
  3352.                                                
  3353.                                                         if ($maj_c_avatar_gif_image_width > $maj_c_max_avatar_gif_image_width) {  
  3354.  
  3355.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_gif_image_width / $maj_c_avatar_gif_image_width) ;
  3356.                                                                 $maj_c_avatar_gif_image_width = (int) ($maj_c_avatar_gif_image_width * $maj_sizefactor);
  3357.                                                                 $maj_c_avatar_gif_image_height = (int) ($maj_c_avatar_gif_image_height * $maj_sizefactor);
  3358.  
  3359.                                                                 if (file_exists("data/avatar-resize-gif.txt")) {
  3360.  
  3361.                                                                         $maj_c_avatar_gif_image_resize = imagecreatetruecolor($maj_c_avatar_gif_image_width,$maj_c_avatar_gif_image_height);
  3362.  
  3363.                                                                         imagealphablending($maj_c_avatar_gif_image_resize, false);
  3364.                                                                         imagesavealpha($maj_c_avatar_gif_image_resize, true);
  3365.  
  3366.                                                                         $maj_c_avatar_gif_image_original = imagecreatefromgif("images/avatar.gif");
  3367.                                                                         $maj_c_avatar_gif_transparent_index = imagecolortransparent($maj_c_avatar_gif_image_original);
  3368.  
  3369.                                                                         if ($maj_c_avatar_gif_transparent_index >= 0) {
  3370.                                                                                 $maj_c_avatar_gif_transparent_color = imagecolorsforindex($maj_c_avatar_gif_image_original, $maj_c_avatar_gif_transparent_index);
  3371.                                                                                 $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']);
  3372.  
  3373.                                                                                 imagefill($maj_c_avatar_gif_image_resize, 0, 0, $maj_c_avatar_gif_transparent_index);
  3374.                                                                                 imagecolortransparent($maj_c_avatar_gif_image_resize, $maj_c_avatar_gif_transparent_index);
  3375.                                                                         }
  3376.                        
  3377.                                                                         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]);
  3378.  
  3379.                                                                         unlink("images/avatar.gif");
  3380.  
  3381.                                                                         imagegif($maj_c_avatar_gif_image_resize,"images/avatar.gif",100);
  3382.  
  3383.                                                                         imagedestroy($maj_c_avatar_gif_image_resize);
  3384.                                                                         imagedestroy($maj_c_avatar_gif_image_original);
  3385.                                                                 }
  3386.                                                         }
  3387.                        
  3388.                                                         echo "<img src=images/avatar.gif border=0 width=";
  3389.                                                         echo $maj_c_avatar_gif_image_width;
  3390.                                                         echo " height=";
  3391.                                                         echo $maj_c_avatar_gif_image_height;
  3392.                                                 }
  3393.                                                 if (file_exists("images/avatar.jpg")) {
  3394.                                                         $maj_c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  3395.                                                         $maj_c_avatar_jpg_image_width = $maj_c_avatar_jpg_image_size[0];
  3396.                                                         $maj_c_avatar_jpg_image_height = $maj_c_avatar_jpg_image_size[1];
  3397.                                                
  3398.                                                         $maj_c_max_avatar_jpg_image_width = 80;
  3399.                                                
  3400.                                                         if ($maj_c_avatar_jpg_image_width > $maj_c_max_avatar_jpg_image_width) {  
  3401.  
  3402.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_jpg_image_width / $maj_c_avatar_jpg_image_width) ;
  3403.                                                                 $maj_c_avatar_jpg_image_width = (int) ($maj_c_avatar_jpg_image_width * $maj_sizefactor);
  3404.                                                                 $maj_c_avatar_jpg_image_height = (int) ($maj_c_avatar_jpg_image_height * $maj_sizefactor);
  3405.  
  3406.                                                                 if (file_exists("data/avatar-resize-jpg.txt")) {
  3407.  
  3408.                                                                         $maj_c_avatar_jpg_image_resize = imagecreatetruecolor($maj_c_avatar_jpg_image_width,$maj_c_avatar_jpg_image_height);
  3409.                                                                         $maj_c_avatar_jpg_image_original = imagecreatefromjpeg("images/avatar.jpg");
  3410.  
  3411.                                                                         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]);
  3412.  
  3413.                                                                         unlink("images/avatar.jpg");
  3414.  
  3415.                                                                         imagejpeg($maj_c_avatar_jpg_image_resize,"images/avatar.jpg",100);
  3416.  
  3417.                                                                         imagedestroy($maj_c_avatar_jpg_image_resize);
  3418.                                                                         imagedestroy($maj_c_avatar_jpg_image_original);
  3419.                                                                 }
  3420.                                                         }
  3421.                        
  3422.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  3423.                                                         echo $maj_c_avatar_jpg_image_width;
  3424.                                                         echo " height=";
  3425.                                                         echo $maj_c_avatar_jpg_image_height;
  3426.                                                 }
  3427.                                                 if (file_exists("images/avatar.png")) {
  3428.                                                         $maj_c_avatar_png_image_size = getimagesize("images/avatar.png");
  3429.                                                         $maj_c_avatar_png_image_width = $maj_c_avatar_png_image_size[0];
  3430.                                                         $maj_c_avatar_png_image_height = $maj_c_avatar_png_image_size[1];
  3431.                                                
  3432.                                                         $maj_c_max_avatar_png_image_width = 80;
  3433.                                                
  3434.                                                         if ($maj_c_avatar_png_image_width > $maj_c_max_avatar_png_image_width) {  
  3435.  
  3436.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_png_image_width / $maj_c_avatar_png_image_width) ;
  3437.                                                                 $maj_c_avatar_png_image_width = (int) ($maj_c_avatar_png_image_width * $maj_sizefactor);
  3438.                                                                 $maj_c_avatar_png_image_height = (int) ($maj_c_avatar_png_image_height * $maj_sizefactor);
  3439.  
  3440.                                                                 if (file_exists("data/avatar-resize-png.txt")) {
  3441.  
  3442.                                                                         $maj_c_avatar_png_image_resize = imagecreatetruecolor($maj_c_avatar_png_image_width,$maj_c_avatar_png_image_height);
  3443.  
  3444.                                                                         imagealphablending($maj_c_avatar_png_image_resize, false);
  3445.                                                                         imagesavealpha($maj_c_avatar_png_image_resize, true);
  3446.  
  3447.                                                                         $maj_c_avatar_png_image_original = imagecreatefrompng("images/avatar.png");
  3448.  
  3449.                                                                         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]);
  3450.  
  3451.                                                                         unlink("images/avatar.png");
  3452.  
  3453.                                                                         imagepng($maj_c_avatar_png_image_resize,"images/avatar.png",100);
  3454.  
  3455.                                                                         imagedestroy($maj_c_avatar_png_image_resize);
  3456.                                                                         imagedestroy($maj_c_avatar_png_image_original);
  3457.                                                                 }
  3458.                                                         }
  3459.                                                
  3460.                                                         echo "<img src=images/avatar.png border=0 width=";
  3461.                                                         echo $maj_c_avatar_png_image_width;
  3462.                                                         echo " height=";
  3463.                                                         echo $maj_c_avatar_png_image_height;
  3464.                                                 }
  3465.                                         echo "><br>";
  3466.                                         }
  3467.                                         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")) {
  3468.                                                 if (file_exists("images/members/$maj_c_author/avatar.gif")) {
  3469.                                                         $maj_c_avatar_gif_image_size = getimagesize("images/members/$maj_c_author/avatar.gif");
  3470.                                                         $maj_c_avatar_gif_image_width = $maj_c_avatar_gif_image_size[0];
  3471.                                                         $maj_c_avatar_gif_image_height = $maj_c_avatar_gif_image_size[1];
  3472.                        
  3473.                                                         $maj_c_max_avatar_gif_image_width = 80;
  3474.                                                
  3475.                                                         if ($maj_c_avatar_gif_image_width > $maj_c_max_avatar_gif_image_width) {  
  3476.  
  3477.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_gif_image_width / $maj_c_avatar_gif_image_width) ;
  3478.                                                                 $maj_c_avatar_gif_image_width = (int) ($maj_c_avatar_gif_image_width * $maj_sizefactor);
  3479.                                                                 $maj_c_avatar_gif_image_height = (int) ($maj_c_avatar_gif_image_height * $maj_sizefactor);
  3480.  
  3481.                                                                 if (file_exists("data/avatar-resize-gif.txt")) {
  3482.  
  3483.                                                                         $maj_c_avatar_gif_image_resize = imagecreatetruecolor($maj_c_avatar_gif_image_width,$maj_c_avatar_gif_image_height);
  3484.  
  3485.                                                                         imagealphablending($maj_c_avatar_gif_image_resize, false);
  3486.                                                                         imagesavealpha($maj_c_avatar_gif_image_resize, true);
  3487.  
  3488.                                                                         $maj_c_avatar_gif_image_original = imagecreatefromgif("images/members/$maj_c_author/avatar.gif");
  3489.                                                                         $maj_c_avatar_gif_transparent_index = imagecolortransparent($maj_c_avatar_gif_image_original);
  3490.  
  3491.                                                                         if ($maj_c_avatar_gif_transparent_index >= 0) {
  3492.  
  3493.                                                                                 $maj_c_avatar_gif_transparent_color = imagecolorsforindex($maj_c_avatar_gif_image_original, $maj_c_avatar_gif_transparent_index);
  3494.                                                                                 $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']);
  3495.  
  3496.                                                                                 imagefill($maj_c_avatar_gif_image_resize, 0, 0, $maj_c_avatar_gif_transparent_index);
  3497.                                                                                 imagecolortransparent($maj_c_avatar_gif_image_resize, $maj_c_avatar_gif_transparent_index);
  3498.                                                                         }
  3499.  
  3500.                                                                         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]);
  3501.  
  3502.                                                                         unlink("images/members/$maj_c_author/avatar.gif");
  3503.  
  3504.                                                                         imagegif($maj_c_avatar_gif_image_resize,"images/members/$maj_c_author/avatar.gif",100);
  3505.                        
  3506.                                                                         imagedestroy($maj_c_avatar_gif_image_resize);
  3507.                                                                         imagedestroy($maj_c_avatar_gif_image_original);
  3508.                                                                 }
  3509.                                                         }
  3510.                        
  3511.                                                         echo "<img src=images/members/$maj_c_author/avatar.gif border=0 width=";
  3512.                                                         echo $maj_c_avatar_gif_image_width;
  3513.                                                         echo " height=";
  3514.                                                         echo $maj_c_avatar_gif_image_height;
  3515.                                                 }
  3516.                                                 if (file_exists("images/members/$maj_c_author/avatar.jpg")) {
  3517.                                                         $maj_c_avatar_jpg_image_size = getimagesize("images/members/$maj_c_author/avatar.jpg");
  3518.                                                         $maj_c_avatar_jpg_image_width = $maj_c_avatar_jpg_image_size[0];
  3519.                                                         $maj_c_avatar_jpg_image_height = $maj_c_avatar_jpg_image_size[1];
  3520.                                                
  3521.                                                         $maj_c_max_avatar_jpg_image_width = 80;
  3522.                                                
  3523.                                                         if ($maj_c_avatar_jpg_image_width > $maj_c_max_avatar_jpg_image_width) {  
  3524.  
  3525.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_jpg_image_width / $maj_c_avatar_jpg_image_width) ;
  3526.                                                                 $maj_c_avatar_jpg_image_width = (int) ($maj_c_avatar_jpg_image_width * $maj_sizefactor);
  3527.                                                                 $maj_c_avatar_jpg_image_height = (int) ($maj_c_avatar_jpg_image_height * $maj_sizefactor);
  3528.  
  3529.                                                                 if (file_exists("data/avatar-resize-jpg.txt")) {
  3530.  
  3531.                                                                         $maj_c_avatar_jpg_image_resize = imagecreatetruecolor($maj_c_avatar_jpg_image_width,$maj_c_avatar_jpg_image_height);
  3532.                                                                         $maj_c_avatar_jpg_image_original = imagecreatefromjpeg("images/members/$maj_c_author/avatar.jpg");
  3533.  
  3534.                                                                         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]);
  3535.  
  3536.                                                                         unlink("images/members/$maj_c_author/avatar.jpg");
  3537.  
  3538.                                                                         imagejpeg($maj_c_avatar_jpg_image_resize,"images/members/$maj_c_author/avatar.jpg",100);
  3539.  
  3540.                                                                         imagedestroy($maj_c_avatar_jpg_image_resize);
  3541.                                                                         imagedestroy($maj_c_avatar_jpg_image_original);
  3542.                                                                 }
  3543.                                                         }
  3544.                        
  3545.                                                         echo "<img src=images/members/$maj_c_author/avatar.jpg border=0 width=";
  3546.                                                         echo $maj_c_avatar_jpg_image_width;
  3547.                                                         echo " height=";
  3548.                                                         echo $maj_c_avatar_jpg_image_height;
  3549.                                                 }
  3550.                                                 if (file_exists("images/members/$maj_c_author/avatar.png")) {
  3551.                                                         $maj_c_avatar_png_image_size = getimagesize("images/members/$maj_c_author/avatar.png");
  3552.                                                         $maj_c_avatar_png_image_width = $maj_c_avatar_png_image_size[0];
  3553.                                                         $maj_c_avatar_png_image_height = $maj_c_avatar_png_image_size[1];
  3554.                                                
  3555.                                                         $maj_c_max_avatar_png_image_width = 80;
  3556.                                                
  3557.                                                         if ($maj_c_avatar_png_image_width > $maj_c_max_avatar_png_image_width) {  
  3558.  
  3559.                                                                 $maj_sizefactor = (double) ($maj_c_max_avatar_png_image_width / $maj_c_avatar_png_image_width) ;
  3560.                                                                 $maj_c_avatar_png_image_width = (int) ($maj_c_avatar_png_image_width * $maj_sizefactor);
  3561.                                                                 $maj_c_avatar_png_image_height = (int) ($maj_c_avatar_png_image_height * $maj_sizefactor);
  3562.  
  3563.                                                                 if (file_exists("data/avatar-resize-png.txt")) {
  3564.  
  3565.                                                                         $maj_c_avatar_png_image_resize = imagecreatetruecolor($maj_c_avatar_png_image_width,$maj_c_avatar_png_image_height);
  3566.  
  3567.                                                                         imagealphablending($maj_c_avatar_png_image_resize, false);
  3568.                                                                         imagesavealpha($maj_c_avatar_png_image_resize, true);
  3569.  
  3570.                                                                         $maj_c_avatar_png_image_original = imagecreatefrompng("images/members/$maj_c_author/avatar.png");
  3571.  
  3572.                                                                         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]);
  3573.  
  3574.                                                                         unlink("images/members/$maj_c_author/avatar.png");
  3575.  
  3576.                                                                         imagepng($maj_c_avatar_png_image_resize,"images/members/$maj_c_author/avatar.png",100);
  3577.  
  3578.                                                                         imagedestroy($maj_c_avatar_png_image_resize);
  3579.                                                                         imagedestroy($maj_c_avatar_png_image_original);
  3580.                                                                 }
  3581.                                                         }
  3582.                                                
  3583.                                                         echo "<img src=images/members/$maj_c_author/avatar.png border=0 width=";
  3584.                                                         echo $maj_c_avatar_png_image_width;
  3585.                                                         echo " height=";
  3586.                                                         echo $maj_c_avatar_png_image_height;
  3587.                                                 }
  3588.                                         echo "><br>";
  3589.                                         }
  3590.                                         echo "$maj_c_author</a><br>";
  3591.                                         if ((file_get_contents("data/username.txt") == $maj_c_author) and file_exists("data/rank.txt")) {
  3592.                                                 echo "administrator<br>";
  3593.                                         }
  3594.                                         elseif (file_exists("data/members/active/$maj_c_author/rank.txt") and file_exists("data/rank.txt")) {
  3595.                                                 $maj_c_rank = file_get_contents("data/members/active/$maj_c_author/rank.txt");
  3596.                                                 echo "$maj_c_rank<br>";
  3597.                                         }
  3598.                                         elseif (!file_exists("data/members/active/$maj_c_author/rank.txt") and file_exists("data/rank.txt")) {
  3599.                                                 echo "member<br>";
  3600.                                         }
  3601.                        
  3602.                                         if ($maj_c_dh_posts = opendir("data/items")) {
  3603.                                                 while (($maj_c_entry_posts = readdir($maj_c_dh_posts)) !== false) {
  3604.                        
  3605.                                                         if (file_exists("data/items/$maj_c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  3606.                                                                 continue;
  3607.                                                         }
  3608.                        
  3609.                                                         if (file_exists("data/items/$maj_c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  3610.                                                                 continue;
  3611.                                                         }
  3612.  
  3613.                                                         $maj_private_categories = "0";
  3614.                                
  3615.                                                         if (file_exists("data/items/$maj_entry_c_entry_posts/categories")) {
  3616.                                                        
  3617.                                                                 if ($maj_dh_cat2_c_entry_posts = opendir("data/items/$maj_entry_c_entry_posts/categories")) {
  3618.                                                        
  3619.                                                                         while (($maj_entry_cat2_c_entry_posts = readdir($maj_dh_cat2_c_entry_posts)) !== false) {
  3620.                                                        
  3621.                                                                                 if ($maj_entry_cat2_c_entry_posts != "." && $maj_entry_cat2_c_entry_posts != "..") {
  3622.                                                        
  3623.                                                                                         if (file_exists("data/categories/$maj_entry_cat2_c_entry_posts/private.txt")) {
  3624.                                                                                                 $maj_private_categories = $maj_private_categories + 1;
  3625.                                                                                         }
  3626.                                                                                 }
  3627.                                                                         }
  3628.                                                                         closedir($maj_dh_cat2_c_entry_posts);
  3629.                                                                 }
  3630.                                                         }
  3631.  
  3632.                                                         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")) {
  3633.                                                                 continue;
  3634.                                                         }
  3635.                        
  3636.                                                         if ($maj_c_entry_posts != "." && $maj_c_entry_posts != "..") {
  3637.                                                                 if (file_exists("data/members/active/$maj_c_author") and file_exists("data/bb.txt")) {
  3638.                                                                         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)) {
  3639.                                                                                 $maj_c_items_posts[] = $maj_c_entry_posts;
  3640.                                                                         }
  3641.                                                                 }
  3642.                                                                 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")) {
  3643.                                                                         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)) {
  3644.                                                                                 $maj_c_items_posts[] = $maj_c_entry_posts;
  3645.                                                                         }
  3646.                                                                 }
  3647.                                                         }
  3648.                                                 }
  3649.                                         closedir($maj_c_dh_posts);
  3650.                                         }
  3651.                                         $maj_c_posts = count($maj_c_items_posts);
  3652.                                         if ($maj_c_posts == 1) {
  3653.                                                 echo "$maj_c_posts post";
  3654.                                         }
  3655.                                         if ($maj_c_posts > 1) {
  3656.                                                 echo "$maj_c_posts posts";
  3657.                                         }
  3658.                                         unset($maj_c_items_posts);
  3659.                        
  3660.                                         echo "</td><td width=513 valign=top>";
  3661.                                 }
  3662.                                 else {
  3663.                                         echo "<td width=598 valign=top>";
  3664.                                 }
  3665.  
  3666.                                 echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
  3667.  
  3668.                                 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"))))) {
  3669.                                         $maj_cxavatar_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
  3670.                                         echo "<a href=member.php?id=$maj_cxavatar_author>$maj_cxavatar_author</a> - ";
  3671.                                 }
  3672.  
  3673.                                 entry2date($maj_comment);
  3674.  
  3675.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  3676.  
  3677.                                         if (file_exists("data/items/$maj_d/comments/live/$maj_comment/revisions.txt")) {
  3678.                                                 echo '  (Revision ';
  3679.                                                 readfile("data/items/$maj_d/comments/live/$maj_comment/revisions.txt");
  3680.                                                 echo ')';
  3681.                                         }
  3682.                                 }
  3683.  
  3684.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  3685.  
  3686.                                 $maj_entry_comment = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/comment.txt");
  3687.  
  3688.                                 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"))))) {
  3689.                                         $maj_badwords = file_get_contents("data/pf-badwords.txt");
  3690.                                         if (file_exists("data/pf-censor.txt")) {
  3691.                                                 $maj_censor = file_get_contents("data/pf-censor.txt");
  3692.                                         }
  3693.                                         else {
  3694.                                                 $maj_censor = "[expletive]";
  3695.                                         }
  3696.                                         $maj_entry_comment = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_entry_comment);
  3697.                                 }
  3698.                                 echo $maj_entry_comment;
  3699.                                 echo '</tr></table></div>';
  3700.                         }
  3701.                         unset($maj_show_comments);
  3702.                         echo '</td></tr></table>';
  3703.  
  3704.                         if (isset($_SESSION['logged_in'])) {
  3705.  
  3706.                                 if (($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and file_exists("data/comments/unread/$maj_d")) {
  3707.                                         rmdirr("data/comments/unread/$maj_d");
  3708.  
  3709.                                         if (count(glob("data/comments/unread/*")) < 1) {
  3710.                                                 rmdirr("data/comments/unread");
  3711.                                         }
  3712.                                 }
  3713.                                 else {
  3714.                                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_d")) {
  3715.                                                 rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_d");
  3716.  
  3717.                                                 if (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) < 1) {
  3718.                                                         rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread");
  3719.                                                 }
  3720.                                         }
  3721.                                 }
  3722.                         }
  3723.                 }
  3724.  
  3725.                 echo "<a name=\"end\"></a>";
  3726.  
  3727.                 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")) {
  3728.  
  3729.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3730.  
  3731.                         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']}")))) {
  3732.        
  3733.                                 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']))) {
  3734.                                         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>";
  3735.                                 }
  3736.                         }
  3737.  
  3738.                         echo "<font style=\"font-size: $maj_font_Lpx;\"><b>Add Comment</b></font>";
  3739.  
  3740.                         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))) {
  3741.                                 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>";
  3742.                         }
  3743.                         else {
  3744.                                 $maj_captcha_rand = str_rand(7);
  3745.                
  3746.                                 echo "<p>Fill out the form below";
  3747.  
  3748.                                 if (!isset($_SESSION['logged_in'])) {
  3749.                                         echo " and enter <b>$maj_captcha_rand</b> in the CAPTCHA field";
  3750.                                 }
  3751.  
  3752.                                 echo " to add your comment.";
  3753.  
  3754.                                 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")))) {
  3755.                                         echo " Please wait for your comment to be approved and posted.";
  3756.  
  3757.                                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
  3758.                                                 echo " Comments with bogus contact information or spam will be discarded.";
  3759.                                         }
  3760.                                 }
  3761.                                 echo "</p>";
  3762.  
  3763.                                 ?>
  3764.                        
  3765.                                 <table border=0 cellspacing=2 cellpadding=0 width=500>
  3766.                                 <form enctype="multipart/form-data" action="index.php?entry=<?php echo $maj_d; ?>&show=comments" method="post">
  3767.                                 <input type=hidden name=captcha_get value="<?php echo $maj_captcha_rand; ?>">
  3768.                                 <tr>
  3769.  
  3770.                                 <?php
  3771.                                
  3772.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3773.                                
  3774.                                         $maj_logged_in_author = explode(" ",file_get_contents("data/author.txt"));
  3775.                                         $maj_logged_in_author_words = count($maj_logged_in_author);
  3776.                                         $maj_logged_in_author_last = $maj_logged_in_author_words - 1;
  3777.                                        
  3778.                                         if ($maj_logged_in_author_words == 2) {
  3779.                                                
  3780.                                                 $maj_logged_in_author_fname = str_replace(",","",$maj_logged_in_author[0]);
  3781.                                                 $maj_logged_in_author_lname = str_replace(",","",$maj_logged_in_author[1]);                                            
  3782.                                         }
  3783.                                        
  3784.                                         if ($maj_logged_in_author_words > 2) {
  3785.                                        
  3786.                                                 $maj_logged_in_author_mkfname = 0;
  3787.                                        
  3788.                                                 while ($maj_logged_in_author_mkfname < $maj_logged_in_author_last) {
  3789.                                                
  3790.                                                         $maj_logged_in_author_fname .= $maj_logged_in_author[$maj_logged_in_author_mkfname] . " ";
  3791.                                                        
  3792.                                                         $maj_logged_in_author_mkfname = $maj_logged_in_author_mkfname + 1;                                             
  3793.                                                 }
  3794.                                                
  3795.                                                 $maj_logged_in_author_lname = $maj_logged_in_author[$maj_logged_in_author_last];
  3796.                                         }
  3797.  
  3798.                                 ?>
  3799.                                         <td width=75></td><td><input type=hidden name=cauthor value="<?php echo $_SESSION['logged_in']; ?>">
  3800.                                        
  3801.                                         <input type="hidden" name="firstname" value="<?php echo $maj_logged_in_author_fname; ?>"></td>
  3802.  
  3803.                                         <?php
  3804.                                 }
  3805.                                 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")) {
  3806.                                         ?>
  3807.                                         <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>
  3808.                                         <?php
  3809.                                 }
  3810.                                 else {
  3811.                                         ?>
  3812.                                         <td width=75><nobr>First Name*</nobr></td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
  3813.                                         <?php
  3814.                                 }
  3815.                                 ?>
  3816.                                 <td rowspan=7 valign=top width=75 align=right>
  3817.                                 <table border=0 cellspacing=1 cellpadding=2>
  3818.                                 <tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
  3819.                                 <tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
  3820.                                 <tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
  3821.                                 <tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
  3822.                                 <tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
  3823.                                 <tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
  3824.                                 <tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
  3825.                                 <tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
  3826.                                 <tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
  3827.                                 <tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
  3828.                                 </td></tr>
  3829.                                 </table>
  3830.  
  3831.                                 <?php
  3832.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3833.                                         ?>
  3834.                                         <td width=75></td><td><input type=hidden name=lastname value="<?php echo $maj_logged_in_author_lname; ?>"></td>
  3835.                                         <?php
  3836.                                 }
  3837.                                 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")) {
  3838.                                         ?>
  3839.                                         <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>
  3840.                                         <?php
  3841.                                 }
  3842.                                 else {
  3843.                                         ?>
  3844.                                         <tr><td><nobr>Last Name*</nobr></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
  3845.                                         <?php
  3846.                                 }
  3847.  
  3848.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3849.  
  3850.                                         if (file_exists("data/email.txt")) {
  3851.                                                 ?>
  3852.                                                 <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
  3853.                                                 <?php
  3854.                                         }
  3855.                                         else {
  3856.                                                 echo "<tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
  3857.                                         }
  3858.                                 }
  3859.                                 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")) {
  3860.                                         ?>
  3861.                                         <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>
  3862.                                         <?php
  3863.                                 }
  3864.                                 else {
  3865.                                         ?>
  3866.                                         <tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
  3867.                                         <?php
  3868.                                 }
  3869.  
  3870.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3871.                                         ?>
  3872.                                         <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
  3873.                                         <?php
  3874.                                 }
  3875.                                 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")) {
  3876.                                         ?>
  3877.                                         <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>
  3878.                                         <?php
  3879.                                 }
  3880.                                 else {
  3881.                                         ?>
  3882.                                         <tr><td><nobr>Website</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
  3883.                                         <?php
  3884.                                 }
  3885.                                 ?>
  3886.                                 <tr><td><nobr>Comment*</nobr></td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
  3887.                                 <?php
  3888.  
  3889.                                 if (isset($_SESSION['logged_in'])) {
  3890.                                         echo "<input type=hidden name=captcha_put value=\"$maj_captcha_rand\">";
  3891.                                 }
  3892.                                 else {
  3893.                                         echo "<tr><td><nobr>CAPTCHA*</nobr></td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
  3894.                                 }
  3895.  
  3896.                                 ?>
  3897.                                 <tr><td></td><td><input class="click" type="submit" value="click here to submit your comment"></td></tr>
  3898.                                 </form>
  3899.                                 </table>
  3900.                                 <?php
  3901.                         }
  3902.                         ?>
  3903.                         </td></tr></table>
  3904.                         <?php
  3905.                 }
  3906.         }
  3907.  
  3908.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and isset($maj_req_entry) and !empty($maj_req_entry)) {
  3909.        
  3910.                 if ($maj_dh_pending_comments = opendir("data/items/$maj_d/comments/pending")) {
  3911.        
  3912.                         while (($maj_entry_pending_comments = readdir($maj_dh_pending_comments)) !== false) {
  3913.        
  3914.                                 if ($maj_entry_pending_comments != "." && $maj_entry_pending_comments != "..") {
  3915.                                         $maj_show_pending_comments[] = $maj_entry_pending_comments;
  3916.                                 }
  3917.                         }
  3918.                         closedir($maj_dh_pending_comments);
  3919.                 }
  3920.        
  3921.                 asort($maj_show_pending_comments);
  3922.                 reset($maj_show_pending_comments);
  3923.        
  3924.                 $maj_count_pending_comments = count($maj_show_pending_comments);
  3925.  
  3926.                 if ($maj_count_pending_comments > 0) {
  3927.  
  3928.                         echo '<a name="pending"></a>';
  3929.        
  3930.                         if ($maj_count_pending_comments == 1) {
  3931.                                 echo '<p><b>Pending Comment</b></p>';
  3932.                         }
  3933.                         else {
  3934.                                 echo '<p><b>Pending Comments</b></p>';
  3935.                         }
  3936.  
  3937.                         foreach ($maj_show_pending_comments as $maj_pending_comment) {
  3938.  
  3939.                                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
  3940.        
  3941.                                 echo '<div class="panel_title">';
  3942.        
  3943.                                 if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
  3944.                                         echo '<a target=_maj href=';
  3945.                                         readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt");
  3946.                                         echo '>';
  3947.                                 }
  3948.                
  3949.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/firstname.txt");
  3950.                                 echo ' ';
  3951.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/lastname.txt");
  3952.                
  3953.                                 if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
  3954.                                         echo '</a>';
  3955.                                 }
  3956.                
  3957.                                 echo ' &lt;';
  3958.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/email.txt");
  3959.                                 echo '&gt;';
  3960.        
  3961.                                 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>';
  3962.        
  3963.                                 $maj_pending_comment_key_file = "data/items/$maj_d/comments/pending/$maj_pending_comment/key.txt";
  3964.                                 $maj_open_pending_comment_key_file = fopen($maj_pending_comment_key_file,"r");
  3965.                                 $maj_pending_comment_login_key = fread($maj_open_pending_comment_key_file,filesize($maj_pending_comment_key_file));
  3966.                                 fclose($maj_open_pending_comment_key_file);
  3967.        
  3968.                                 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>";
  3969.        
  3970.                                 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>";
  3971.        
  3972.                                 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>';
  3973.        
  3974.                                 echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  3975.        
  3976.                                 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")) {
  3977.        
  3978.                                         echo "<td width=85 valign=top>";
  3979.        
  3980.                                         $maj_pc_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
  3981.        
  3982.                                         echo "<a href=member.php?id=$maj_pc_author>";
  3983.        
  3984.                                         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"))) {
  3985.        
  3986.                                                 if (file_exists("images/avatar.gif")) {
  3987.                                                         $maj_pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
  3988.                                                         $maj_pc_avatar_gif_image_width = $maj_pc_avatar_gif_image_size[0];
  3989.                                                         $maj_pc_avatar_gif_image_height = $maj_pc_avatar_gif_image_size[1];
  3990.                        
  3991.                                                         $maj_pc_max_avatar_gif_image_width = 80;
  3992.                                                
  3993.                                                         if ($maj_pc_avatar_gif_image_width > $maj_pc_max_avatar_gif_image_width) {  
  3994.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_gif_image_width / $maj_pc_avatar_gif_image_width) ;
  3995.                                                                 $maj_pc_avatar_gif_image_width = (int) ($maj_pc_avatar_gif_image_width * $maj_sizefactor);
  3996.                                                                 $maj_pc_avatar_gif_image_height = (int) ($maj_pc_avatar_gif_image_height * $maj_sizefactor);
  3997.                                                         }
  3998.                        
  3999.                                                         echo "<img src=images/avatar.gif border=0 width=";
  4000.                                                         echo $maj_pc_avatar_gif_image_width;
  4001.                                                         echo " height=";
  4002.                                                         echo $maj_pc_avatar_gif_image_height;
  4003.                                                 }
  4004.        
  4005.                                                 if (file_exists("images/avatar.jpg")) {
  4006.                                                         $maj_pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  4007.                                                         $maj_pc_avatar_jpg_image_width = $maj_pc_avatar_jpg_image_size[0];
  4008.                                                         $maj_pc_avatar_jpg_image_height = $maj_pc_avatar_jpg_image_size[1];
  4009.                                                
  4010.                                                         $maj_pc_max_avatar_jpg_image_width = 80;
  4011.                                                
  4012.                                                         if ($maj_pc_avatar_jpg_image_width > $maj_pc_max_avatar_jpg_image_width) {  
  4013.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_jpg_image_width / $maj_pc_avatar_jpg_image_width) ;
  4014.                                                                 $maj_pc_avatar_jpg_image_width = (int) ($maj_pc_avatar_jpg_image_width * $maj_sizefactor);
  4015.                                                                 $maj_pc_avatar_jpg_image_height = (int) ($maj_pc_avatar_jpg_image_height * $maj_sizefactor);
  4016.                                                         }
  4017.                        
  4018.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  4019.                                                         echo $maj_pc_avatar_jpg_image_width;
  4020.                                                         echo " height=";
  4021.                                                         echo $maj_pc_avatar_jpg_image_height;
  4022.                                                 }
  4023.        
  4024.                                                 if (file_exists("images/avatar.png")) {
  4025.                                                         $maj_pc_avatar_png_image_size = getimagesize("images/avatar.png");
  4026.                                                         $maj_pc_avatar_png_image_width = $maj_pc_avatar_png_image_size[0];
  4027.                                                         $maj_pc_avatar_png_image_height = $maj_pc_avatar_png_image_size[1];
  4028.                                        
  4029.                                                         $maj_pc_max_avatar_png_image_width = 80;
  4030.                                                
  4031.                                                         if ($maj_pc_avatar_png_image_width > $maj_pc_max_avatar_png_image_width) {  
  4032.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_png_image_width / $maj_pc_avatar_png_image_width) ;
  4033.                                                                 $maj_pc_avatar_png_image_width = (int) ($maj_pc_avatar_png_image_width * $maj_sizefactor);
  4034.                                                                 $maj_pc_avatar_png_image_height = (int) ($maj_pc_avatar_png_image_height * $maj_sizefactor);
  4035.                                                         }
  4036.                                                
  4037.                                                         echo "<img src=images/avatar.png border=0 width=";
  4038.                                                         echo $maj_pc_avatar_png_image_width;
  4039.                                                         echo " height=";
  4040.                                                         echo $maj_pc_avatar_png_image_height;
  4041.                                                 }
  4042.                                                 echo "><br>";
  4043.                                         }
  4044.                                         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")) {
  4045.        
  4046.                                                 if (file_exists("images/members/$maj_pc_author/avatar.gif")) {
  4047.                                                         $maj_pc_avatar_gif_image_size = getimagesize("images/members/$maj_pc_author/avatar.gif");
  4048.                                                         $maj_pc_avatar_gif_image_width = $maj_pc_avatar_gif_image_size[0];
  4049.                                                         $maj_pc_avatar_gif_image_height = $maj_pc_avatar_gif_image_size[1];
  4050.                        
  4051.                                                         $maj_pc_max_avatar_gif_image_width = 80;
  4052.                                                
  4053.                                                         if ($maj_pc_avatar_gif_image_width > $maj_pc_max_avatar_gif_image_width) {  
  4054.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_gif_image_width / $maj_pc_avatar_gif_image_width) ;
  4055.                                                                 $maj_pc_avatar_gif_image_width = (int) ($maj_pc_avatar_gif_image_width * $maj_sizefactor);
  4056.                                                                 $maj_pc_avatar_gif_image_height = (int) ($maj_pc_avatar_gif_image_height * $maj_sizefactor);
  4057.                                                         }
  4058.                        
  4059.                                                         echo "<img src=images/members/$maj_pc_author/avatar.gif border=0 width=";
  4060.                                                         echo $maj_pc_avatar_gif_image_width;
  4061.                                                         echo " height=";
  4062.                                                         echo $maj_pc_avatar_gif_image_height;
  4063.                                                 }
  4064.                
  4065.                                                 if (file_exists("images/members/$maj_pc_author/avatar.jpg")) {
  4066.                                                         $maj_pc_avatar_jpg_image_size = getimagesize("images/members/$maj_pc_author/avatar.jpg");
  4067.                                                         $maj_pc_avatar_jpg_image_width = $maj_pc_avatar_jpg_image_size[0];
  4068.                                                         $maj_pc_avatar_jpg_image_height = $maj_pc_avatar_jpg_image_size[1];
  4069.                                                
  4070.                                                         $maj_pc_max_avatar_jpg_image_width = 80;
  4071.                                                
  4072.                                                         if ($maj_pc_avatar_jpg_image_width > $maj_pc_max_avatar_jpg_image_width) {  
  4073.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_jpg_image_width / $maj_pc_avatar_jpg_image_width) ;
  4074.                                                                 $maj_pc_avatar_jpg_image_width = (int) ($maj_pc_avatar_jpg_image_width * $maj_sizefactor);
  4075.                                                                 $maj_pc_avatar_jpg_image_height = (int) ($maj_pc_avatar_jpg_image_height * $maj_sizefactor);
  4076.                                                         }
  4077.                        
  4078.                                                         echo "<img src=images/members/$maj_pc_author/avatar.jpg border=0 width=";
  4079.                                                         echo $maj_pc_avatar_jpg_image_width;
  4080.                                                         echo " height=";
  4081.                                                         echo $maj_pc_avatar_jpg_image_height;
  4082.                                                 }
  4083.                
  4084.                                                 if (file_exists("images/members/$maj_pc_author/avatar.png")) {
  4085.                                                         $maj_pc_avatar_png_image_size = getimagesize("images/members/$maj_pc_author/avatar.png");
  4086.                                                         $maj_pc_avatar_png_image_width = $maj_pc_avatar_png_image_size[0];
  4087.                                                         $maj_pc_avatar_png_image_height = $maj_pc_avatar_png_image_size[1];
  4088.                                                
  4089.                                                         $maj_pc_max_avatar_png_image_width = 80;
  4090.                                                
  4091.                                                         if ($maj_pc_avatar_png_image_width > $maj_pc_max_avatar_png_image_width) {  
  4092.                                                                 $maj_sizefactor = (double) ($maj_pc_max_avatar_png_image_width / $maj_pc_avatar_png_image_width) ;
  4093.                                                                 $maj_pc_avatar_png_image_width = (int) ($maj_pc_avatar_png_image_width * $maj_sizefactor);
  4094.                                                                 $maj_pc_avatar_png_image_height = (int) ($maj_pc_avatar_png_image_height * $maj_sizefactor);
  4095.                                                         }
  4096.                                                
  4097.                                                         echo "<img src=images/members/$maj_pc_author/avatar.png border=0 width=";
  4098.                                                         echo $maj_pc_avatar_png_image_width;
  4099.                                                         echo " height=";
  4100.                                                         echo $maj_pc_avatar_png_image_height;
  4101.                                                 }
  4102.                                                 echo "><br>";
  4103.                                         }
  4104.                                         echo "$maj_pc_author</a><br>";
  4105.  
  4106.                                         if ((file_get_contents("data/username.txt") == $maj_pc_author) and file_exists("data/rank.txt")) {
  4107.                                                 echo "administrator<br>";
  4108.                                         }
  4109.                                         elseif (file_exists("data/members/active/$maj_pc_author/rank.txt") and file_exists("data/rank.txt")) {
  4110.                                                 $maj_pc_rank = file_get_contents("data/members/active/$maj_pc_author/rank.txt");
  4111.                                                 echo "$maj_pc_rank<br>";
  4112.                                         }
  4113.                                         elseif (!file_exists("data/members/active/$maj_pc_author/rank.txt") and file_exists("data/rank.txt")) {
  4114.                                                 echo "member<br>";
  4115.                                         }
  4116.                
  4117.                                         if ($maj_pc_dh_posts = opendir("data/items")) {
  4118.        
  4119.                                                 while (($maj_pc_entry_posts = readdir($maj_pc_dh_posts)) !== false) {
  4120.                        
  4121.                                                         if (file_exists("data/items/$maj_pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4122.                                                                 continue;
  4123.                                                         }
  4124.                        
  4125.                                                         if (file_exists("data/items/$maj_pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  4126.                                                                 continue;
  4127.                                                         }
  4128.        
  4129.                                                         $maj_private_categories = "0";
  4130.        
  4131.                                                         if (file_exists("data/items/$maj_entry_pc_entry_posts/categories")) {
  4132.                                
  4133.                                                                 if ($maj_dh_cat2_pc_entry_posts = opendir("data/items/$maj_entry_pc_entry_posts/categories")) {
  4134.                                
  4135.                                                                         while (($maj_entry_cat2_pc_entry_posts = readdir($maj_dh_cat2_pc_entry_posts)) !== false) {
  4136.                                
  4137.                                                                                 if ($maj_entry_cat2_pc_entry_posts != "." && $maj_entry_cat2_pc_entry_posts != "..") {
  4138.                                
  4139.                                                                                         if (file_exists("data/categories/$maj_entry_cat2_pc_entry_posts/private.txt")) {
  4140.                                                                                                 $maj_private_categories = $maj_private_categories + 1;
  4141.                                                                                         }
  4142.                                                                                 }
  4143.                                                                         }
  4144.                                                                         closedir($maj_dh_cat2_pc_entry_posts);
  4145.                                                                 }
  4146.                                                         }
  4147.        
  4148.                                                         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")) {
  4149.                                                                 continue;
  4150.                                                         }
  4151.                        
  4152.                                                         if ($maj_pc_entry_posts != "." && $maj_pc_entry_posts != "..") {
  4153.                                                                 if (file_exists("data/members/active/$maj_pc_author") and file_exists("data/bb.txt")) {
  4154.                                                                         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)) {
  4155.                                                                                 $maj_pc_items_posts[] = $maj_pc_entry_posts;
  4156.                                                                         }
  4157.                                                                 }
  4158.                                                                 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")) {
  4159.                                                                         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)) {
  4160.                                                                                 $maj_pc_items_posts[] = $maj_pc_entry_posts;
  4161.                                                                         }
  4162.                                                                 }
  4163.                                                         }
  4164.                                                 }
  4165.                                                 closedir($maj_pc_dh_posts);
  4166.                                         }
  4167.                                         $maj_pc_posts = count($maj_pc_items_posts);
  4168.                                         if ($maj_pc_posts == 1) {
  4169.                                                 echo "$maj_pc_posts post";
  4170.                                         }
  4171.                                         if ($maj_pc_posts > 1) {
  4172.                                                 echo "$maj_pc_posts posts";
  4173.                                         }
  4174.                                         unset($maj_pc_items_posts);
  4175.                        
  4176.                                         echo "</td><td width=513 valign=top>";
  4177.                                 }
  4178.                                 else {
  4179.                                         echo "<td width=598 valign=top>";
  4180.                                 }
  4181.        
  4182.                                 echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
  4183.        
  4184.                                 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"))))) {
  4185.                                         $maj_pxavatar_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
  4186.                                         echo "<a href=member.php?id=$maj_pxavatar_author>$maj_pxavatar_author</a> - ";
  4187.                                 }
  4188.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/timestamp.txt");
  4189.        
  4190.                                 if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt")) {
  4191.                                         echo '  (Revision ';
  4192.                                         readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt");
  4193.                                         echo ')';
  4194.                                 }
  4195.        
  4196.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  4197.                                 readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/comment.txt");
  4198.                                 echo '</tr></table></div>';
  4199.        
  4200.                                 unset($maj_show_pending_comments);
  4201.                                 echo '</td></tr></table>';
  4202.                         }
  4203.                 }
  4204.         }
  4205. }
  4206.  
  4207. ?>
  4208.  
  4209. <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
  4210.  
  4211. <?php
  4212.  
  4213. if (($maj_start >= $maj_increase) and ($maj_start != 0)) {
  4214.  
  4215.         echo "<td align=left><a href=\"index.php?";
  4216.  
  4217.         if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
  4218.                 echo "category=$maj_req_category";
  4219.         }
  4220.  
  4221.         if (isset($maj_req_archive) and !empty($maj_req_archive)) {
  4222.                 echo "archive=$maj_req_archive";
  4223.         }
  4224.  
  4225.         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")) {
  4226.                 echo "author=$maj_req_author";
  4227.         }
  4228.  
  4229.         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")) {
  4230.                 echo "author=$maj_req_author";
  4231.         }
  4232.  
  4233.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "private")) {
  4234.                 echo "find=private";
  4235.         }
  4236.  
  4237.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "member")) {
  4238.                 echo "find=member";
  4239.         }
  4240.  
  4241.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "unfiled")) {
  4242.                 echo "find=unfiled";
  4243.         }
  4244.  
  4245.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "passwd")) {
  4246.                 echo "find=passwd";
  4247.         }
  4248.  
  4249.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "comments")) {
  4250.                 echo "find=comments";
  4251.         }
  4252.  
  4253.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "album")) {
  4254.                 echo "find=album";
  4255.         }
  4256.  
  4257.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "filedrop")) {
  4258.                 echo "find=filedrop";
  4259.         }
  4260.  
  4261.         echo "&start=" . ($maj_start-$maj_increase) . "\">previous</a></td>";
  4262. }
  4263.  
  4264. if ($maj_end < sizeof($maj_items)) {
  4265.  
  4266.         echo "<td align=right><a href=\"index.php?";
  4267.  
  4268.         if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
  4269.                 echo "category=$maj_req_category";
  4270.         }
  4271.         if (isset($maj_req_archive) and !empty($maj_req_archive)) {
  4272.                 echo "archive=$maj_req_archive";
  4273.         }
  4274.         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")) {
  4275.                 echo "author=$maj_req_author";
  4276.         }
  4277.         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")) {
  4278.                 echo "author=$maj_req_author";
  4279.         }
  4280.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "private")) {
  4281.                 echo "find=private";
  4282.         }
  4283.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "member")) {
  4284.                 echo "find=member";
  4285.         }
  4286.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "unfiled")) {
  4287.                 echo "find=unfiled";
  4288.         }
  4289.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "passwd")) {
  4290.                 echo "find=passwd";
  4291.         }
  4292.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "comments")) {
  4293.                 echo "find=comments";
  4294.         }
  4295.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "album")) {
  4296.                 echo "find=album";
  4297.         }
  4298.         if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "filedrop")) {
  4299.                 echo "find=filedrop";
  4300.         }
  4301.         echo "&start=" . ($maj_start+$maj_increase) . "\">next</a></td>";
  4302. }
  4303.  
  4304. // right side
  4305.  
  4306. echo "</tr></table></td><td width=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td><td width=\"$maj_wside\" valign=\"top\">";
  4307.  
  4308. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4309.         if ($maj_dh_pending_comment_flags = opendir("data/comments/pending")) {
  4310.                 while (($maj_entry_pending_comment_flags = readdir($maj_dh_pending_comment_flags)) !== false) {
  4311.                         if ($maj_entry_pending_comment_flags != "." && $maj_entry_pending_comment_flags != "..") {
  4312.                                 $maj_show_pending_comment_flags[] = $maj_entry_pending_comment_flags;
  4313.                         }
  4314.                 }
  4315.                 closedir($maj_dh_pending_comment_flags);
  4316.         }
  4317.  
  4318.         rsort($maj_show_pending_comment_flags);
  4319.         reset($maj_show_pending_comment_flags);
  4320.         $maj_count_pending_comment_flags = count($maj_show_pending_comment_flags);
  4321.  
  4322.         if (($maj_count_latest > 0) and ($maj_count_pending_comment_flags > 0)) {
  4323.  
  4324.                 echo '<div class="panel_title">Pending Comments</div>';
  4325.                
  4326.                 echo '<div class="panel_body">';
  4327.  
  4328.                 if ($maj_dh_list_pending_comment_flags = opendir("data/comments/pending")) {
  4329.  
  4330.                         while (($maj_entry_list_pending_comment_flags = readdir($maj_dh_list_pending_comment_flags)) !== false) {
  4331.  
  4332.                                 if ($maj_entry_list_pending_comment_flags != "." && $maj_entry_list_pending_comment_flags != "..") {
  4333.  
  4334.                                         echo "<a href=\"index.php?entry=$maj_entry_list_pending_comment_flags&show=comments#pending\">";
  4335.                                         readfile("data/items/$maj_entry_list_pending_comment_flags/title.txt");
  4336.                                         echo "</a><br><font style=\"font-size: $maj_font_Spx; color: #999999;\">";
  4337.                                         $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt","r");
  4338.                                         $maj_comment_count_value = fread($maj_fp_comment_count_txt,filesize("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt"));
  4339.                                         fclose($maj_fp_comment_count_txt);
  4340.  
  4341.                                         if ($maj_comment_count_value == 1) {
  4342.                                                 echo ' ( ' . $maj_comment_count_value . ' comment ) ';
  4343.                                         }
  4344.                                         elseif ($maj_comment_count_value > 1) {
  4345.                                                 echo ' ( ' . $maj_comment_count_value . ' comments ) ';
  4346.                                         }
  4347.                                         else {
  4348.                                                 echo '';
  4349.                                         }
  4350.                                         echo '</font><br>';
  4351.                                 }
  4352.                         }
  4353.                         closedir($maj_dh_list_pending_comment_flags);
  4354.                 }
  4355.                 echo '</div>';
  4356.         }
  4357. }
  4358.  
  4359. if (!file_exists("data/xucomment.txt") and isset($_SESSION['logged_in'])) {
  4360.  
  4361.         if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
  4362.  
  4363.                 if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
  4364.                        
  4365.                         if ($maj_dh_unread_comments = opendir("data/comments/unread")) {
  4366.                        
  4367.                                 while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
  4368.                        
  4369.                                         if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
  4370.  
  4371.                                                 if (!file_exists("data/items/$maj_unread_comment")) {
  4372.                                                         rmdirr("data/comments/unread/$maj_unread_comment");
  4373.                                                 }
  4374.                                                 else {
  4375.                                                         $maj_unread_comments[] = $maj_unread_comment;
  4376.                                                 }
  4377.                                         }
  4378.                                 }
  4379.                         closedir($maj_dh_unread_comments);
  4380.                         }
  4381.                 }
  4382.         }
  4383.         else {
  4384.                 if (file_exists("data/members/active/{$_SESSION['logged_in']}")) {
  4385.  
  4386.                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread") and (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) > 0)) {
  4387.                        
  4388.                                 if ($maj_dh_unread_comments = opendir("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
  4389.                        
  4390.                                         while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
  4391.                        
  4392.                                                 if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
  4393.  
  4394.                                                         if (!file_exists("data/items/$maj_unread_comment")) {
  4395.                                                                 rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_unread_comment");
  4396.                                                         }
  4397.                                                         else {
  4398.                                                                 $maj_unread_comments[] = $maj_unread_comment;
  4399.                                                         }
  4400.                                                 }
  4401.                                         }
  4402.                                 closedir($maj_dh_unread_comments);
  4403.                                 }
  4404.                         }
  4405.                 }
  4406.         }
  4407.  
  4408.         sort($maj_unread_comments);
  4409.         reset($maj_unread_comments);
  4410.  
  4411.         if (count($maj_unread_comments) > 0) {
  4412.  
  4413.                 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>';
  4414.                 echo '<div class="panel_body"><table border="0" cellspacing="0" cellpadding="0" width="100%">';
  4415.  
  4416.                 foreach ($maj_unread_comments as $maj_unread_comment) {
  4417.                
  4418.                         $maj_unread_comment_title = file_get_contents("data/items/$maj_unread_comment/title.txt");
  4419.  
  4420.                         echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$maj_unread_comment&show=comments\">$maj_unread_comment_title</a></td></tr>";
  4421.                 }
  4422.  
  4423.                 echo '</table></div>';
  4424.         }
  4425. }
  4426.  
  4427. 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")) {
  4428.         if ($maj_dh_pending_list = opendir("data/members/confirmed")) {
  4429.                 while (($maj_entry_pending_list = readdir($maj_dh_pending_list)) !== false) {
  4430.  
  4431.                         if ($maj_entry_pending_list != "." && $maj_entry_pending_list != "..") {
  4432.                                 $maj_show_pending_list[] = $maj_entry_pending_list;
  4433.                         }
  4434.                 }
  4435.                 closedir($maj_dh_pending_list);
  4436.         }
  4437.  
  4438.         sort($maj_show_pending_list);
  4439.         reset($maj_show_pending_list);
  4440.         $maj_count_pending_list = count($maj_show_pending_list);
  4441.        
  4442.         if ($maj_count_pending_list > 0) {
  4443.  
  4444.                 echo '<div class="panel_title">Pending Member';
  4445.                
  4446.                 if ($maj_count_pending_list > 1) {
  4447.                         echo "s";
  4448.                 }
  4449.                 echo "</div><div class=panel_body>Please approve or deny $maj_count_pending_list pending membership request";
  4450.                 if ($maj_count_pending_list > 1) {
  4451.                         echo "s";
  4452.                 }
  4453.                 echo " below.</div>";
  4454.  
  4455.                 foreach ($maj_show_pending_list as $maj_pending_list_entry) {
  4456.  
  4457.                         echo '<div class="panel_title">';
  4458.                         echo "$maj_pending_list_entry";
  4459.                         echo '<a href=reg.php?username=';
  4460.                         echo $maj_pending_list_entry;
  4461.                         echo '&key=';
  4462.                         readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
  4463.                         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=';
  4464.                         echo $maj_pending_list_entry;
  4465.                         echo '&key=';
  4466.                         readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
  4467.                         echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
  4468.                         echo "<div class=panel_body>";
  4469.                         if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
  4470.                                 echo "<a href=\"";
  4471.                                 readfile("data/members/confirmed/$maj_pending_list_entry/url.txt");
  4472.                                 echo "\" target=_pending>";
  4473.                         }
  4474.                         readfile("data/members/confirmed/$maj_pending_list_entry/firstname.txt");
  4475.                         echo "&nbsp;";
  4476.                         readfile("data/members/confirmed/$maj_pending_list_entry/lastname.txt");
  4477.                         if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
  4478.                                 echo "</a>";
  4479.                         }
  4480.                         echo "<br>";
  4481.                         $maj_pending_email = file_get_contents("data/members/confirmed/$maj_pending_list_entry/email.txt");
  4482.                         $maj_pending_email = wordwrap($maj_pending_email,30);
  4483.                         echo $maj_pending_email;
  4484.                         if (file_exists("data/members/confirmed/$maj_pending_list_entry/timestamp.txt")) {
  4485.                                 $maj_confirmed = file_get_contents("data/members/confirmed/$maj_pending_list_entry/timestamp.txt");
  4486.                                 $maj_confirmed_year = substr($maj_confirmed,0,4);
  4487.                                 $maj_confirmed_month = substr($maj_confirmed,4,2);
  4488.                                 $maj_confirmed_day = substr($maj_confirmed,6,2);
  4489.                                 $maj_confirmed_hh = substr($maj_confirmed,8,2);
  4490.                                 $maj_confirmed_mm = substr($maj_confirmed,10,2);
  4491.                                 $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));
  4492.                                 echo "<br>$maj_email_confirmed";
  4493.                         }
  4494.                         echo "</div>";
  4495.                 }
  4496.         }
  4497. }
  4498.  
  4499. if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
  4500.  
  4501.         echo '<div class="panel_title">Bulletin Board</div>';
  4502.        
  4503.         echo "<div class=panel_body>";
  4504.  
  4505.         if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
  4506.                 if ($maj_dh_active_list = opendir("data/members/active")) {
  4507.                         while (($maj_entry_active_list = readdir($maj_dh_active_list)) !== false) {
  4508.                                 if ($maj_entry_active_list != "." && $maj_entry_active_list != "..") {
  4509.                                         $maj_show_active_list[] = $maj_entry_active_list;
  4510.                                 }
  4511.                         }
  4512.                 closedir($maj_dh_active_list);
  4513.                 }
  4514.  
  4515.                 sort($maj_show_active_list);
  4516.                 reset($maj_show_active_list);
  4517.                 $maj_count_active_list = count($maj_show_active_list);
  4518.                 if ($maj_count_active_list > 0) {
  4519.                         echo "Registered Members: $maj_count_active_list";
  4520.                 }
  4521.         }
  4522.  
  4523.         if (file_exists("data/items")) {
  4524.                 if ($maj_dh_mempost_list = opendir("data/items")) {
  4525.                         while (($maj_entry_mempost_list = readdir($maj_dh_mempost_list)) !== false) {
  4526.  
  4527.                                 if (file_exists("data/items/$maj_entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4528.                                         continue;
  4529.                                 }
  4530.  
  4531.                                 $maj_private_categories = "0";
  4532.  
  4533.                                 if (file_exists("data/items/$maj_entry_mempost_list/categories")) {
  4534.                        
  4535.                                         if ($maj_dh_entry_categories_mempost_list = opendir("data/items/$maj_entry_mempost_list/categories")) {
  4536.                        
  4537.                                                 while (($maj_entry_category_mempost_list = readdir($maj_dh_entry_categories_mempost_list)) !== false) {
  4538.                        
  4539.                                                         if ($maj_entry_category_mempost_list != "." && $maj_entry_category_mempost_list != "..") {
  4540.                        
  4541.                                                                 if (file_exists("data/categories/$maj_entry_category_mempost_list/private.txt")) {
  4542.                                                                         $maj_private_categories = $maj_private_categories + 1;
  4543.                                                                 }
  4544.                                                         }
  4545.                                                 }
  4546.                                                 closedir($maj_dh_entry_categories_mempost_list);
  4547.                                         }
  4548.                                 }
  4549.  
  4550.                                 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")) {
  4551.                                         continue;
  4552.                                 }
  4553.        
  4554.                                 if ($maj_entry_mempost_list != "." && $maj_entry_mempost_list != "..") {
  4555.                                         $maj_entry_mempost_list = substr("$maj_entry_mempost_list",0,6);
  4556.                                         $maj_show_mempost_list[] = $maj_entry_mempost_list;
  4557.                                 }
  4558.                         }
  4559.                         closedir($maj_dh_mempost_list);
  4560.                 }
  4561.                 rsort($maj_show_mempost_list);
  4562.                 $maj_count_mempost_list = count($maj_show_mempost_list);
  4563.                 echo "<br>Total Posts: $maj_count_mempost_list";
  4564.                 unset($maj_show_mempost_list);
  4565.         }
  4566.  
  4567.         if (file_exists("data/bb-new.txt")) {
  4568.                 $maj_bb_new = file_get_contents("data/bb-new.txt");
  4569.                 echo "<br>Newest User: <a href=member.php?id=$maj_bb_new>$maj_bb_new</a>";
  4570.         }
  4571.         if (file_exists("data/bb-last.txt")) {
  4572.                 $maj_bb_last = file_get_contents("data/bb-last.txt");
  4573.                 echo "<br>Latest Login: <a href=member.php?id=$maj_bb_last>$maj_bb_last</a>";
  4574.         }
  4575.         echo "</div>";
  4576. }
  4577.  
  4578. if (($maj_count_grand > 0) and (!file_exists("data/xsearch.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
  4579.        
  4580.         echo '<div class="panel_title">';
  4581.  
  4582.         ?>
  4583.  
  4584.         Search</div>
  4585.         <form enctype="multipart/form-data" action="dig.php" method="post">
  4586.         <div class="panel_body">
  4587.         <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
  4588.         </form>
  4589.         </div>
  4590.  
  4591.         <?php
  4592. }
  4593.  
  4594.  
  4595. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4596.  
  4597.         echo '<div class="panel_title">Find Entries</div>';
  4598.        
  4599.         echo "<div class=panel_body>";
  4600.         echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
  4601.         if (file_exists("data/bb.txt")) {
  4602.                 echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
  4603.         }
  4604.         echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
  4605.         echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
  4606.         echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
  4607.         echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
  4608.         echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
  4609.         echo "</div>";
  4610. }
  4611.  
  4612. if (file_exists("data/categories")) {
  4613.         if ($maj_dh_categories = opendir("data/categories")) {
  4614.                 while (($maj_entry_categories = readdir($maj_dh_categories)) !== false) {
  4615.  
  4616.                         if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4617.                                 continue;
  4618.                         }
  4619.  
  4620.                         if (file_exists("data/categories/$maj_entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
  4621.                                 continue;
  4622.                         }
  4623.  
  4624.                         if ($maj_entry_categories != "." && $maj_entry_categories != "..") {
  4625.                                 $maj_show_categories[] = $maj_entry_categories;
  4626.                         }
  4627.                 }
  4628.                 closedir($maj_dh_categories);
  4629.         }
  4630.  
  4631.         sort($maj_show_categories);
  4632.         reset($maj_show_categories);
  4633.         $maj_count_categories = count($maj_show_categories);
  4634.  
  4635.         if ($maj_count_categories > 0) {
  4636.  
  4637.                 echo '<div class="panel_title">Categories</div>';
  4638.                
  4639.                 echo '<div class=panel_body>';
  4640.  
  4641.                 foreach ($maj_show_categories as $maj_category) {
  4642.  
  4643.                         echo "<a class=\"navlink\" href=\"index.php?category=$maj_category\">";
  4644.  
  4645.                         if (file_exists("data/categories/$maj_category/title.txt")) {
  4646.                                 $maj_category_title = file_get_contents("data/categories/$maj_category/title.txt");
  4647.                         }
  4648.                         else {
  4649.                                 $maj_category_title = ucfirst(str_replace("_"," ",$maj_category));
  4650.                         }
  4651.  
  4652.                         echo $maj_category_title;
  4653.                         echo "</a><br>";
  4654.                 }
  4655.  
  4656.                 echo '</div>';
  4657.         }
  4658. }
  4659.  
  4660. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4661.  
  4662.         echo '<div class="panel_title">Statistics</div>';
  4663.        
  4664.         echo '<div class=panel_body>';
  4665.         echo "Total Entries: $maj_count_latest";
  4666.         if (file_exists("data/hits.txt")) {
  4667.                 echo '<br>Site Hits: ';
  4668.                 readfile("data/hits.txt");
  4669.         }
  4670.         if (file_exists("data/google.txt")) {
  4671.                 echo '<br>Google Visits: ';
  4672.                 readfile("data/google.txt");
  4673.         }
  4674.         if (file_exists("data/rss-0.91.txt")) {
  4675.                 echo '<br>RSS 0.91 Hits: ';
  4676.                 readfile("data/rss-0.91.txt");
  4677.         }
  4678.         if (file_exists("data/rss-1.0.txt")) {
  4679.                 echo '<br>RSS 1.0 Hits: ';
  4680.                 readfile("data/rss-1.0.txt");
  4681.         }
  4682.         if (file_exists("data/rss-2.0.txt")) {
  4683.                 echo '<br>RSS 2.0 Hits: ';
  4684.                 readfile("data/rss-2.0.txt");
  4685.         }
  4686.         if (file_exists("data/sitemap.txt")) {
  4687.                 echo '<br>Sitemap Requests: ';
  4688.                 readfile("data/sitemap.txt");
  4689.         }
  4690.  
  4691.         echo '</div>';
  4692. }
  4693.  
  4694. 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")))) {
  4695.  
  4696.         echo '<div class="panel_title">Recent Entries</div>';
  4697.        
  4698.         echo '<div class=panel_body>';
  4699.  
  4700.         $maj_increment_recent_entries = "0";
  4701.  
  4702.         if ($maj_count_latest < 10) {
  4703.                 $maj_max_recent_entries = $maj_count_latest;
  4704.         }
  4705.         else {
  4706.                 $maj_max_recent_entries = "10";
  4707.         }
  4708.  
  4709.         while ($maj_increment_recent_entries < $maj_max_recent_entries) {
  4710.  
  4711.                 echo "<a class=\"navlink\" href=\"index.php?entry=$maj_latest[$maj_increment_recent_entries]\">";
  4712.                 readfile("data/items/$maj_latest[$maj_increment_recent_entries]/title.txt");
  4713.                 echo "</a><br>";
  4714.  
  4715.                 $maj_increment_recent_entries = $maj_increment_recent_entries + 1;
  4716.         }
  4717.  
  4718.         echo '</div>';
  4719. }
  4720.  
  4721. if ($maj_count_albums > 0) {
  4722.  
  4723.         echo "<div class=\"panel_title\">Albums</div>";
  4724.        
  4725.         echo "<div class=\"panel_body\">";
  4726.  
  4727.         foreach ($maj_albums as $maj_album) {
  4728.                 echo "<a class=\"navlink\" href=\"index.php?entry=$maj_album&show=album\">";
  4729.                 readfile("data/items/$maj_album/title.txt");
  4730.                 echo "</a><br>";
  4731.         }
  4732.         echo '</div>';
  4733. }
  4734.  
  4735. if (!file_exists("data/xrand.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4736.        
  4737.         shuffle($maj_random);
  4738.         reset($maj_random);
  4739.  
  4740.         if (file_exists("data/increase.txt")) {
  4741.                 $maj_limit_random = file_get_contents("data/increase.txt");
  4742.         }
  4743.         else {
  4744.                 $maj_limit_random = 5;
  4745.         }
  4746.        
  4747.         if ($maj_count_random > $maj_limit_random) {
  4748.        
  4749.                 echo '<div class="panel_title">Random Entries</div>';
  4750.                
  4751.                 echo "<div class=\"panel_body\">";
  4752.        
  4753.                 $maj_increment_random = 0;
  4754.        
  4755.                 if ($maj_count_random <= $maj_limit_random * 2) {
  4756.                         $maj_show_random = $maj_count_random - 1;
  4757.                 }
  4758.                 else {
  4759.                         $maj_show_random = $maj_limit_random * 2 - 1;
  4760.                 }
  4761.        
  4762.                 while ($maj_increment_random <= $maj_show_random) {
  4763.                         echo "<a class=\"navlink\" href=\"index.php?entry={$maj_random[$maj_increment_random]}\">";
  4764.                         readfile("data/items/$maj_random[$maj_increment_random]/title.txt");
  4765.                         echo "</a><br>";
  4766.        
  4767.                         $maj_increment_random = $maj_increment_random + 1;
  4768.                 }
  4769.         }
  4770.        
  4771.         if ($maj_count_random > $maj_limit_random) {
  4772.                 echo "</div>"; 
  4773.         }
  4774. }
  4775. ?>
  4776.  
  4777.  
  4778. <?php
  4779.  
  4780. 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")))) {
  4781.  
  4782.         $maj_archive_entries = implode(" ",$maj_archives);
  4783.  
  4784.         $maj_unique_archive_list = array_unique($maj_archives);
  4785.  
  4786.         echo "<div class=\"panel_title\">Archives ($maj_count_archives)</div>";
  4787.         echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
  4788.  
  4789.         foreach ($maj_unique_archive_list as $maj_archive_list_entry) {
  4790.  
  4791.                 $maj_archive_list_value = substr($maj_archive_list_entry,0,6);
  4792.                 $maj_archive_list_year = substr($maj_archive_list_entry,0,4);
  4793.                 $maj_archive_list_month = substr($maj_archive_list_entry,4,2);
  4794.                 $maj_archive_list_month = date("F",mktime(0,0,0,$maj_archive_list_month));
  4795.                 $maj_archive_list_num = substr_count($maj_archive_entries,$maj_archive_list_entry);
  4796.  
  4797.                 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>";
  4798.         }
  4799.         echo "</table></div>";
  4800. }
  4801.  
  4802. if ($maj_count_right_panels > 0) {
  4803.  
  4804.         foreach ($maj_right_panels as $maj_right_panel) {
  4805.  
  4806.                 if (!file_exists("data/panels/$maj_right_panel/free.txt")) {
  4807.  
  4808.                         if (file_exists("data/panels/$maj_right_panel/border.txt")) {
  4809.                                 $maj_right_panel_border = file_get_contents("data/panels/$maj_right_panel/border.txt");
  4810.                         }
  4811.                         else {
  4812.                                 if (isset($maj_right_panel_border)) {
  4813.                                         unset($maj_right_panel_border);
  4814.                                 }
  4815.                         }
  4816.  
  4817.                         if (file_exists("data/panels/$maj_right_panel/bgcolor-t.txt")) {
  4818.                                 $maj_right_panel_bgcolor_t = file_get_contents("data/panels/$maj_right_panel/bgcolor-t.txt");
  4819.                         }
  4820.                         else {
  4821.                                 if (isset($maj_right_panel_bgcolor_t)) {
  4822.                                         unset($maj_right_panel_bgcolor_t);
  4823.                                 }
  4824.                         }
  4825.  
  4826.                         if (file_exists("data/panels/$maj_right_panel/bgcolor-c.txt")) {
  4827.                                 $maj_right_panel_bgcolor_c = file_get_contents("data/panels/$maj_right_panel/bgcolor-c.txt");
  4828.                         }
  4829.                         else {
  4830.                                 if (isset($maj_right_panel_bgcolor_c)) {
  4831.                                         unset($maj_right_panel_bgcolor_c);
  4832.                                 }
  4833.                         }
  4834.  
  4835.                         if (file_exists("data/panels/$maj_right_panel/text-t.txt")) {
  4836.                                 $maj_right_panel_text_t = file_get_contents("data/panels/$maj_right_panel/text-t.txt");
  4837.                         }
  4838.                         else {
  4839.                                 if (isset($maj_right_panel_text_t)) {
  4840.                                         unset($maj_right_panel_text_t);
  4841.                                 }
  4842.                         }
  4843.  
  4844.                         if (file_exists("data/panels/$maj_right_panel/text-c.txt")) {
  4845.                                 $maj_right_panel_text_c = file_get_contents("data/panels/$maj_right_panel/text-c.txt");
  4846.                         }
  4847.                         else {
  4848.                                 if (isset($maj_right_panel_text_c)) {
  4849.                                         unset($maj_right_panel_text_c);
  4850.                                 }
  4851.                         }
  4852.  
  4853.                         echo '<div class="panel_title"';
  4854.  
  4855.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
  4856.                                 echo ' style="';
  4857.                         }
  4858.  
  4859.                         if (isset($maj_right_panel_bgcolor_t)) {
  4860.                                 echo "background-color: $maj_right_panel_bgcolor_t;";
  4861.                         }
  4862.  
  4863.                         if (isset($maj_right_panel_text_t)) {
  4864.                                 echo "color: $maj_right_panel_text_t;";
  4865.                         }
  4866.  
  4867.                         if (isset($maj_right_panel_border)) {
  4868.                                 echo "border-color: $maj_right_panel_border;";
  4869.                         }
  4870.  
  4871.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
  4872.                                 echo '"';
  4873.                         }
  4874.  
  4875.                                 echo '>';
  4876.  
  4877.                         readfile("data/panels/$maj_right_panel/title.txt");
  4878.  
  4879.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
  4880.                                 echo "<a href=\"panels.php#{$maj_right_panel}\">";
  4881.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  4882.                         }
  4883.  
  4884.                         if (file_exists("data/panels/$maj_right_panel/private.txt")) {
  4885.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  4886.                         }
  4887.  
  4888.                         echo '</div>';
  4889.  
  4890.                         echo '<div class="panel_body"';
  4891.  
  4892.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c) or isset($maj_right_panel_text_c)) {
  4893.                                 echo ' style="';
  4894.                         }
  4895.  
  4896.                         if (isset($maj_right_panel_bgcolor_c)) {
  4897.                                 echo "background-color: $maj_right_panel_bgcolor_c;";
  4898.                         }
  4899.  
  4900.                         if (isset($maj_right_panel_text_c)) {
  4901.                                 echo "color: $maj_right_panel_text_c;";
  4902.                         }
  4903.  
  4904.                         if (isset($maj_right_panel_border)) {
  4905.                                 echo "border-color: $maj_right_panel_border;";
  4906.                         }
  4907.  
  4908.                         if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c) or isset($maj_right_panel_text_c)) {
  4909.                                 echo '"';
  4910.                         }
  4911.  
  4912.                         echo '>';
  4913.                 }
  4914.  
  4915.                 if (file_exists("data/panels/$maj_right_panel/free.txt")) {
  4916.                         echo '<div class=panel_free>';
  4917.                 }
  4918.  
  4919.                 include("data/panels/$maj_right_panel/panel.php");
  4920.  
  4921.                 echo '</div>';
  4922.  
  4923.                 if (file_exists("data/panels/$maj_right_panel/free.txt") and !file_exists("data/panels/$maj_right_panel/nomargin.txt")) {
  4924.                         echo "<div style=\"height:10px;\"></div>";
  4925.                 }
  4926.         }
  4927. }
  4928.  
  4929. if ($maj_count_latest > 0) {
  4930.         echo '<table border="0" cellspacing="2" cellpadding="0" width="100%">';
  4931.         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>';
  4932.         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>';
  4933.         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>';
  4934.         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>';
  4935.         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>';
  4936.         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>';
  4937.         echo '</table>';
  4938. }
  4939.  
  4940. echo "</td></tr>";
  4941. 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>";
  4942. echo "</table>";
  4943.  
  4944. if (file_exists("data/footer.txt")) {
  4945.  
  4946.         $maj_footer_panel = file_get_contents("data/footer.txt");
  4947.  
  4948.         if (file_exists("data/panels/$maj_footer_panel") and (!file_exists("data/panels/$maj_footer_panel/private.txt") or isset($_SESSION['logged_in']))) {
  4949.                 include("data/panels/$maj_footer_panel/panel.php");
  4950.         }
  4951.  
  4952. }
  4953.  
  4954. if (file_exists("data/center.txt")) {
  4955.         echo "</center>";
  4956. }
  4957.  
  4958. ?>
  4959.  
filedropmaj.git-01822e4.tar.bz2
147.95 KB
63 downloads
filedropmaj.git-01822e4.zip
201.96 KB
20 downloads
filedropmaj.git-0291349.tar.bz2
152.85 KB
61 downloads
filedropmaj.git-0291349.zip
211.90 KB
20 downloads
filedropmaj.git-02cb3b7.tar.bz2
151.48 KB
64 downloads
filedropmaj.git-02cb3b7.zip
209.82 KB
20 downloads
filedropmaj.git-0811dd5.tar.bz2
152.90 KB
60 downloads
filedropmaj.git-0811dd5.zip
211.90 KB
18 downloads
filedropmaj.git-083625f.tar.bz2
132.92 KB
59 downloads
filedropmaj.git-083625f.zip
179.59 KB
20 downloads
filedropmaj.git-0885d7b.tar.bz2
92.63 KB
60 downloads
filedropmaj.git-0885d7b.zip
132.34 KB
17 downloads
filedropmaj.git-09c6f33.tar.bz2
151.51 KB
59 downloads
filedropmaj.git-09c6f33.zip
202.12 KB
18 downloads
filedropmaj.git-0b26a85.tar.bz2
151.44 KB
57 downloads
filedropmaj.git-0b26a85.zip
209.75 KB
16 downloads
filedropmaj.git-0b32424.tar.bz2
151.66 KB
58 downloads
filedropmaj.git-0b32424.zip
206.72 KB
17 downloads
filedropmaj.git-0f3ac59.tar.bz2
152.14 KB
57 downloads
filedropmaj.git-0f3ac59.zip
211.45 KB
13 downloads
filedropmaj.git-11d4582.tar.bz2
143.02 KB
55 downloads
filedropmaj.git-11d4582.zip
195.12 KB
12 downloads
filedropmaj.git-17f105a.tar.bz2
137.96 KB
53 downloads
filedropmaj.git-17f105a.zip
193.02 KB
13 downloads
filedropmaj.git-183270b.tar.bz2
137.54 KB
57 downloads
filedropmaj.git-183270b.zip
187.93 KB
13 downloads
filedropmaj.git-197a49d.tar.bz2
152.03 KB
55 downloads
filedropmaj.git-197a49d.zip
211.32 KB
16 downloads
filedropmaj.git-1b9af25.tar.bz2
152.87 KB
53 downloads
filedropmaj.git-1b9af25.zip
211.96 KB
14 downloads
filedropmaj.git-1be2914.tar.bz2
149.30 KB
55 downloads
filedropmaj.git-1be2914.zip
203.09 KB
13 downloads
filedropmaj.git-1bed800.tar.bz2
138.15 KB
51 downloads
filedropmaj.git-1bed800.zip
190.15 KB
17 downloads
filedropmaj.git-1d330de.tar.bz2
151.65 KB
54 downloads
filedropmaj.git-1d330de.zip
210.80 KB
15 downloads
filedropmaj.git-1df190d.tar.bz2
151.72 KB
55 downloads
filedropmaj.git-1df190d.zip
210.85 KB
13 downloads
filedropmaj.git-1ee1167.tar.bz2
151.52 KB
56 downloads
filedropmaj.git-1ee1167.zip
202.16 KB
14 downloads
filedropmaj.git-2057838.tar.bz2
151.76 KB
52 downloads
filedropmaj.git-2057838.zip
202.36 KB
14 downloads
filedropmaj.git-2075213.tar.bz2
155.81 KB
52 downloads
filedropmaj.git-2075213.zip
208.39 KB
13 downloads
filedropmaj.git-211b7b0.tar.bz2
142.53 KB
55 downloads
filedropmaj.git-211b7b0.zip
194.64 KB
14 downloads
filedropmaj.git-2331f5a.tar.bz2
75.55 KB
55 downloads
filedropmaj.git-2331f5a.zip
100.32 KB
16 downloads
filedropmaj.git-25e3c4c.tar.bz2
147.57 KB
53 downloads
filedropmaj.git-25e3c4c.zip
201.46 KB
13 downloads
filedropmaj.git-2622313.tar.bz2
151.47 KB
50 downloads
filedropmaj.git-2622313.zip
206.44 KB
12 downloads
filedropmaj.git-273e4b2.tar.bz2
152.60 KB
52 downloads
filedropmaj.git-273e4b2.zip
203.40 KB
15 downloads
filedropmaj.git-2753e51.tar.bz2
136.37 KB
55 downloads
filedropmaj.git-2753e51.zip
184.34 KB
12 downloads
filedropmaj.git-2c1a589.tar.bz2
155.89 KB
49 downloads
filedropmaj.git-2c1a589.zip
208.69 KB
13 downloads
filedropmaj.git-2c3d544.tar.bz2
151.33 KB
51 downloads
filedropmaj.git-2c3d544.zip
206.23 KB
14 downloads
filedropmaj.git-2c85f72.tar.bz2
143.23 KB
50 downloads
filedropmaj.git-2c85f72.zip
194.84 KB
12 downloads
filedropmaj.git-2dc622c.tar.bz2
151.76 KB
48 downloads
filedropmaj.git-2dc622c.zip
202.35 KB
14 downloads
filedropmaj.git-2fabf8a.tar.bz2
151.35 KB
53 downloads
filedropmaj.git-2fabf8a.zip
206.24 KB
15 downloads
filedropmaj.git-322736b.tar.bz2
137.81 KB
45 downloads
filedropmaj.git-322736b.zip
190.18 KB
13 downloads
filedropmaj.git-374279c.tar.bz2
137.54 KB
46 downloads
filedropmaj.git-374279c.zip
189.58 KB
12 downloads
filedropmaj.git-37e852d.tar.bz2
151.32 KB
42 downloads
filedropmaj.git-37e852d.zip
206.21 KB
11 downloads
filedropmaj.git-38636de.tar.bz2
147.35 KB
42 downloads
filedropmaj.git-38636de.zip
201.16 KB
69 downloads
filedropmaj.git-3b25d71.tar.bz2
147.88 KB
35 downloads
filedropmaj.git-3b25d71.zip
201.85 KB
14 downloads
filedropmaj.git-3b6df7a.tar.bz2
153.39 KB
33 downloads
filedropmaj.git-3b6df7a.zip
204.55 KB
17 downloads
filedropmaj.git-3bf6bd2.tar.bz2
137.77 KB
38 downloads
filedropmaj.git-3bf6bd2.zip
190.16 KB
14 downloads
filedropmaj.git-3e012ff.tar.bz2
152.83 KB
34 downloads
filedropmaj.git-3e012ff.zip
211.89 KB
16 downloads
filedropmaj.git-4129ab8.tar.bz2
135.86 KB
42 downloads
filedropmaj.git-4129ab8.zip
184.30 KB
14 downloads
filedropmaj.git-414dbb4.tar.bz2
91.09 KB
40 downloads
filedropmaj.git-414dbb4.zip
130.29 KB
14 downloads
filedropmaj.git-43755d0.tar.bz2
150.25 KB
33 downloads
filedropmaj.git-43755d0.zip
204.44 KB
14 downloads
filedropmaj.git-4c20005.tar.bz2
55.59 KB
37 downloads
filedropmaj.git-4c20005.zip
74.20 KB
14 downloads
filedropmaj.git-4ccdbcd.tar.bz2
136.38 KB
38 downloads
filedropmaj.git-4ccdbcd.zip
185.22 KB
16 downloads
filedropmaj.git-4cd1a1c.tar.bz2
155.25 KB
35 downloads
filedropmaj.git-4cd1a1c.zip
207.88 KB
16 downloads
filedropmaj.git-4cf16d1.tar.bz2
76.32 KB
38 downloads
filedropmaj.git-4cf16d1.zip
101.80 KB
12 downloads
filedropmaj.git-4ec45a0.tar.bz2
131.16 KB
35 downloads
filedropmaj.git-4ec45a0.zip
172.66 KB
14 downloads
filedropmaj.git-4f73c22.tar.bz2
134.46 KB
35 downloads
filedropmaj.git-4f73c22.zip
182.45 KB
13 downloads
filedropmaj.git-5457969.tar.bz2
155.21 KB
38 downloads
filedropmaj.git-5457969.zip
207.63 KB
14 downloads
filedropmaj.git-57ee8a1.tar.bz2
145.49 KB
38 downloads
filedropmaj.git-57ee8a1.zip
198.12 KB
66 downloads
filedropmaj.git-592978d.tar.bz2
138.38 KB
36 downloads
filedropmaj.git-592978d.zip
190.58 KB
13 downloads
filedropmaj.git-5935b42.tar.bz2
135.60 KB
34 downloads
filedropmaj.git-5935b42.zip
183.28 KB
15 downloads
filedropmaj.git-5b443b6.tar.bz2
152.00 KB
36 downloads
filedropmaj.git-5b443b6.zip
211.07 KB
13 downloads
filedropmaj.git-5b4a9bf.tar.bz2
155.29 KB
34 downloads
filedropmaj.git-5b4a9bf.zip
207.93 KB
12 downloads
filedropmaj.git-5b6c01d.tar.bz2
147.13 KB
35 downloads
filedropmaj.git-5b6c01d.zip
200.86 KB
16 downloads
filedropmaj.git-5da45f7.tar.bz2
147.27 KB
36 downloads
filedropmaj.git-5da45f7.zip
201.02 KB
13 downloads
filedropmaj.git-5e53618.tar.bz2
75.57 KB
38 downloads
filedropmaj.git-5e53618.zip
100.78 KB
14 downloads
filedropmaj.git-5f8ca35.tar.bz2
136.39 KB
33 downloads
filedropmaj.git-5f8ca35.zip
185.32 KB
13 downloads
filedropmaj.git-61e3d7b.tar.bz2
153.52 KB
33 downloads
filedropmaj.git-61e3d7b.zip
204.73 KB
15 downloads
filedropmaj.git-62a635c.tar.bz2
155.90 KB
37 downloads
filedropmaj.git-62a635c.zip
208.73 KB
14 downloads
filedropmaj.git-6390d34.tar.bz2
138.39 KB
37 downloads
filedropmaj.git-6390d34.zip
190.56 KB
17 downloads
filedropmaj.git-649dfbe.tar.bz2
151.78 KB
37 downloads
filedropmaj.git-649dfbe.zip
210.91 KB
14 downloads
filedropmaj.git-65d6570.tar.bz2
151.63 KB
39 downloads
filedropmaj.git-65d6570.zip
210.80 KB
16 downloads
filedropmaj.git-660433f.tar.bz2
151.67 KB
36 downloads
filedropmaj.git-660433f.zip
206.68 KB
14 downloads
filedropmaj.git-6619ae5.tar.bz2
153.23 KB
47 downloads
filedropmaj.git-6619ae5.zip
204.28 KB
13 downloads
filedropmaj.git-68e4e3a.tar.bz2
135.13 KB
34 downloads
filedropmaj.git-68e4e3a.zip
182.91 KB
13 downloads
filedropmaj.git-6995297.tar.bz2
144.93 KB
38 downloads
filedropmaj.git-6995297.zip
197.18 KB
12 downloads
filedropmaj.git-69d6fd3.tar.bz2
143.23 KB
34 downloads
filedropmaj.git-69d6fd3.zip
194.89 KB
16 downloads
filedropmaj.git-6aa872a.tar.bz2
142.95 KB
39 downloads
filedropmaj.git-6aa872a.zip
195.11 KB
15 downloads
filedropmaj.git-6bad5c7.tar.bz2
147.04 KB
38 downloads
filedropmaj.git-6bad5c7.zip
200.79 KB
14 downloads
filedropmaj.git-6e96a2d.tar.bz2
152.13 KB
37 downloads
filedropmaj.git-6e96a2d.zip
207.21 KB
67 downloads
filedropmaj.git-73d46de.tar.bz2
138.42 KB
36 downloads
filedropmaj.git-73d46de.zip
190.59 KB
13 downloads
filedropmaj.git-75e0478.tar.bz2
144.54 KB
38 downloads
filedropmaj.git-75e0478.zip
196.70 KB
15 downloads
filedropmaj.git-784fc35.tar.bz2
143.07 KB
38 downloads
filedropmaj.git-784fc35.zip
195.01 KB
13 downloads
filedropmaj.git-7872a83.tar.bz2
138.51 KB
39 downloads
filedropmaj.git-7872a83.zip
190.69 KB
13 downloads
filedropmaj.git-788fb89.tar.bz2
138.30 KB
37 downloads
filedropmaj.git-788fb89.zip
191.26 KB
18 downloads
filedropmaj.git-796d8a3.tar.bz2
138.92 KB
35 downloads
filedropmaj.git-796d8a3.zip
191.24 KB
13 downloads
filedropmaj.git-79a5e8d.tar.bz2
132.43 KB
38 downloads
filedropmaj.git-79a5e8d.zip
176.90 KB
14 downloads
filedropmaj.git-7b3b2e0.tar.bz2
147.24 KB
36 downloads
filedropmaj.git-7b3b2e0.zip
201.05 KB
14 downloads
filedropmaj.git-7e28eed.tar.bz2
138.89 KB
33 downloads
filedropmaj.git-7e28eed.zip
191.24 KB
14 downloads
filedropmaj.git-8279296.tar.bz2
135.56 KB
38 downloads
filedropmaj.git-8279296.zip
183.25 KB
14 downloads
filedropmaj.git-84c17fe.tar.bz2
152.87 KB
38 downloads
filedropmaj.git-84c17fe.zip
211.90 KB
14 downloads
filedropmaj.git-87c5d5f.tar.bz2
135.78 KB
36 downloads
filedropmaj.git-87c5d5f.zip
183.64 KB
12 downloads
filedropmaj.git-8a48901.tar.bz2
147.27 KB
39 downloads
filedropmaj.git-8a48901.zip
201.06 KB
14 downloads
filedropmaj.git-8ad9892.tar.bz2
164.04 KB
36 downloads
filedropmaj.git-8ad9892.zip
224.42 KB
13 downloads
filedropmaj.git-8b4cf2a.tar.bz2
134.06 KB
37 downloads
filedropmaj.git-8b4cf2a.zip
180.78 KB
14 downloads
filedropmaj.git-8b7e38d.tar.bz2
138.04 KB
41 downloads
filedropmaj.git-8b7e38d.zip
190.39 KB
70 downloads
filedropmaj.git-8df6e40.tar.bz2
143.11 KB
38 downloads
filedropmaj.git-8df6e40.zip
194.66 KB
18 downloads
filedropmaj.git-8e80c84.tar.bz2
138.18 KB
36 downloads
filedropmaj.git-8e80c84.zip
190.30 KB
14 downloads
filedropmaj.git-8ec0fba.tar.bz2
138.37 KB
39 downloads
filedropmaj.git-8ec0fba.zip
191.39 KB
14 downloads
filedropmaj.git-8f7abf6.tar.bz2
153.36 KB
38 downloads
filedropmaj.git-8f7abf6.zip
211.80 KB
13 downloads
filedropmaj.git-923f11a.tar.bz2
138.14 KB
36 downloads
filedropmaj.git-923f11a.zip
191.03 KB
15 downloads
filedropmaj.git-955e82e.tar.bz2
42.71 KB
35 downloads
filedropmaj.git-955e82e.zip
59.77 KB
14 downloads
filedropmaj.git-95add4a.tar.bz2
151.23 KB
40 downloads
filedropmaj.git-95add4a.zip
205.91 KB
14 downloads
filedropmaj.git-96fe0ba.tar.bz2
137.68 KB
32 downloads
filedropmaj.git-96fe0ba.zip
190.34 KB
13 downloads
filedropmaj.git-99a90ce.tar.bz2
137.82 KB
39 downloads
filedropmaj.git-99a90ce.zip
191.20 KB
16 downloads
filedropmaj.git-9a69bb9.tar.bz2
143.19 KB
39 downloads
filedropmaj.git-9a69bb9.zip
194.70 KB
15 downloads
filedropmaj.git-9b6538e.tar.bz2
151.45 KB
36 downloads
filedropmaj.git-9b6538e.zip
202.15 KB
13 downloads
filedropmaj.git-9c4292d.tar.bz2
132.06 KB
37 downloads
filedropmaj.git-9c4292d.zip
176.93 KB
13 downloads
filedropmaj.git-9c78d40.tar.bz2
137.70 KB
37 downloads
filedropmaj.git-9c78d40.zip
190.49 KB
15 downloads
filedropmaj.git-9f1363f.tar.bz2
43.12 KB
40 downloads
filedropmaj.git-9f1363f.zip
60.31 KB
13 downloads
filedropmaj.git-a16c3eb.tar.bz2
90.22 KB
34 downloads
filedropmaj.git-a16c3eb.zip
128.62 KB
14 downloads
filedropmaj.git-a3aa72d.tar.bz2
153.00 KB
37 downloads
filedropmaj.git-a3aa72d.zip
203.86 KB
16 downloads
filedropmaj.git-a6886e4.tar.bz2
144.69 KB
37 downloads
filedropmaj.git-a6886e4.zip
196.95 KB
13 downloads
filedropmaj.git-a8669dc.tar.bz2
135.60 KB
35 downloads
filedropmaj.git-a8669dc.zip
183.34 KB
14 downloads
filedropmaj.git-a9477f1.tar.bz2
135.59 KB
37 downloads
filedropmaj.git-a9477f1.zip
183.45 KB
14 downloads
filedropmaj.git-aa285db.tar.bz2
151.73 KB
38 downloads
filedropmaj.git-aa285db.zip
210.85 KB
14 downloads
filedropmaj.git-aa6ae87.tar.bz2
135.44 KB
37 downloads
filedropmaj.git-aa6ae87.zip
183.88 KB
14 downloads
filedropmaj.git-ab6bc22.tar.bz2
151.71 KB
33 downloads
filedropmaj.git-ab6bc22.zip
210.84 KB
16 downloads
filedropmaj.git-adef726.tar.bz2
153.48 KB
36 downloads
filedropmaj.git-adef726.zip
212.32 KB
14 downloads
filedropmaj.git-afe5877.tar.bz2
144.73 KB
32 downloads
filedropmaj.git-afe5877.zip
197.01 KB
13 downloads
filedropmaj.git-b2d9f8e.tar.bz2
133.22 KB
35 downloads
filedropmaj.git-b2d9f8e.zip
179.27 KB
13 downloads
filedropmaj.git-b41f320.tar.bz2
151.56 KB
33 downloads
filedropmaj.git-b41f320.zip
209.85 KB
18 downloads
filedropmaj.git-b4432ce.tar.bz2
152.96 KB
34 downloads
filedropmaj.git-b4432ce.zip
203.86 KB
14 downloads
filedropmaj.git-b67b08f.tar.bz2
151.27 KB
36 downloads
filedropmaj.git-b67b08f.zip
206.15 KB
16 downloads
filedropmaj.git-b899831.tar.bz2
143.12 KB
35 downloads
filedropmaj.git-b899831.zip
194.60 KB
14 downloads
filedropmaj.git-b8b49c1.tar.bz2
132.59 KB
33 downloads
filedropmaj.git-b8b49c1.zip
178.90 KB
13 downloads
filedropmaj.git-b9c5bcf.tar.bz2
155.92 KB
34 downloads
filedropmaj.git-b9c5bcf.zip
208.70 KB
12 downloads
filedropmaj.git-bbddb1f.tar.bz2
151.63 KB
33 downloads
filedropmaj.git-bbddb1f.zip
209.92 KB
16 downloads
filedropmaj.git-bcaa744.tar.bz2
146.98 KB
37 downloads
filedropmaj.git-bcaa744.zip
200.79 KB
15 downloads
filedropmaj.git-c1ff9dc.tar.bz2
138.39 KB
38 downloads
filedropmaj.git-c1ff9dc.zip
191.43 KB
97 downloads
filedropmaj.git-c20c4b0.tar.bz2
151.64 KB
35 downloads
filedropmaj.git-c20c4b0.zip
210.79 KB
13 downloads
filedropmaj.git-c37f3f7.tar.bz2
145.45 KB
49 downloads
filedropmaj.git-c37f3f7.zip
198.11 KB
22 downloads
filedropmaj.git-c532394.tar.bz2
146.39 KB
37 downloads
filedropmaj.git-c532394.zip
199.91 KB
15 downloads
filedropmaj.git-c6317a4.tar.bz2
152.01 KB
36 downloads
filedropmaj.git-c6317a4.zip
207.08 KB
13 downloads
filedropmaj.git-c748176.tar.bz2
89.44 KB
34 downloads
filedropmaj.git-c748176.zip
126.35 KB
14 downloads
filedropmaj.git-c9ed81f.tar.bz2
135.56 KB
34 downloads
filedropmaj.git-c9ed81f.zip
183.28 KB
16 downloads
filedropmaj.git-c9f9b80.tar.bz2
138.50 KB
34 downloads
filedropmaj.git-c9f9b80.zip
190.66 KB
15 downloads
filedropmaj.git-ca65b73.tar.bz2
152.69 KB
35 downloads
filedropmaj.git-ca65b73.zip
207.87 KB
15 downloads
filedropmaj.git-cd80b77.tar.bz2
153.12 KB
35 downloads
filedropmaj.git-cd80b77.zip
212.01 KB
12 downloads
filedropmaj.git-cffbb2a.tar.bz2
138.22 KB
33 downloads
filedropmaj.git-cffbb2a.zip
190.28 KB
14 downloads
filedropmaj.git-d061ad7.tar.bz2
55.78 KB
47 downloads
filedropmaj.git-d061ad7.zip
74.39 KB
15 downloads
filedropmaj.git-d0af4d6.tar.bz2
57.28 KB
35 downloads
filedropmaj.git-d0af4d6.zip
78.56 KB
15 downloads
filedropmaj.git-d1caa0a.tar.bz2
144.57 KB
37 downloads
filedropmaj.git-d1caa0a.zip
196.63 KB
14 downloads
filedropmaj.git-d5679b5.tar.bz2
152.37 KB
34 downloads
filedropmaj.git-d5679b5.zip
207.52 KB
15 downloads
filedropmaj.git-d72f459.tar.bz2
147.90 KB
36 downloads
filedropmaj.git-d72f459.zip
201.92 KB
13 downloads
filedropmaj.git-d958c91.tar.bz2
144.67 KB
37 downloads
filedropmaj.git-d958c91.zip
196.88 KB
17 downloads
filedropmaj.git-d96784f.tar.bz2
135.58 KB
36 downloads
filedropmaj.git-d96784f.zip
183.46 KB
12 downloads
filedropmaj.git-da4b73f.tar.bz2
152.62 KB
33 downloads
filedropmaj.git-da4b73f.zip
203.48 KB
13 downloads
filedropmaj.git-dd24240.tar.bz2
138.27 KB
33 downloads
filedropmaj.git-dd24240.zip
190.45 KB
72 downloads
filedropmaj.git-e11e772.tar.bz2
152.09 KB
33 downloads
filedropmaj.git-e11e772.zip
211.33 KB
14 downloads
filedropmaj.git-e61478e.tar.bz2
135.95 KB
37 downloads
filedropmaj.git-e61478e.zip
183.91 KB
14 downloads
filedropmaj.git-e7a2547.tar.bz2
133.80 KB
33 downloads
filedropmaj.git-e7a2547.zip
180.05 KB
16 downloads
filedropmaj.git-e8a3b95.tar.bz2
138.15 KB
37 downloads
filedropmaj.git-e8a3b95.zip
191.04 KB
12 downloads
filedropmaj.git-eac86d5.tar.bz2
155.65 KB
33 downloads
filedropmaj.git-eac86d5.zip
208.28 KB
12 downloads
filedropmaj.git-ed83bf9.tar.bz2
135.16 KB
34 downloads
filedropmaj.git-ed83bf9.zip
182.91 KB
15 downloads
filedropmaj.git-ee50d40.tar.bz2
135.59 KB
36 downloads
filedropmaj.git-ee50d40.zip
183.48 KB
16 downloads
filedropmaj.git-efdb4df.tar.bz2
155.87 KB
36 downloads
filedropmaj.git-efdb4df.zip
208.72 KB
14 downloads
filedropmaj.git-f1554f8.tar.bz2
151.30 KB
37 downloads
filedropmaj.git-f1554f8.zip
206.22 KB
16 downloads
filedropmaj.git-f72a07b.tar.bz2
153.44 KB
37 downloads
filedropmaj.git-f72a07b.zip
212.11 KB
17 downloads
filedropmaj.git-f7ea5a1.tar.bz2
147.46 KB
36 downloads
filedropmaj.git-f7ea5a1.zip
201.32 KB
17 downloads
filedropmaj.git-f8a7353.tar.bz2
138.49 KB
36 downloads
filedropmaj.git-f8a7353.zip
190.66 KB
18 downloads
filedropmaj.git-fb84a8d.tar.bz2
137.61 KB
41 downloads
filedropmaj.git-fb84a8d.zip
190.70 KB
18 downloads
filedropmaj.git-fdcf5d3.tar.bz2
152.34 KB
40 downloads
filedropmaj.git-fdcf5d3.zip
207.53 KB
17 downloads
filedropmaj.git-feca42d.tar.bz2
132.90 KB
39 downloads
filedropmaj.git-feca42d.zip
179.44 KB
20 downloads