maj.world

maj.world

Git

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