maj.world

maj.world

Git

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