maj.world

maj.world

Git

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