maj.world

maj.world

Git

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