This blob has been accessed 436 times via Git panel.
- <?php
- ini_set("session.use_trans_sid","0");
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
- header("Location: login.php");
- }
- if (get_magic_quotes_gpc()) {
- function stripslashes_array($maj_data) {
- if (is_array($maj_data)) {
- foreach ($maj_data as $maj_key => $maj_value) {
- $maj_data[$maj_key] = stripslashes_array($maj_value);
- }
- return $maj_data;
- }
- else {
- return stripslashes($maj_data);
- }
- }
- $_REQUEST = stripslashes_array($_REQUEST);
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
- $maj_req_entry = trim($_REQUEST['entry']);
- }
- if (isset($_REQUEST['show']) and !empty($_REQUEST['show'])) {
- $maj_req_show = trim($_REQUEST['show']);
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find'])) {
- $maj_req_find = trim($_REQUEST['find']);
- $maj_req_find = str_replace(" ","-",$maj_req_find);
- $maj_req_find = strtolower($maj_req_find);
- $maj_req_find = strip_tags($maj_req_find);
- }
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
- $maj_req_category = trim($_REQUEST['category']);
- $maj_req_category = str_replace(" ","-",$maj_req_category);
- $maj_req_category = strtolower($maj_req_category);
- $maj_req_category = strip_tags($maj_req_category);
- }
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- $maj_req_archive = trim($_REQUEST['archive']);
- }
- if (isset($_REQUEST['author']) and !empty($_REQUEST['author'])) {
- $maj_req_author = trim($_REQUEST['author']);
- $maj_req_author = str_replace(" ","-",$maj_req_author);
- $maj_req_author = strtolower($maj_req_author);
- $maj_req_author = strip_tags($maj_req_author);
- }
- if (file_exists("data/offset.txt")) {
- $maj_offset = file_get_contents("data/offset.txt");
- }
- else {
- $maj_offset = 0;
- }
- if (file_exists("data/increase.txt")) {
- $maj_increase = file_get_contents("data/increase.txt");
- }
- else {
- $maj_increase = 5;
- }
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- $maj_wmain = "610";
- }
- else {
- $maj_wmain = "525";
- }
- $maj_wside = "175";
- $maj_wspace = "10";
- $maj_wtable = $maj_wside + $maj_wspace + $maj_wmain + $maj_wspace + $maj_wside;
- $maj_default_blog_title = "My Activity Journal";
- $maj_default_username = "maj";
- $maj_default_password = "php";
- $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.';
- $maj_default_blog_author = "My Activity Journal";
- if (!file_exists("data")) {
- mkdir("data");
- }
- if (!file_exists("data/.htaccess")) {
- $maj_htaccess = "Order deny,allow\nDeny from all";
- }
- if (!file_exists("data/title.txt")) {
- }
- if (!file_exists("data/username.txt")) {
- }
- if (!file_exists("data/password.txt")) {
- $maj_default_password = sha1($maj_default_password);
- $maj_default_password = md5($maj_default_password);
- $maj_default_password = crypt($maj_default_password,$maj_default_password);
- }
- if (!file_exists("data/profile.php")) {
- }
- if (!file_exists("data/author.txt")) {
- }
- $maj_default_title = file_get_contents("data/title.txt");
- $maj_login_username = file_get_contents("data/username.txt");
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username)) {
- if (file_exists("data/hits.txt")) {
- $maj_global_hits_count = file_get_contents("data/hits.txt");
- }
- else {
- $maj_global_hits_count = "0";
- }
- $maj_global_hits_count = $maj_global_hits_count + 1;
- }
- if (@ereg("Google",$_SERVER['HTTP_USER_AGENT'])) {
- if (file_exists("data/google.txt")) {
- $maj_google_hits_count = file_get_contents("data/google.txt");
- }
- else {
- $maj_google_hits_count = "0";
- }
- $maj_google_hits_count = $maj_google_hits_count + 1;
- }
- function str_rand($maj_length = 8,$maj_seeds = 'abcdefghijklmnopqrstuvwxyz0123456789') {
- $maj_str = '';
- list($maj_usec,$maj_sec) = explode(' ',microtime());
- $maj_seed = (float) $maj_sec + ((float) $maj_usec * 100000);
- mt_srand($maj_seed);
- for ($maj_i = 0; $maj_length > $maj_i; $maj_i++) {
- $maj_str .= $maj_seeds{mt_rand(0,$maj_seeds_count - 1)};
- }
- return $maj_str;
- }
- function rmdirr($maj_recurse_dirname) {
- if (!file_exists($maj_recurse_dirname)) {
- return false;
- }
- if (is_file($maj_recurse_dirname)) {
- return unlink($maj_recurse_dirname);
- }
- $maj_recurse_dir = dir($maj_recurse_dirname);
- while (false !== $maj_recurse_entry = $maj_recurse_dir->read()) {
- if ($maj_recurse_entry == '.' || $maj_recurse_entry == '..') {
- continue;
- }
- rmdirr("$maj_recurse_dirname/$maj_recurse_entry");
- }
- $maj_recurse_dir->close();
- return rmdir($maj_recurse_dirname);
- }
- if (isset($_REQUEST['download']) and !empty($_REQUEST['download'])) {
- ini_set("zlib.output_compression","off");
- $maj_dl_file = str_replace("../","",@$_REQUEST['download']);
- go_download($maj_dl_file);
- die();
- }
- function go_download($maj_dl_file) {
- $maj_req_entry = trim($_REQUEST['entry']);
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "pdf")) {
- $maj_dl_path = "data/items/$maj_req_entry/pdf/file";
- $maj_count_path = "data/items/$maj_req_entry/pdf/count";
- $maj_count_file = "dl.txt";
- }
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "filedrop")) {
- $maj_dl_path = "data/items/$maj_req_entry/filedrop/files";
- $maj_count_path = "data/items/$maj_req_entry/filedrop/count";
- $maj_count_file = "{$maj_dl_file}.txt";
- }
- $maj_dl_file_size = filesize("$maj_dl_path/$maj_dl_file");
- header("Cache-Control: ");
- header("Pragma: ");
- header("Content-type: application/octet-stream");
- header("Content-Disposition: attachment; filename=$maj_dl_file");
- header("Content-length: $maj_dl_file_size");
- echo $maj_buf;
- }
- if ($maj_bytes_sent == $maj_dl_file_size) {
- if (!file_exists($maj_count_path)) {
- mkdir($maj_count_path);
- }
- $maj_unique_downloads = "$maj_count_path/$maj_count_file";
- if (file_exists($maj_unique_downloads)) {
- $maj_count_unique_downloads = file_get_contents($maj_unique_downloads);
- }
- else {
- $maj_count_unique_downloads = "0";
- }
- $maj_count_unique_downloads = $maj_count_unique_downloads + 1;
- }
- }
- function entry2date($maj_f_entry) {
- $maj_f_entry_year = substr($maj_f_entry,0,4);
- $maj_f_entry_month = substr($maj_f_entry,4,2);
- $maj_f_entry_day = substr($maj_f_entry,6,2);
- $maj_f_entry_hour = substr($maj_f_entry,8,2);
- $maj_f_entry_min = substr($maj_f_entry,10,2);
- $maj_f_entry_sec = substr($maj_f_entry,12,2);
- 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));
- }
- 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'])) {
- $maj_comment_dir = "data/items/$maj_req_entry/comments/pending/{$_REQUEST['comment']}";
- $maj_login_key = file_get_contents("$maj_comment_dir/key.txt");
- if ($_REQUEST['key'] == $maj_login_key) {
- if ($_REQUEST['action'] == "approve") {
- $maj_live_dir = "data/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}";
- if (!file_exists("data/items/$maj_req_entry/comments/live")) {
- mkdir("data/items/$maj_req_entry/comments/live");
- }
- if (!file_exists("data/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}")) {
- mkdir("data/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}");
- }
- unlink("$maj_live_dir/key.txt");
- // clean-up old latest comments dir
- if (file_exists("data/comments/latest")) {
- rmdirr("data/comments/latest");
- }
- // clean-up old latest comments dir
- if (file_exists("data/members/active") and !file_exists("data/xucomment.txt")) {
- if (!file_exists("data/comments/unread")) {
- mkdir("data/comments/unread");
- }
- if (!file_exists("data/comments/unread/$maj_req_entry")) {
- mkdir("data/comments/unread/$maj_req_entry");
- }
- if ($maj_dh_unread_active_members = opendir("data/members/active")) {
- while (($maj_unread_active_member = readdir($maj_dh_unread_active_members)) !== false) {
- if ($maj_unread_active_member != "." && $maj_unread_active_member != "..") {
- if (!file_exists("data/members/active/$maj_unread_active_member/comments")) {
- mkdir("data/members/active/$maj_unread_active_member/comments");
- }
- if (!file_exists("data/members/active/$maj_unread_active_member/comments/unread")) {
- mkdir("data/members/active/$maj_unread_active_member/comments/unread");
- }
- if (!file_exists("data/members/active/$maj_unread_active_member/comments/unread/$maj_req_entry")) {
- mkdir("data/members/active/$maj_unread_active_member/comments/unread/$maj_req_entry");
- }
- }
- }
- closedir($maj_dh_unread_active_members);
- }
- }
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_req_entry/categories")) {
- if ($maj_dh_entry_categories = opendir("data/items/$maj_req_entry/categories")) {
- while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
- if ($maj_entry_category != "." && $maj_entry_category != "..") {
- if (file_exists("data/categories/$maj_entry_category/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_entry_categories);
- }
- }
- 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")) {
- if (file_exists("data/ml-reply2.txt")) {
- $maj_ml_reply2 = file_get_contents("data/ml-reply2.txt");
- }
- if (file_exists("data/ml-from.txt")) {
- $maj_ml_from = $maj_ml_reply2;
- }
- else {
- $maj_ml_from = file_get_contents("$maj_live_dir/email.txt");
- }
- $maj_ml_from = str_replace(" at ","@",$maj_ml_from);
- $maj_ml_from_firstname = file_get_contents("$maj_live_dir/firstname.txt");
- $maj_ml_from_lastname = file_get_contents("$maj_live_dir/lastname.txt");
- $maj_ml_from = '"' . "$maj_ml_from_firstname $maj_ml_from_lastname" . '" <' . $maj_ml_from . '>';
- $maj_ml_subject = file_get_contents("data/items/$maj_req_entry/title.txt");
- if (file_exists("data/ml-prepend.txt")) {
- $maj_ml_prepend = file_get_contents("data/ml-prepend.txt");
- $maj_ml_subject = str_replace($maj_ml_prepend,"",$maj_ml_subject);
- $maj_ml_subject = $maj_ml_prepend . " " . $maj_ml_subject;
- }
- $maj_ml_subject = str_replace("Re:","",$maj_ml_subject);
- $maj_ml_subject = "Re: " . $maj_ml_subject;
- $maj_ml_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
- $maj_ml_body = file_get_contents("$maj_live_dir/comment.txt");
- $maj_ml_body = str_replace('<br />',"\n",$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/crying.png" border="0">',':((',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/frown.png" border="0">',':(',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/indifferent.png" border="0">',':|',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/laughing.png" border="0">',':D',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/lick.png" border="0">',':P',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/ohno.png" border="0">',':O',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/smile.png" border="0">',':)',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/surprised.png" border="0">','=)',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/undecided.png" border="0">',':\\',$maj_ml_body);
- $maj_ml_body = str_replace('<img src="images/smileys/wink.png" border="0">',';)',$maj_ml_body);
- $maj_ml_body = str_replace('&','&',$maj_ml_body);
- $maj_ml_body = str_replace('<','<',$maj_ml_body);
- $maj_ml_body = str_replace('>','>',$maj_ml_body);
- $maj_ml_body = str_replace('®','(R)',$maj_ml_body);
- if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt")) {
- $maj_badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $maj_censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $maj_censor = "[expletive]";
- }
- $maj_ml_body = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_ml_body);
- }
- if (file_exists("data/ml-header.txt")) {
- $maj_ml_header = file_get_contents("data/ml-header.txt");
- $maj_ml_body = $maj_ml_header . "\n\n" . $maj_ml_body;
- }
- $maj_ml_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $maj_ml_url = str_replace('//','/',$maj_ml_url);
- $maj_ml_url = "http://$maj_ml_url/index.php?entry=$maj_req_entry&show=comments";
- $maj_ml_body = $maj_ml_body . "\n\nPlease visit the following URL for the full thread:\n\n" . $maj_ml_url;
- if (file_exists("data/items/$maj_req_entry/member.txt")) {
- $maj_ml_body = $maj_ml_body . "\n\nYou need to login first to view the entry or to add a comment.";
- }
- if (file_exists("data/ml-footer.txt")) {
- $maj_ml_footer = file_get_contents("data/ml-footer.txt");
- $maj_ml_body = $maj_ml_body . "\n\n" . $maj_ml_footer;
- }
- if ($maj_dh_ml_member = opendir("data/members/active")) {
- while (($maj_ml_member = readdir($maj_dh_ml_member)) !== false) {
- if ($maj_ml_member != "." && $maj_ml_member != "..") {
- if (file_exists("data/members/active/$maj_ml_member/noml.txt")) {
- continue;
- }
- if (file_exists("data/members/active/$maj_ml_member/vacation.txt")) {
- continue;
- }
- $maj_ml_to_firstname = file_get_contents("data/members/active/$maj_ml_member/firstname.txt");
- $maj_ml_to_lastname = file_get_contents("data/members/active/$maj_ml_member/lastname.txt");
- $maj_ml_to = file_get_contents("data/members/active/$maj_ml_member/email.txt");
- $maj_ml_to = '"' . "$maj_ml_to_firstname $maj_ml_to_lastname" . '" <'. $maj_ml_to . '>';
- if (file_exists("data/ml-reply2.txt")) {
- mail($maj_ml_to,$maj_ml_subject,$maj_ml_body,
- "From: $maj_ml_from\r\n" .
- "Reply-To: $maj_ml_reply2\r\n" .
- "References: $maj_req_entry\r\n" .
- "X-Mailer: $maj_ml_mailer");
- }
- else {
- mail($maj_ml_to,$maj_ml_subject,$maj_ml_body,
- "From: $maj_ml_from\r\n" .
- "References: $maj_req_entry\r\n" .
- "X-Mailer: $maj_ml_mailer");
- }
- }
- }
- closedir($maj_dh_ml_member);
- }
- }
- }
- if ($_REQUEST['action'] == "delete") {
- rmdirr($maj_comment_dir);
- }
- $maj_pending_comment_flag_dir = $maj_req_entry;
- $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_pending_comment_flag_dir/count.txt","r");
- $maj_comment_count_value = fread($maj_fp_comment_count_txt,filesize("data/comments/pending/$maj_pending_comment_flag_dir/count.txt"));
- if ($maj_comment_count_value <= 1) {
- rmdirr("data/comments/pending/$maj_pending_comment_flag_dir");
- }
- else {
- $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_pending_comment_flag_dir/count.txt","r");
- $maj_comment_count_value = fread($maj_fp_comment_count_txt,filesize("data/comments/pending/$maj_pending_comment_flag_dir/count.txt"));
- $maj_comment_count_value = $maj_comment_count_value - 1;
- $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_pending_comment_flag_dir/count.txt","w");
- }
- header("Location: index.php?entry=$maj_req_entry&show=comments");
- }
- }
- if (isset($maj_req_entry) and !empty($maj_req_entry)) {
- if (file_exists("data/items/$maj_req_entry")) {
- $maj_title = file_get_contents("data/items/$maj_req_entry/title.txt");
- echo "<title>$maj_title</title>";
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- if (file_exists("data/items/$maj_req_entry/views.txt")) {
- $maj_count_views = file_get_contents("data/items/$maj_req_entry/views.txt");
- }
- else {
- $maj_count_views = "0";
- }
- $maj_count_views = $maj_count_views + 1;
- }
- 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']))) {
- if (!file_exists("data/items/$maj_req_entry/comments")) {
- mkdir("data/items/$maj_req_entry/comments");
- }
- if (!file_exists("data/items/$maj_req_entry/comments/pending")) {
- mkdir("data/items/$maj_req_entry/comments/pending");
- }
- if (!file_exists("data/items/$maj_req_entry/comments/live")) {
- mkdir("data/items/$maj_req_entry/comments/live");
- }
- mkdir("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir");
- $maj_body_content = ucfirst($_POST['new_comment']);
- $maj_body_content = htmlentities($maj_body_content,ENT_NOQUOTES);
- $maj_body_content = str_replace("\n",'<br />',$maj_body_content);
- $maj_body_content = trim($maj_body_content);
- $maj_body_content = str_replace(':((','<img src="images/smileys/crying.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(':(','<img src="images/smileys/frown.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(':|','<img src="images/smileys/indifferent.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(':D','<img src="images/smileys/laughing.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(':P','<img src="images/smileys/lick.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(':O','<img src="images/smileys/ohno.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(':)','<img src="images/smileys/smile.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace('=)','<img src="images/smileys/surprised.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(':\\','<img src="images/smileys/undecided.png" border="0">',$maj_body_content);
- $maj_body_content = str_replace(';)','<img src="images/smileys/wink.png" border="0">',$maj_body_content);
- $maj_fp_body_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/comment.txt","w");
- $maj_fp_timestamp_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/timestamp.txt","w");
- $maj_fp_firstname_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/firstname.txt","w");
- $maj_firstname = strtolower($_POST['firstname']);
- $maj_firstname = ucwords($maj_firstname);
- $maj_firstname = trim($maj_firstname);
- $maj_firstname = htmlentities($maj_firstname,ENT_NOQUOTES);
- $maj_fp_lastname_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/lastname.txt","w");
- $maj_lastname = strtolower($_POST['lastname']);
- $maj_lastname = ucwords($maj_lastname);
- $maj_lastname = trim($maj_lastname);
- $maj_lastname = htmlentities($maj_lastname,ENT_NOQUOTES);
- $maj_fp_email_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/email.txt","w");
- $maj_email = strtolower($_POST['email']);
- $maj_email = trim($maj_email);
- $maj_email = htmlentities($maj_email,ENT_NOQUOTES);
- if (isset($_POST['url']) and !empty($_POST['url']) and (ereg("\.",$_POST['url']))) {
- $maj_fp_url_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/url.txt","w");
- $maj_url = str_replace("http://","",$_POST['url']);
- $maj_url = strtolower($maj_url);
- $maj_url = trim($maj_url);
- $maj_url = "http://" . $maj_url;
- $maj_url = htmlentities($maj_url,ENT_NOQUOTES);
- }
- if (isset($_POST['cauthor']) and !empty($_POST['cauthor'])) {
- $maj_fp_cauthor_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/author.txt","w");
- }
- $maj_key_rand = str_rand(14);
- $maj_fp_key_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/key.txt","w");
- $maj_comment_quote = ucfirst($_POST['new_comment']);
- $maj_sig_author_file = "data/author.txt";
- $maj_sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $maj_sig_url = str_replace('//','/',$maj_sig_url);
- $maj_sig_url = "http://" . $maj_sig_url;
- $maj_email_to = strtolower($_POST['email']);
- $maj_email_to = '"' . "$maj_firstname $maj_lastname" . '" <' . $maj_email_to . '>';
- if (file_exists("data/email.txt")) {
- $maj_from_email_author = file_get_contents("data/author.txt");
- $maj_from_email = file_get_contents("data/email.txt");
- $maj_from_email = '"' . $maj_from_email_author . '" <' . $maj_from_email . '>';
- }
- $maj_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
- $maj_commented_entry_title_file = "data/items/$maj_req_entry/title.txt";
- $maj_commented_entry_title = fread($maj_fp_commented_entry_title,filesize($maj_commented_entry_title_file));
- if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
- $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";
- $maj_comment_thanks = wordwrap($maj_comment_thanks);
- mail($maj_email_to,"Thanks for sharing your thoughts!",$maj_comment_thanks,
- "From: $maj_from_email\r\n" .
- "Reply-To: $maj_from_email\r\n" .
- "X-Mailer: $maj_mailer");
- }
- if (file_exists("data/email.txt") and !file_exists("data/xscreen.txt")) {
- $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.";
- $maj_comment_notice = wordwrap($maj_comment_notice);
- mail($maj_from_email,"Pending Comment",$maj_comment_notice,
- "From: $maj_from_email\r\n" .
- "Reply-To: $maj_from_email\r\n" .
- "X-Mailer: $maj_mailer");
- }
- if (!file_exists("data/comments")) {
- mkdir("data/comments");
- }
- if (!file_exists("data/comments/pending")) {
- mkdir("data/comments/pending");
- }
- $maj_pending_comment_flag = $maj_req_entry;
- if (!file_exists("data/comments/pending/$maj_pending_comment_flag")) {
- mkdir("data/comments/pending/$maj_pending_comment_flag");
- }
- if (file_exists("data/comments/pending/$maj_pending_comment_flag/count.txt")) {
- $maj_comment_count_value = file_get_contents("data/comments/pending/$maj_pending_comment_flag/count.txt");
- }
- else {
- $maj_comment_count_value = "0";
- }
- $maj_comment_count_value = $maj_comment_count_value + 1;
- }
- }
- }
- else {
- echo "<title>$maj_default_title</title>";
- }
- if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
- if ($maj_dh_xscreen_comments = opendir("data/comments/pending")) {
- while (($maj_xscreen_comment = readdir($maj_dh_xscreen_comments)) !== false) {
- if ($maj_xscreen_comment != "." && $maj_xscreen_comment != "..") {
- $maj_xscreen_comments[] = $maj_xscreen_comment;
- }
- }
- closedir($maj_dh_xscreen_comments);
- }
- rsort($maj_xscreen_comments);
- reset($maj_xscreen_comments);
- if (count($maj_xscreen_comments) > 0) {
- foreach ($maj_xscreen_comments as $maj_xscreen_dir) {
- if ($maj_dh_xscreen_pending = opendir("data/items/$maj_xscreen_dir/comments/pending")) {
- while (($maj_xscreen_entry = readdir($maj_dh_xscreen_pending)) !== false) {
- if ($maj_xscreen_entry != "." && $maj_xscreen_entry != "..") {
- $maj_xscreen_key = file_get_contents("data/items/$maj_xscreen_dir/comments/pending/$maj_xscreen_entry/key.txt");
- header("Location: index.php?entry={$maj_xscreen_dir}&comment={$maj_xscreen_entry}&key={$maj_xscreen_key}&action=approve");
- }
- }
- }
- }
- }
- }
- if (isset($maj_req_entry) and !empty($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_req_entry/categories")) {
- if ($maj_dh_entry_categories = opendir("data/items/$maj_req_entry/categories")) {
- while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
- if ($maj_entry_category != "." && $maj_entry_category != "..") {
- if (file_exists("data/categories/$maj_entry_category/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_entry_categories);
- }
- }
- if ($maj_private_categories == "0") {
- if (!file_exists("data/items/$maj_req_entry/passwd.txt")) {
- if (!file_exists("data/items/$maj_req_entry/private.txt")) {
- $maj_description = file_get_contents("data/items/$maj_req_entry/body.txt");
- $maj_description = strip_tags($maj_description);
- $maj_description = html_entity_decode($maj_description);
- $maj_description = str_replace("&","&",$maj_description);
- $maj_description = str_replace("<","<",$maj_description);
- $maj_description = str_replace(">",">",$maj_description);
- $maj_description = str_replace("<br />"," ",$maj_description);
- $maj_description = str_replace("<br>"," ",$maj_description);
- $maj_description = str_replace("\r"," ",$maj_description);
- $maj_description = str_replace("\n"," ",$maj_description);
- $maj_description = str_replace(chr(10)," ",$maj_description);
- $maj_description = str_replace(chr(13)," ",$maj_description);
- $maj_description = trim($maj_description);
- $maj_description = substr($maj_description,0,210);
- $maj_description = htmlentities($maj_description,ENT_NOQUOTES);
- 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"))))) {
- $maj_badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $maj_censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $maj_censor = "[expletive]";
- }
- $maj_description = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_description);
- }
- echo "<meta name=\"description\" content=\"{$maj_description}\">";
- }
- }
- }
- }
- if (file_exists("data/fonts/body-size.txt")) {
- $maj_body_px = file_get_contents("data/fonts/body-size.txt") . "px";
- }
- else {
- $maj_body_px = "11px";
- }
- if (file_exists("data/fonts/input-size.txt")) {
- $maj_input_px = file_get_contents("data/fonts/input-size.txt") . "px";
- }
- else {
- $maj_input_px = "11px";
- }
- if (file_exists("data/fonts/panel-title-size.txt")) {
- $maj_font_12px = file_get_contents("data/fonts/panel-title-size.txt") . "px";
- }
- else {
- $maj_font_12px = "12px";
- }
- if (file_exists("data/fonts/panel-body-size.txt")) {
- $maj_font_11px = file_get_contents("data/fonts/panel-body-size.txt") . "px";
- }
- else {
- $maj_font_11px = "11px";
- }
- if (file_exists("data/fonts/panel-footer-size.txt")) {
- $maj_font_10px = file_get_contents("data/fonts/panel-footer-size.txt") . "px";
- }
- else {
- $maj_font_10px = "10px";
- }
- ?>
- <style>
- html {
- font-size: <?php echo $maj_font_11px; ?>;
- }
- body {
- margin: 0px 0px 10px 10px;
- padding: 0px;
- text-align: left;
- font-size: <?php echo $maj_body_px; ?>;
- color: <?php
- if (file_exists("data/colors/font.txt")) {
- $maj_font_color = file_get_contents("data/colors/font.txt");
- echo $maj_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $maj_font_body = file_get_contents("data/fonts/body.txt");
- echo "{$maj_font_body},";
- }
- ?> arial,helvetica,sans-serif;
- background-color: <?php
- if (file_exists("data/colors/bg.txt")) {
- $maj_background_color = file_get_contents("data/colors/bg.txt");
- if ($maj_background_color == "transparent") {
- echo "#ffffff";
- }
- else {
- echo $maj_background_color;
- }
- }
- else {
- echo "#ffffff";
- }
- ?>;
- <?php
- if (file_exists("images/background.gif") and !file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
- background-image: url('images/background.gif');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- if (!file_exists("images/background.gif") and file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
- background-image: url('images/background.jpg');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- if (!file_exists("images/background.gif") and !file_exists("images/background.jpg") and file_exists("images/background.png")) { ?>
- background-image: url('images/background.png');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- ?>
- }
- p,td {
- font-size: <?php echo $maj_font_11px; ?>;
- }
- a {
- font-weight: bold;
- text-decoration: none;
- }
- a:link {
- color: <?php
- if (file_exists("data/colors/link.txt")) {
- $maj_a_link_color = file_get_contents("data/colors/link.txt");
- echo $maj_a_link_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:visited {
- color: <?php
- if (file_exists("data/colors/vlink.txt")) {
- $maj_a_visited_color = file_get_contents("data/colors/vlink.txt");
- echo $maj_a_visited_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:hover {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- $maj_a_hover_color = file_get_contents("data/colors/hover.txt");
- echo $maj_a_hover_color;
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- a:active {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- $maj_a_active_color = file_get_contents("data/colors/hover.txt");
- echo $maj_a_active_color;
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
- font-weight: normal;
- text-decoration: none;
- }
- .panel_title {
- padding: 5px 5px 5px 5px;
- margin: 0px 0px 0px 0px;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
- font-weight: bold;
- font-size: <?php echo $maj_font_12px; ?>;
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $maj_font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$maj_font_panel_title},";
- }
- ?> arial,helvetica,sans-serif;
- color: <?php
- if (file_exists("data/colors/pt-font.txt")) {
- $maj_panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
- echo $maj_panel_title_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- $maj_panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
- echo $maj_panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_title_border_color;
- }
- else {
- echo "#cccccc";
- }
- ?>;
- }
- .panel_body {
- font-size: <?php echo $maj_font_11px; ?>;
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $maj_font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$maj_font_panel_body},";
- }
- ?> arial,helvetica,sans-serif;
- color: <?php
- if (file_exists("data/colors/pb-font.txt")) {
- $maj_panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
- echo $maj_panel_body_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'padding: 5px 5px 2px 5px;';
- }
- else {
- echo 'padding: 5px 5px 5px 5px;';
- }
- ?>
- background-color: <?php
- if (file_exists("data/colors/pb-bg.txt")) {
- $maj_panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
- echo $maj_panel_body_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'margin: 0px 0px 0px 0px;';
- }
- else {
- echo 'margin: 0px 0px 10px 0px;';
- }
- ?>
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_body_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_body_border_color;
- }
- else {
- echo "#cccccc";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'border-width: 1px 1px 0px 1px;';
- echo 'border-style: solid solid none solid;';
- }
- else {
- echo 'border-width: 1px 1px 1px 1px;';
- echo 'border-style: solid solid solid solid;';
- }
- ?>
- }
- .panel_footer {
- text-align: right;
- font-size: <?php echo $maj_font_10px; ?>;
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $maj_font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$maj_font_panel_footer},";
- }
- ?> arial,helvetica,sans-serif;
- color: <?php
- if (file_exists("data/colors/pf-font.txt")) {
- $maj_panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
- echo $maj_panel_footer_font_color;
- }
- else {
- echo "#999999";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'padding: 5px 5px 2px 5px;';
- }
- else {
- echo 'padding: 5px 5px 5px 5px;';
- }
- ?>
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- $maj_panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $maj_panel_footer_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'margin: 0px 0px 0px 0px;';
- }
- else {
- echo 'margin: 0px 0px 10px 0px;';
- }
- ?>
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_footer_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_footer_border_color;
- }
- else {
- echo "#cccccc";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'border-width: 1px 1px 0px 1px;';
- echo 'border-style: solid solid none solid;';
- }
- else {
- echo 'border-width: 0px 1px 1px 1px;';
- echo 'border-style: none solid solid solid;';
- }
- ?>
- }
- .input {
- width: 300px;
- background: #ffffff;
- font-size: <?php echo $maj_input_px; ?>;
- color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_input_color = file_get_contents("data/colors/border.txt");
- echo $maj_input_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- border: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_footer_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_footer_border_color;
- }
- else {
- echo "#999999";
- }
- ?> solid 1px;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $maj_font_input = file_get_contents("data/fonts/input.txt");
- echo "{$maj_font_input},";
- }
- ?> arial,helvetica,sans-serif;
- }
- .search {
- color: #666666;
- background: #ffffff;
- width: 100%;
- font-size: <?php echo $maj_font_11px; ?>;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $maj_font_input = file_get_contents("data/fonts/input.txt");
- echo "{$maj_font_input},";
- }
- ?> arial,helvetica,sans-serif;
- }
- .panel_free {
- padding: 0px 0px 0px 0px;
- margin: 0px 0px 10px 0px;
- }
- .rbtop {
- display: block;
- background: transparent;
- font-size: 1px;
- margin: 0px 0px 0px 0px;
- }
- .rbbottom {
- display: block;
- background: transparent;
- font-size: 1px;
- margin: 0px 0px 10px 0px;
- }
- .rb1t,.rb2t,.rb3t,.rb4t,.rb1b,.rb2b,.rb3b,.rb4b,.rb1e,.rb2e,.rb3e,.rb4e {
- display: block;
- overflow: hidden;
- }
- .rb1t,.rb2t,.rb3t,.rb1b,.rb2b,.rb3b,.rb1e,.rb2e,.rb3e {
- height: 1px;
- }
- .rb2t,.rb3t,.rb4t {
- border-left: 1px solid;
- border-right: 1px solid;
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- $maj_panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
- echo $maj_panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rb2b,.rb3b,.rb4b {
- border-left: 1px solid;
- border-right: 1px solid;
- background-color: <?php
- if (file_exists("data/colors/pb-bg.txt")) {
- $maj_panel_title_background_color = file_get_contents("data/colors/pb-bg.txt");
- echo $maj_panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rb2e,.rb3e,.rb4e {
- border-left: 1px solid;
- border-right: 1px solid;
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- $maj_panel_title_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $maj_panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rb1t,.rb1b,.rb1e {
- margin: 0 5px;
- background: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rb2t,.rb2b,.rb2e {
- margin: 0 3px;
- border-width: 0 2px;
- }
- .rb3t,.rb3b,.rb3e {
- margin: 0 2px;
- }
- .rb4t,.rb4b,.rb4e {
- height: 2px;
- margin: 0 1px;
- }
- .xtitle {
- display: block;
- border:0 solid;
- border-width:0 1px;
- padding: 1px 5px 5px 5px;
- font-weight: bold;
- font-size: <?php echo $maj_font_12px; ?>;
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $maj_font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$maj_font_panel_title},";
- }
- ?> arial,helvetica,sans-serif;
- color: <?php
- if (file_exists("data/colors/pt-font.txt")) {
- $maj_panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
- echo $maj_panel_title_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- $maj_panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
- echo $maj_panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rbspace {
- height: 3px;
- }
- .panel_entry_body {
- margin: 0px 0px 0px 0px;
- font-size: <?php echo $maj_font_11px; ?>;
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $maj_font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$maj_font_panel_body},";
- }
- ?> arial,helvetica,sans-serif;
- color: <?php
- if (file_exists("data/colors/pb-font.txt")) {
- $maj_panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
- echo $maj_panel_body_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'padding: 5px 5px 2px 5px;';
- }
- else {
- echo 'padding: 5px 5px 5px 5px;';
- }
- ?>
- background-color: <?php
- if (file_exists("data/colors/pb-bg.txt")) {
- $maj_panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
- echo $maj_panel_body_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_body_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_body_border_color;
- }
- else {
- echo "#cccccc";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'border-width: 1px 1px 0px 1px;';
- echo 'border-style: solid solid none solid;';
- }
- else {
- echo 'border-width: 1px 1px 1px 1px;';
- echo 'border-style: solid solid solid solid;';
- }
- ?>
- }
- .panel_category {
- padding: 5px 5px 5px 5px;
- margin: 0px 0px 0px 0px;
- text-align: left;
- font-size: <?php echo $maj_font_10px; ?>;
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $maj_font_panel_category = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$maj_font_panel_category},";
- }
- ?> arial,helvetica,sans-serif;
- color: <?php
- if (file_exists("data/colors/pf-font.txt")) {
- $maj_panel_category_font_color = file_get_contents("data/colors/pf-font.txt");
- echo $maj_panel_category_font_color;
- }
- else {
- echo "#999999";
- }
- ?>;
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- $maj_panel_category_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $maj_panel_category_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $maj_panel_category_border_color = file_get_contents("data/colors/border.txt");
- echo $maj_panel_category_border_color;
- }
- else {
- echo "#cccccc";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'border-width: 1px 1px 0px 1px;';
- echo 'border-style: solid solid none solid;';
- }
- else {
- echo 'border-width: 0px 1px 1px 1px;';
- echo 'border-style: none solid solid solid;';
- }
- ?>
- }
- <?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
- </style>
- <link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
- <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="rss.php?ver=1.0">
- <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss.php?ver=2.0">
- <?php
- if (file_exists("data/center.txt")) {
- echo "<center>";
- }
- if (file_exists("data/header.txt")) {
- $maj_header_panel = file_get_contents("data/header.txt");
- if (file_exists("data/panels/$maj_header_panel") and (!file_exists("data/panels/$maj_header_panel/private.txt") or isset($_SESSION['logged_in']))) {
- include("data/panels/$maj_header_panel/panel.php");
- }
- }
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wtable\">";
- 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>";
- echo "<tr><td width=\"$maj_wside\" valign=\"top\">";
- if (file_exists("data/round.txt")) {
- echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
- }
- else {
- echo "<div class=\"panel_title\">";
- }
- ?>
- Profile</div>
- <?php
- if (file_exists("images/profile.gif")) {
- $maj_profile_gif_image_size = getimagesize("images/profile.gif");
- $maj_profile_gif_image_width = $maj_profile_gif_image_size[0];
- $maj_profile_gif_image_height = $maj_profile_gif_image_size[1];
- $maj_max_profile_gif_image_width = 163;
- if ($maj_profile_gif_image_width > $maj_max_profile_gif_image_width) {
- $maj_sizefactor = (double) ($maj_max_profile_gif_image_width / $maj_profile_gif_image_width) ;
- $maj_profile_gif_image_width = (int) ($maj_profile_gif_image_width * $maj_sizefactor);
- $maj_profile_gif_image_height = (int) ($maj_profile_gif_image_height * $maj_sizefactor);
- }
- echo "<img src=\"images/profile.gif\" border=\"0\" width=\"$maj_profile_gif_image_width\" height=\"$maj_profile_gif_image_height\" align=\"left\">";
- }
- if (file_exists("images/profile.jpg")) {
- $maj_profile_jpg_image_size = getimagesize("images/profile.jpg");
- $maj_profile_jpg_image_width = $maj_profile_jpg_image_size[0];
- $maj_profile_jpg_image_height = $maj_profile_jpg_image_size[1];
- $maj_max_profile_jpg_image_width = 163;
- if ($maj_profile_jpg_image_width > $maj_max_profile_jpg_image_width) {
- $maj_sizefactor = (double) ($maj_max_profile_jpg_image_width / $maj_profile_jpg_image_width) ;
- $maj_profile_jpg_image_width = (int) ($maj_profile_jpg_image_width * $maj_sizefactor);
- $maj_profile_jpg_image_height = (int) ($maj_profile_jpg_image_height * $maj_sizefactor);
- }
- echo "<img src=\"images/profile.jpg\" border=\"0\" width=\"$maj_profile_jpg_image_width\" height=\"$maj_profile_jpg_image_height\" align=\"left\">";
- }
- if (file_exists("images/profile.png")) {
- $maj_profile_png_image_size = getimagesize("images/profile.png");
- $maj_profile_png_image_width = $maj_profile_png_image_size[0];
- $maj_profile_png_image_height = $maj_profile_png_image_size[1];
- $maj_max_profile_png_image_width = 163;
- if ($maj_profile_png_image_width > $maj_max_profile_png_image_width) {
- $maj_sizefactor = (double) ($maj_max_profile_png_image_width / $maj_profile_png_image_width) ;
- $maj_profile_png_image_width = (int) ($maj_profile_png_image_width * $maj_sizefactor);
- $maj_profile_png_image_height = (int) ($maj_profile_png_image_height * $maj_sizefactor);
- }
- echo "<img src=\"images/profile.png\" border=\"0\" width=\"$maj_profile_png_image_width\" height=\"$maj_profile_png_image_height\" align=\"left\">";
- }
- include("data/profile.php");
- ?>
- </div>
- <?php
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- ?>
- Navigation</div>
- <a class="navlink" href="index.php">Home</a><br>
- <?php
- if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
- echo '<a class="navlink" href="member.php?id=all">Members</a><br>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo '<a class="navlink" href="add.php">Add Entry</a><br>';
- echo '<a class="navlink" href="settings.php">Settings</a><br>';
- echo '<a class="navlink" href="panels.php">Panels</a><br>';
- echo '<a class="navlink" href="cat.php">Categories</a><br>';
- echo '<a class="navlink" href="colors.php">Colors</a><br>';
- echo '<a class="navlink" href="fonts.php">Fonts</a><br>';
- echo '<a class="navlink" href="login.php">Logout</a>';
- }
- 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")) {
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$maj_req_category")) {
- if (!file_exists("data/categories/$maj_req_category")) {
- rmdirr("data/members/active/{$_SESSION['logged_in']}/categories/$maj_req_category");
- }
- }
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") or file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$maj_req_category")) {
- echo '<a class="navlink" href="add.php">Add Entry</a><br>';
- }
- echo '<a class="navlink" href="options.php">Options</a><br>';
- echo '<a class="navlink" href="login.php">Logout</a>';
- }
- else {
- if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
- echo '<a class="navlink" href="reg.php">Register</a><br>';
- }
- echo '<a class="navlink" href="login.php">Login</a>';
- }
- ?>
- </div>
- <?php
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- if (file_exists("data/sticky")) {
- if ($maj_dh_sticky = opendir("data/sticky")) {
- while (($maj_sticky_entry = readdir($maj_dh_sticky)) !== false) {
- if (file_exists("data/items/$maj_sticky_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- if (file_exists("data/items/$maj_sticky_entry/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_sticky_entry/categories")) {
- if ($maj_dh_sticky_categories = opendir("data/items/$maj_sticky_entry/categories")) {
- while (($maj_sticky_category = readdir($maj_dh_sticky_categories)) !== false) {
- if ($maj_sticky_category != "." && $maj_sticky_category != "..") {
- if (file_exists("data/categories/$maj_sticky_category/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_sticky_categories);
- }
- }
- 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")) {
- continue;
- }
- if ($maj_sticky_entry != "." && $maj_sticky_entry != "..") {
- $maj_sticky_entries[] = $maj_sticky_entry;
- }
- }
- closedir($maj_dh_sticky);
- }
- sort($maj_sticky_entries);
- reset($maj_sticky_entries);
- $maj_count_sticky_list = count($maj_sticky_entries);
- if ($maj_count_sticky_list > 0) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'Quick Links</div>';
- echo '<div class="panel_body">';
- foreach ($maj_sticky_entries as $maj_sticky_list_entry) {
- echo "<a class=\"navlink\" href=\"index.php?entry=$maj_sticky_list_entry\">";
- readfile("data/items/$maj_sticky_list_entry/title.txt");
- echo "</a><br>";
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- if (file_exists("data/panels")) {
- if ($maj_dh_panels = opendir("data/panels")) {
- while (($maj_panel = readdir($maj_dh_panels)) !== false) {
- if ($maj_panel != "." && $maj_panel != "..") {
- if (file_exists("data/panels/$maj_panel/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- if (file_exists("data/panels/$maj_panel/top.txt")) {
- $maj_top_panels[] = $maj_panel;
- continue;
- }
- if (file_exists("data/panels/$maj_panel/center.txt")) {
- $maj_center_panels[] = $maj_panel;
- continue;
- }
- if (file_exists("data/panels/$maj_panel/entry.txt")) {
- $maj_entry_panels[] = $maj_panel;
- continue;
- }
- if (file_exists("data/panels/$maj_panel/right.txt")) {
- $maj_right_panels[] = $maj_panel;
- continue;
- }
- if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $maj_panel)) {
- continue;
- }
- if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $maj_panel)) {
- continue;
- }
- $maj_left_panels[] = $maj_panel;
- }
- }
- closedir($maj_dh_panels);
- }
- sort($maj_left_panels);
- reset($maj_left_panels);
- $maj_count_left_panels = count($maj_left_panels);
- sort($maj_top_panels);
- reset($maj_top_panels);
- $maj_count_top_panels = count($maj_top_panels);
- sort($maj_center_panels);
- reset($maj_center_panels);
- $maj_count_center_panels = count($maj_center_panels);
- sort($maj_entry_panels);
- reset($maj_entry_panels);
- $maj_count_entry_panels = count($maj_entry_panels);
- sort($maj_right_panels);
- reset($maj_right_panels);
- $maj_count_right_panels = count($maj_right_panels);
- if ($maj_count_left_panels > 0) {
- foreach ($maj_left_panels as $maj_left_panel) {
- if (!file_exists("data/panels/$maj_left_panel/free.txt")) {
- if (file_exists("data/panels/$maj_left_panel/border.txt")) {
- $maj_left_panel_border = file_get_contents("data/panels/$maj_left_panel/border.txt");
- }
- else {
- if (isset($maj_left_panel_border)) {
- unset($maj_left_panel_border);
- }
- }
- if (file_exists("data/panels/$maj_left_panel/bgcolor-t.txt")) {
- $maj_left_panel_bgcolor_t = file_get_contents("data/panels/$maj_left_panel/bgcolor-t.txt");
- }
- else {
- if (isset($maj_left_panel_bgcolor_t)) {
- unset($maj_left_panel_bgcolor_t);
- }
- }
- if (file_exists("data/panels/$maj_left_panel/bgcolor-c.txt")) {
- $maj_left_panel_bgcolor_c = file_get_contents("data/panels/$maj_left_panel/bgcolor-c.txt");
- }
- else {
- if (isset($maj_left_panel_bgcolor_c)) {
- unset($maj_left_panel_bgcolor_c);
- }
- }
- if (file_exists("data/panels/$maj_left_panel/text-t.txt")) {
- $maj_left_panel_text_t = file_get_contents("data/panels/$maj_left_panel/text-t.txt");
- }
- else {
- if (isset($maj_left_panel_text_t)) {
- unset($maj_left_panel_text_t);
- }
- }
- if (file_exists("data/panels/$maj_left_panel/text-c.txt")) {
- $maj_left_panel_text_c = file_get_contents("data/panels/$maj_left_panel/text-c.txt");
- }
- else {
- if (isset($maj_left_panel_text_c)) {
- unset($maj_left_panel_text_c);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($maj_left_panel_border)) {
- echo " style=\"background-color: $maj_left_panel_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_t)) {
- echo "background-color: $maj_left_panel_bgcolor_t;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_t)) {
- echo "background-color: $maj_left_panel_bgcolor_t;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_t)) {
- echo "background-color: $maj_left_panel_bgcolor_t;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t) or isset($maj_left_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_t)) {
- echo "background-color: $maj_left_panel_bgcolor_t;";
- }
- if (isset($maj_left_panel_text_t)) {
- echo "color: $maj_left_panel_text_t;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t) or isset($maj_left_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div class="panel_title"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t) or isset($maj_left_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_t)) {
- echo "background-color: $maj_left_panel_bgcolor_t;";
- }
- if (isset($maj_left_panel_text_t)) {
- echo "color: $maj_left_panel_text_t;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_t) or isset($maj_left_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/panels/$maj_left_panel/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo "<a href=\"panels.php#{$maj_left_panel}\">";
- echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
- }
- if (file_exists("data/panels/$maj_left_panel/private.txt")) {
- echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
- }
- echo '</div>';
- echo '<div class="panel_body"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c) or isset($maj_left_panel_text_c)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_c)) {
- echo "background-color: $maj_left_panel_bgcolor_c;";
- }
- if (isset($maj_left_panel_text_c)) {
- echo "color: $maj_left_panel_text_c;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c) or isset($maj_left_panel_text_c)) {
- echo '"';
- }
- echo '>';
- }
- if (file_exists("data/panels/$maj_left_panel/free.txt")) {
- echo '<div class=panel_free>';
- }
- include("data/panels/$maj_left_panel/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$maj_left_panel/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_c)) {
- echo "background-color: $maj_left_panel_bgcolor_c;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb3b"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_c)) {
- echo "background-color: $maj_left_panel_bgcolor_c;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb2b"';
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_left_panel_bgcolor_c)) {
- echo "background-color: $maj_left_panel_bgcolor_c;";
- }
- if (isset($maj_left_panel_border)) {
- echo "border-color: $maj_left_panel_border;";
- }
- if (isset($maj_left_panel_border) or isset($maj_left_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb1b"';
- if (isset($maj_left_panel_border)) {
- echo " style=\"background-color: $maj_left_panel_border;\"";
- }
- echo '></b></b>';
- }
- }
- }
- }
- echo "</td><td width=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td>";
- // main
- echo "<td valign=\"top\" width=\"$maj_wmain\">";
- if ($maj_count_top_panels > 0) {
- foreach ($maj_top_panels as $maj_top_panel) {
- if (!file_exists("data/panels/$maj_top_panel/free.txt")) {
- if (file_exists("data/panels/$maj_top_panel/border.txt")) {
- $maj_top_panel_border = file_get_contents("data/panels/$maj_top_panel/border.txt");
- }
- else {
- if (isset($maj_top_panel_border)) {
- unset($maj_top_panel_border);
- }
- }
- if (file_exists("data/panels/$maj_top_panel/bgcolor-t.txt")) {
- $maj_top_panel_bgcolor_t = file_get_contents("data/panels/$maj_top_panel/bgcolor-t.txt");
- }
- else {
- if (isset($maj_top_panel_bgcolor_t)) {
- unset($maj_top_panel_bgcolor_t);
- }
- }
- if (file_exists("data/panels/$maj_top_panel/bgcolor-c.txt")) {
- $maj_top_panel_bgcolor_c = file_get_contents("data/panels/$maj_top_panel/bgcolor-c.txt");
- }
- else {
- if (isset($maj_top_panel_bgcolor_c)) {
- unset($maj_top_panel_bgcolor_c);
- }
- }
- if (file_exists("data/panels/$maj_top_panel/text-t.txt")) {
- $maj_top_panel_text_t = file_get_contents("data/panels/$maj_top_panel/text-t.txt");
- }
- else {
- if (isset($maj_top_panel_text_t)) {
- unset($maj_top_panel_text_t);
- }
- }
- if (file_exists("data/panels/$maj_top_panel/text-c.txt")) {
- $maj_top_panel_text_c = file_get_contents("data/panels/$maj_top_panel/text-c.txt");
- }
- else {
- if (isset($maj_top_panel_text_c)) {
- unset($maj_top_panel_text_c);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($maj_top_panel_border)) {
- echo " style=\"background-color: $maj_top_panel_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_t)) {
- echo "background-color: $maj_top_panel_bgcolor_t;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_t)) {
- echo "background-color: $maj_top_panel_bgcolor_t;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_t)) {
- echo "background-color: $maj_top_panel_bgcolor_t;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t) or isset($maj_top_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_t)) {
- echo "background-color: $maj_top_panel_bgcolor_t;";
- }
- if (isset($maj_top_panel_text_t)) {
- echo "color: $maj_top_panel_text_t;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t) or isset($maj_top_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div class="panel_title"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t) or isset($maj_top_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_t)) {
- echo "background-color: $maj_top_panel_bgcolor_t;";
- }
- if (isset($maj_top_panel_text_t)) {
- echo "color: $maj_top_panel_text_t;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_t) or isset($maj_top_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/panels/$maj_top_panel/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo "<a href=\"panels.php#{$maj_top_panel}\">";
- echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
- }
- if (file_exists("data/panels/$maj_top_panel/private.txt")) {
- echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
- }
- echo '</div>';
- echo '<div class="panel_body"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c) or isset($maj_top_panel_text_c)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_c)) {
- echo "background-color: $maj_top_panel_bgcolor_c;";
- }
- if (isset($maj_top_panel_text_c)) {
- echo "color: $maj_top_panel_text_c;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c) or isset($maj_top_panel_text_c)) {
- echo '"';
- }
- echo '>';
- }
- if (file_exists("data/panels/$maj_top_panel/free.txt")) {
- echo '<div class=panel_free>';
- }
- include("data/panels/$maj_top_panel/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$maj_top_panel/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_c)) {
- echo "background-color: $maj_top_panel_bgcolor_c;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb3b"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_c)) {
- echo "background-color: $maj_top_panel_bgcolor_c;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb2b"';
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_top_panel_bgcolor_c)) {
- echo "background-color: $maj_top_panel_bgcolor_c;";
- }
- if (isset($maj_top_panel_border)) {
- echo "border-color: $maj_top_panel_border;";
- }
- if (isset($maj_top_panel_border) or isset($maj_top_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb1b"';
- if (isset($maj_top_panel_border)) {
- echo " style=\"background-color: $maj_top_panel_border;\"";
- }
- echo '></b></b>';
- }
- }
- }
- // clean-up (start)
- if (file_exists("data/albums")) {
- rmdirr("data/albums");
- }
- // clean-up (end)
- // global entry items (start)
- if ($maj_dh_items = opendir("data/items")) {
- while (($maj_item = readdir($maj_dh_items)) !== false) {
- if ($maj_item != "." && $maj_item != "..") {
- if (file_exists("data/items/$maj_item/comments/live") and (count(glob("data/items/$maj_item/comments/live/*")) < 1)) {
- rmdirr("data/items/$maj_item/comments/live");
- }
- if (file_exists("data/items/$maj_item/comments/pending") and (count(glob("data/items/$maj_item/comments/pending/*")) < 1)) {
- rmdirr("data/items/$maj_item/comments/pending");
- }
- if (file_exists("data/items/$maj_item/comments") and (count(glob("data/items/$maj_item/comments/*")) < 1)) {
- rmdirr("data/items/$maj_item/comments");
- }
- if (file_exists("data/items/$maj_item/filedrop/files") and (count(glob("data/items/$maj_item/filedrop/files/*")) < 1)) {
- rmdirr("data/items/$maj_item/filedrop/files");
- }
- if (file_exists("data/items/$maj_item/filedrop/count") and (count(glob("data/items/$maj_item/filedrop/count/*")) < 1)) {
- rmdirr("data/items/$maj_item/filedrop/count");
- }
- if (file_exists("data/items/$maj_item/filedrop") and (count(glob("data/items/$maj_item/filedrop/*")) < 1)) {
- rmdirr("data/items/$maj_item/filedrop");
- }
- 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)) {
- rmdirr("data/items/$maj_item/album/captions");
- }
- 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)) {
- rmdirr("data/items/$maj_item/album/count");
- }
- 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)) {
- rmdirr("data/items/$maj_item/album");
- }
- if (file_exists("images/$maj_item/album") and (count(glob("images/$maj_item/album/*")) < 1)) {
- rmdirr("images/$maj_item/album");
- }
- if (file_exists("images/$maj_item") and (count(glob("images/$maj_item/*")) < 1)) {
- rmdirr("images/$maj_item");
- }
- if (file_exists("images/$maj_item/categories") and (count(glob("images/$maj_item/categories/*")) < 1)) {
- rmdirr("images/$maj_item/categories");
- }
- $maj_grand[] = $maj_item;
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- 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)) {
- if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
- $maj_items[] = $maj_req_entry;
- }
- if (isset($maj_req_category) and file_exists("data/categories/$maj_req_category") and file_exists("data/items/$maj_item/categories/$maj_req_category")) {
- $maj_items[] = $maj_item;
- }
- if (isset($maj_req_archive) and fnmatch("$maj_req_archive*",$maj_item)) {
- $maj_items[] = $maj_item;
- }
- 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)) {
- $maj_items[] = $maj_item;
- }
- if (isset($maj_req_find)) {
- 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")) {
- $maj_items[] = $maj_item;
- }
- 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")) {
- $maj_items[] = $maj_item;
- }
- if (($maj_req_find == "unfiled") and !file_exists("data/items/$maj_item/categories")) {
- $maj_items[] = $maj_item;
- }
- }
- }
- else {
- $maj_items[] = $maj_item;
- }
- $maj_latest[] = $maj_item;
- if (file_exists("data/items/$maj_item/album")) {
- $maj_albums[] = $maj_item;
- }
- $maj_random[] = $maj_item;
- $maj_archives[] = substr($maj_item,0,6);
- }
- else {
- // non-admin stuff (start)
- if ($maj_item > $maj_today) {
- continue;
- }
- if (file_exists("data/items/$maj_item/private.txt")) {
- continue;
- }
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_item/categories")) {
- if ($maj_dh_entry_categories = opendir("data/items/$maj_item/categories")) {
- while (($maj_item_category = readdir($maj_dh_entry_categories)) !== false) {
- if ($maj_item_category != "." && $maj_item_category != "..") {
- if (file_exists("data/categories/$maj_item_category/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_entry_categories);
- }
- }
- if (($maj_private_categories > 0) and !file_exists("data/items/$maj_item/cat.txt")) {
- continue;
- }
- $maj_latest[] = $maj_item;
- if (file_exists("data/items/$maj_item/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- if (file_exists("data/items/$maj_item/album")) {
- $maj_albums[] = $maj_item;
- }
- $maj_random[] = $maj_item;
- $maj_archives[] = substr($maj_item,0,6);
- 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))) {
- continue;
- }
- 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)) {
- if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
- $maj_items[] = $maj_req_entry;
- }
- if (isset($maj_req_category) and file_exists("data/categories/$maj_req_category") and file_exists("data/items/$maj_item/categories/$maj_req_category")) {
- $maj_items[] = $maj_item;
- }
- if (isset($maj_req_archive) and fnmatch("$maj_req_archive*",$maj_item)) {
- $maj_items[] = $maj_item;
- }
- 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)) {
- $maj_items[] = $maj_item;
- }
- }
- else {
- $maj_items[] = $maj_item;
- }
- // non-admin stuff (end)
- }
- }
- }
- closedir($maj_dh_items);
- }
- sort($maj_grand);
- reset($maj_grand);
- $maj_count_grand = count($maj_grand);
- if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
- if (file_exists("data/items/$maj_req_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- unset($maj_items);
- }
- if (file_exists("data/items/$maj_req_entry/member.txt") and !isset($_SESSION['logged_in'])) {
- unset($maj_items);
- }
- }
- $maj_items = array_unique($maj_items);
- $maj_items = array_values($maj_items);
- if (file_exists("data/old.txt")) {
- sort($maj_items);
- }
- else {
- rsort($maj_items);
- }
- reset($maj_items);
- $maj_count_items = count($maj_items);
- rsort($maj_latest);
- reset($maj_latest);
- $maj_count_latest = count($maj_latest);
- rsort($maj_albums);
- reset($maj_albums);
- $maj_count_albums = count($maj_albums);
- rsort($maj_random);
- reset($maj_random);
- $maj_count_random = count($maj_random);
- rsort($maj_archives);
- reset($maj_archives);
- $maj_count_archives = count($maj_archives);
- 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)) {
- if ($maj_count_latest > 0) {
- if (file_exists("data/round.txt")) {
- echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
- }
- else {
- echo "<div class=\"panel_title\">";
- }
- echo "Latest Entries</div><div class=\"panel_body\">";
- echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\">";
- 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>";
- $maj_increment_latest = 0;
- while ($maj_increment_latest <= 4) {
- echo "<tr><td bgcolor=\"#ffffff\"><a href=\"index.php?entry=$maj_latest[$maj_increment_latest]";
- if ($maj_dh_summary_comments = opendir("data/items/$maj_latest[$maj_increment_latest]/comments/live")) {
- while (($maj_entry_summary_comments = readdir($maj_dh_summary_comments)) !== false) {
- if ($maj_entry_summary_comments != "." && $maj_entry_summary_comments != "..") {
- $maj_items_summary_comments[] = $maj_entry_summary_comments;
- }
- }
- closedir($maj_dh_summary_comments);
- }
- rsort($maj_items_summary_comments);
- $maj_summary_comments = count($maj_items_summary_comments);
- if ($maj_summary_comments > 0) {
- echo "&show=comments";
- }
- echo "\">";
- readfile("data/items/$maj_latest[$maj_increment_latest]/title.txt");
- echo "</a></td>";
- echo "<td bgcolor=\"#ffffff\"><a href=\"member.php?id=";
- readfile("data/items/$maj_latest[$maj_increment_latest]/author.txt");
- echo "\">";
- readfile("data/items/$maj_latest[$maj_increment_latest]/author.txt");
- echo "</a></td>";
- echo "<td bgcolor=\"#ffffff\" align=\"right\">";
- if (!file_exists("data/items/$maj_latest[$maj_increment_latest]/views.txt")) {
- echo 0;
- }
- else {
- readfile("data/items/$maj_latest[$maj_increment_latest]/views.txt");
- }
- echo "</td>";
- if ($maj_summary_comments < 1) {
- $maj_iso_year = substr($maj_latest[$maj_increment_latest],0,4);
- $maj_iso_month = substr($maj_latest[$maj_increment_latest],4,2);
- $maj_iso_day = substr($maj_latest[$maj_increment_latest],6,2);
- $maj_iso_last = $maj_iso_year . "-" . $maj_iso_month . "-" . $maj_iso_day;
- echo "<td bgcolor=\"#ffffff\" align=\"right\">0</td>";
- echo "<td bgcolor=\"#ffffff\" align=\"right\">$maj_iso_last</td>";
- }
- else {
- $maj_iso_year = substr($maj_items_summary_comments[0],0,4);
- $maj_iso_month = substr($maj_items_summary_comments[0],4,2);
- $maj_iso_day = substr($maj_items_summary_comments[0],6,2);
- $maj_iso_last = $maj_iso_year . "-" . $maj_iso_month . "-" . $maj_iso_day;
- echo "<td bgcolor=\"#ffffff\" align=\"right\">$maj_summary_comments</td>";
- echo "<td bgcolor=\"#ffffff\" align=\"right\">$maj_iso_last</td>";
- }
- unset($maj_items_summary_comments);
- $maj_increment_latest = $maj_increment_latest + 1;
- }
- }
- if ($maj_count_latest > 0) {
- echo "</table></div>";
- if (file_exists("data/round.txt")) {
- echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
- }
- }
- }
- if ($maj_count_center_panels > 0) {
- foreach ($maj_center_panels as $maj_center_panel) {
- if (!file_exists("data/panels/$maj_center_panel/free.txt")) {
- if (file_exists("data/panels/$maj_center_panel/border.txt")) {
- $maj_center_panel_border = file_get_contents("data/panels/$maj_center_panel/border.txt");
- }
- else {
- if (isset($maj_center_panel_border)) {
- unset($maj_center_panel_border);
- }
- }
- if (file_exists("data/panels/$maj_center_panel/bgcolor-t.txt")) {
- $maj_center_panel_bgcolor_t = file_get_contents("data/panels/$maj_center_panel/bgcolor-t.txt");
- }
- else {
- if (isset($maj_center_panel_bgcolor_t)) {
- unset($maj_center_panel_bgcolor_t);
- }
- }
- if (file_exists("data/panels/$maj_center_panel/bgcolor-c.txt")) {
- $maj_center_panel_bgcolor_c = file_get_contents("data/panels/$maj_center_panel/bgcolor-c.txt");
- }
- else {
- if (isset($maj_center_panel_bgcolor_c)) {
- unset($maj_center_panel_bgcolor_c);
- }
- }
- if (file_exists("data/panels/$maj_center_panel/text-t.txt")) {
- $maj_center_panel_text_t = file_get_contents("data/panels/$maj_center_panel/text-t.txt");
- }
- else {
- if (isset($maj_center_panel_text_t)) {
- unset($maj_center_panel_text_t);
- }
- }
- if (file_exists("data/panels/$maj_center_panel/text-c.txt")) {
- $maj_center_panel_text_c = file_get_contents("data/panels/$maj_center_panel/text-c.txt");
- }
- else {
- if (isset($maj_center_panel_text_c)) {
- unset($maj_center_panel_text_c);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($maj_center_panel_border)) {
- echo " style=\"background-color: $maj_center_panel_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_t)) {
- echo "background-color: $maj_center_panel_bgcolor_t;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_t)) {
- echo "background-color: $maj_center_panel_bgcolor_t;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_t)) {
- echo "background-color: $maj_center_panel_bgcolor_t;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t) or isset($maj_center_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_t)) {
- echo "background-color: $maj_center_panel_bgcolor_t;";
- }
- if (isset($maj_center_panel_text_t)) {
- echo "color: $maj_center_panel_text_t;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t) or isset($maj_center_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div class="panel_title"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t) or isset($maj_center_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_t)) {
- echo "background-color: $maj_center_panel_bgcolor_t;";
- }
- if (isset($maj_center_panel_text_t)) {
- echo "color: $maj_center_panel_text_t;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_t) or isset($maj_center_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/panels/$maj_center_panel/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo "<a href=\"panels.php#{$maj_center_panel}\">";
- echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
- }
- if (file_exists("data/panels/$maj_center_panel/private.txt")) {
- echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
- }
- echo '</div>';
- echo '<div class="panel_body"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c) or isset($maj_center_panel_text_c)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_c)) {
- echo "background-color: $maj_center_panel_bgcolor_c;";
- }
- if (isset($maj_center_panel_text_c)) {
- echo "color: $maj_center_panel_text_c;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c) or isset($maj_center_panel_text_c)) {
- echo '"';
- }
- echo '>';
- }
- if (file_exists("data/panels/$maj_center_panel/free.txt")) {
- echo '<div class=panel_free>';
- }
- include("data/panels/$maj_center_panel/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$maj_center_panel/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_c)) {
- echo "background-color: $maj_center_panel_bgcolor_c;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb3b"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_c)) {
- echo "background-color: $maj_center_panel_bgcolor_c;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb2b"';
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_center_panel_bgcolor_c)) {
- echo "background-color: $maj_center_panel_bgcolor_c;";
- }
- if (isset($maj_center_panel_border)) {
- echo "border-color: $maj_center_panel_border;";
- }
- if (isset($maj_center_panel_border) or isset($maj_center_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb1b"';
- if (isset($maj_center_panel_border)) {
- echo " style=\"background-color: $maj_center_panel_border;\"";
- }
- echo '></b></b>';
- }
- }
- }
- if (isset($maj_req_category) and !empty($maj_req_category)) {
- if (file_exists("data/categories/$maj_req_category/book.txt")) {
- sort($maj_items);
- reset($maj_items);
- }
- }
- if ($maj_count_items == 0) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo "Oops!</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
- echo "<td valign=middle><img src=images/oops.png width=36 height=36 border=0></td><td valign=middle>";
- if (($maj_count_grand == 0) and (count($_GET) == 0)) {
- echo "No entries found. Perhaps this is a fresh install.";
- }
- else {
- if (count($_GET) > 0) {
- echo "The entry you are looking for does not exist or is off limits to you.";
- }
- else {
- echo "Login required. Entries are off limits without proper credentials.";
- }
- }
- echo '</td></tr></table></div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- echo "</td></tr></table>";
- }
- $maj_start = $_REQUEST['start'];
- if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
- $maj_start = 0;
- }
- $maj_end = $maj_start + $maj_increase;
- $maj_disp = array_slice($maj_items,$maj_start,$maj_increase);
- foreach ($maj_disp as $maj_d) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">";
- if (file_exists("data/items/$maj_d/border.txt")) {
- $maj_d_border = file_get_contents("data/items/$maj_d/border.txt");
- }
- else {
- if (isset($maj_d_border)) {
- unset($maj_d_border);
- }
- }
- if (file_exists("data/items/$maj_d/bgcolor-t.txt")) {
- $maj_d_bgcolor_t = file_get_contents("data/items/$maj_d/bgcolor-t.txt");
- }
- else {
- if (isset($maj_d_bgcolor_t)) {
- unset($maj_d_bgcolor_t);
- }
- }
- if (file_exists("data/items/$maj_d/bgcolor-b.txt")) {
- $maj_d_bgcolor_b = file_get_contents("data/items/$maj_d/bgcolor-b.txt");
- }
- else {
- if (isset($maj_d_bgcolor_b)) {
- unset($maj_d_bgcolor_b);
- }
- }
- if (file_exists("data/items/$maj_d/bgcolor-c.txt")) {
- $maj_d_bgcolor_c = file_get_contents("data/items/$maj_d/bgcolor-c.txt");
- }
- else {
- if (isset($maj_d_bgcolor_c)) {
- unset($maj_d_bgcolor_c);
- }
- }
- if (file_exists("data/items/$maj_d/bgcolor-f.txt")) {
- $maj_d_bgcolor_f = file_get_contents("data/items/$maj_d/bgcolor-f.txt");
- }
- else {
- if (isset($maj_d_bgcolor_f)) {
- unset($maj_d_bgcolor_f);
- }
- }
- if (file_exists("data/items/$maj_d/text-t.txt")) {
- $maj_d_text_t = file_get_contents("data/items/$maj_d/text-t.txt");
- }
- else {
- if (isset($maj_d_text_t)) {
- unset($maj_d_text_t);
- }
- }
- if (file_exists("data/items/$maj_d/text-b.txt")) {
- $maj_d_text_b = file_get_contents("data/items/$maj_d/text-b.txt");
- }
- else {
- if (isset($maj_d_text_b)) {
- unset($maj_d_text_b);
- }
- }
- if (file_exists("data/items/$maj_d/text-c.txt")) {
- $maj_d_text_c = file_get_contents("data/items/$maj_d/text-c.txt");
- }
- else {
- if (isset($maj_d_text_c)) {
- unset($maj_d_text_c);
- }
- }
- if (file_exists("data/items/$maj_d/text-f.txt")) {
- $maj_d_text_f = file_get_contents("data/items/$maj_d/text-f.txt");
- }
- else {
- if (isset($maj_d_text_f)) {
- unset($maj_d_text_f);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($maj_d_border)) {
- echo " style=\"background-color: $maj_d_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_t)) {
- echo "background-color: $maj_d_bgcolor_t;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_t)) {
- echo "background-color: $maj_d_bgcolor_t;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_t)) {
- echo "background-color: $maj_d_bgcolor_t;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_t)) {
- echo "background-color: $maj_d_bgcolor_t;";
- }
- if (isset($maj_d_text_t)) {
- echo "color: $maj_d_text_t;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div class="panel_title"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_t)) {
- echo "background-color: $maj_d_bgcolor_t;";
- }
- if (isset($maj_d_text_t)) {
- echo "color: $maj_d_text_t;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/items/$maj_d/title.txt");
- 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")) {
- if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
- echo "<a href=\"wiki.php?entry=$maj_d\">";
- echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
- echo "</a>";
- }
- if (!file_exists("data/items/$maj_d/lock.txt")) {
- 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>";
- }
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- 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>";
- 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)) {
- 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>";
- }
- if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
- 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>";
- }
- 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>";
- if (file_exists("data/items/$maj_d/passwd.txt")) {
- echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
- }
- if (file_exists("data/items/$maj_d/private.txt")) {
- echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
- }
- if (file_exists("data/items/$maj_d/member.txt")) {
- echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
- }
- if (file_exists("data/items/$maj_d/cat.txt")) {
- echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
- }
- if (file_exists("data/items/$maj_d/categories/$maj_req_category")) {
- $maj_private_categories = "0";
- $maj_book_categories = "0";
- if (file_exists("data/items/$maj_d/categories")) {
- if ($maj_dh_read_cat_dir = opendir("data/items/$maj_d/categories")) {
- while (($maj_read_cat_dir = readdir($maj_dh_read_cat_dir)) !== false) {
- if ($maj_read_cat_dir != "." && $maj_read_cat_dir != "..") {
- if (file_exists("data/categories/$maj_read_cat_dir/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- if (file_exists("data/categories/$maj_read_cat_dir/book.txt")) {
- $maj_book_categories = $maj_book_categories + 1;
- }
- }
- }
- closedir($maj_dh_read_cat_dir);
- }
- }
- if ($maj_private_categories > 0) {
- echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
- }
- if (file_exists("data/nocat.txt")) {
- echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
- }
- if ($maj_book_categories > 0) {
- echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
- }
- echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
- }
- }
- echo "</div><div class=\"panel_entry_body\"";
- if (isset($maj_d_border) or isset($maj_d_bgcolor_b) or isset($maj_d_text_b)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_b)) {
- echo "background-color: $maj_d_bgcolor_b;";
- }
- if (isset($maj_d_text_b)) {
- echo "color: $maj_d_text_b;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_b) or isset($maj_d_text_b)) {
- echo '"';
- }
- echo '>';
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$maj_d/author.txt")) {
- echo "<td width=\"85\" valign=\"top\">";
- $maj_author = file_get_contents("data/items/$maj_d/author.txt");
- echo "<a href=\"member.php?id=$maj_author\">";
- 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"))) {
- if (file_exists("images/avatar.gif")) {
- $maj_avatar_gif_image_size = getimagesize("images/avatar.gif");
- $maj_avatar_gif_image_width = $maj_avatar_gif_image_size[0];
- $maj_avatar_gif_image_height = $maj_avatar_gif_image_size[1];
- $maj_max_avatar_gif_image_width = 80;
- if ($maj_avatar_gif_image_width > $maj_max_avatar_gif_image_width) {
- $maj_sizefactor = (double) ($maj_max_avatar_gif_image_width / $maj_avatar_gif_image_width) ;
- $maj_avatar_gif_image_width = (int) ($maj_avatar_gif_image_width * $maj_sizefactor);
- $maj_avatar_gif_image_height = (int) ($maj_avatar_gif_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-gif.txt")) {
- $maj_avatar_gif_image_resize = imagecreatetruecolor($maj_avatar_gif_image_width,$maj_avatar_gif_image_height);
- imagealphablending($maj_avatar_gif_image_resize, false);
- imagesavealpha($maj_avatar_gif_image_resize, true);
- $maj_avatar_gif_image_original = imagecreatefromgif("images/avatar.gif");
- $maj_avatar_gif_transparent_index = imagecolortransparent($maj_avatar_gif_image_original);
- if ($maj_avatar_gif_transparent_index >= 0) {
- $maj_avatar_gif_transparent_color = imagecolorsforindex($maj_avatar_gif_image_original, $maj_avatar_gif_transparent_index);
- $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']);
- imagefill($maj_avatar_gif_image_resize, 0, 0, $maj_avatar_gif_transparent_index);
- imagecolortransparent($maj_avatar_gif_image_resize, $maj_avatar_gif_transparent_index);
- }
- 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]);
- unlink("images/avatar.gif");
- imagegif($maj_avatar_gif_image_resize,"images/avatar.gif",100);
- imagedestroy($maj_avatar_gif_image_resize);
- imagedestroy($maj_avatar_gif_image_original);
- }
- }
- echo "<img src=\"images/avatar.gif\" border=\"0\" width=\"$maj_avatar_gif_image_width\" height=\"$maj_avatar_gif_image_height\">";
- }
- if (file_exists("images/avatar.jpg")) {
- $maj_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
- $maj_avatar_jpg_image_width = $maj_avatar_jpg_image_size[0];
- $maj_avatar_jpg_image_height = $maj_avatar_jpg_image_size[1];
- $maj_max_avatar_jpg_image_width = 80;
- if ($maj_avatar_jpg_image_width > $maj_max_avatar_jpg_image_width) {
- $maj_sizefactor = (double) ($maj_max_avatar_jpg_image_width / $maj_avatar_jpg_image_width) ;
- $maj_avatar_jpg_image_width = (int) ($maj_avatar_jpg_image_width * $maj_sizefactor);
- $maj_avatar_jpg_image_height = (int) ($maj_avatar_jpg_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-jpg.txt")) {
- $maj_avatar_jpg_image_resize = imagecreatetruecolor($maj_avatar_jpg_image_width,$maj_avatar_jpg_image_height);
- $maj_avatar_jpg_image_original = imagecreatefromjpeg("images/avatar.jpg");
- 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]);
- unlink("images/avatar.jpg");
- imagejpeg($maj_avatar_jpg_image_resize,"images/avatar.jpg",100);
- imagedestroy($maj_avatar_jpg_image_resize);
- imagedestroy($maj_avatar_jpg_image_original);
- }
- }
- echo "<img src=\"images/avatar.jpg\" border=\"0\" width=\"$maj_avatar_jpg_image_width\" height=\"$maj_avatar_jpg_image_height\">";
- }
- if (file_exists("images/avatar.png")) {
- $maj_avatar_png_image_size = getimagesize("images/avatar.png");
- $maj_avatar_png_image_width = $maj_avatar_png_image_size[0];
- $maj_avatar_png_image_height = $maj_avatar_png_image_size[1];
- $maj_max_avatar_png_image_width = 80;
- if ($maj_avatar_png_image_width > $maj_max_avatar_png_image_width) {
- $maj_sizefactor = (double) ($maj_max_avatar_png_image_width / $maj_avatar_png_image_width) ;
- $maj_avatar_png_image_width = (int) ($maj_avatar_png_image_width * $maj_sizefactor);
- $maj_avatar_png_image_height = (int) ($maj_avatar_png_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-png.txt")) {
- $maj_avatar_png_image_resize = imagecreatetruecolor($maj_avatar_png_image_width,$maj_avatar_png_image_height);
- imagealphablending($maj_avatar_png_image_resize, false);
- imagesavealpha($maj_avatar_png_image_resize, true);
- $maj_avatar_png_image_original = imagecreatefrompng("images/avatar.png");
- 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]);
- unlink("images/avatar.png");
- imagepng($maj_avatar_png_image_resize,"images/avatar.png",100);
- imagedestroy($maj_avatar_png_image_resize);
- imagedestroy($maj_avatar_png_image_original);
- }
- }
- echo "<img src=\"images/avatar.png\" border=\"0\" width=\"$maj_avatar_png_image_width\" height=\"$maj_avatar_png_image_height\">";
- }
- echo "<br>";
- }
- 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")) {
- if (file_exists("images/members/$maj_author/avatar.gif")) {
- $maj_avatar_gif_image_size = getimagesize("images/members/$maj_author/avatar.gif");
- $maj_avatar_gif_image_width = $maj_avatar_gif_image_size[0];
- $maj_avatar_gif_image_height = $maj_avatar_gif_image_size[1];
- $maj_max_avatar_gif_image_width = 80;
- if ($maj_avatar_gif_image_width > $maj_max_avatar_gif_image_width) {
- $maj_sizefactor = (double) ($maj_max_avatar_gif_image_width / $maj_avatar_gif_image_width) ;
- $maj_avatar_gif_image_width = (int) ($maj_avatar_gif_image_width * $maj_sizefactor);
- $maj_avatar_gif_image_height = (int) ($maj_avatar_gif_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-gif.txt")) {
- $maj_avatar_gif_image_resize = imagecreatetruecolor($maj_avatar_gif_image_width,$maj_avatar_gif_image_height);
- imagealphablending($maj_avatar_gif_image_resize, false);
- imagesavealpha($maj_avatar_gif_image_resize, true);
- $maj_avatar_gif_image_original = imagecreatefromgif("images/members/$maj_author/avatar.gif");
- $maj_avatar_gif_transparent_index = imagecolortransparent($maj_avatar_gif_image_original);
- if ($maj_avatar_gif_transparent_index >= 0) {
- $maj_avatar_gif_transparent_color = imagecolorsforindex($maj_avatar_gif_image_original, $maj_avatar_gif_transparent_index);
- $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']);
- imagefill($maj_avatar_gif_image_resize, 0, 0, $maj_avatar_gif_transparent_index);
- imagecolortransparent($maj_avatar_gif_image_resize, $maj_avatar_gif_transparent_index);
- }
- 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]);
- unlink("images/members/$maj_author/avatar.gif");
- imagegif($maj_avatar_gif_image_resize,"images/members/$maj_author/avatar.gif",100);
- imagedestroy($maj_avatar_gif_image_resize);
- imagedestroy($maj_avatar_gif_image_original);
- }
- }
- echo "<img src=\"images/members/$maj_author/avatar.gif\" border=\"0\" width=\"$maj_avatar_gif_image_width\" height=\"$maj_avatar_gif_image_height\">";
- }
- if (file_exists("images/members/$maj_author/avatar.jpg")) {
- $maj_avatar_jpg_image_size = getimagesize("images/members/$maj_author/avatar.jpg");
- $maj_avatar_jpg_image_width = $maj_avatar_jpg_image_size[0];
- $maj_avatar_jpg_image_height = $maj_avatar_jpg_image_size[1];
- $maj_max_avatar_jpg_image_width = 80;
- if ($maj_avatar_jpg_image_width > $maj_max_avatar_jpg_image_width) {
- $maj_sizefactor = (double) ($maj_max_avatar_jpg_image_width / $maj_avatar_jpg_image_width) ;
- $maj_avatar_jpg_image_width = (int) ($maj_avatar_jpg_image_width * $maj_sizefactor);
- $maj_avatar_jpg_image_height = (int) ($maj_avatar_jpg_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-jpg.txt")) {
- $maj_avatar_jpg_image_resize = imagecreatetruecolor($maj_avatar_jpg_image_width,$maj_avatar_jpg_image_height);
- $maj_avatar_jpg_image_original = imagecreatefromjpeg("images/members/$maj_author/avatar.jpg");
- 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]);
- unlink("images/members/$maj_author/avatar.jpg");
- imagejpeg($maj_avatar_jpg_image_resize,"images/members/$maj_author/avatar.jpg",100);
- imagedestroy($maj_avatar_jpg_image_resize);
- imagedestroy($maj_avatar_jpg_image_original);
- }
- }
- echo "<img src=\"images/members/$maj_author/avatar.jpg\" border=\"0\" width=\"$maj_avatar_jpg_image_width\" height=\"$maj_avatar_jpg_image_height\">";
- }
- if (file_exists("images/members/$maj_author/avatar.png")) {
- $maj_avatar_png_image_size = getimagesize("images/members/$maj_author/avatar.png");
- $maj_avatar_png_image_width = $maj_avatar_png_image_size[0];
- $maj_avatar_png_image_height = $maj_avatar_png_image_size[1];
- $maj_max_avatar_png_image_width = 80;
- if ($maj_avatar_png_image_width > $maj_max_avatar_png_image_width) {
- $maj_sizefactor = (double) ($maj_max_avatar_png_image_width / $maj_avatar_png_image_width) ;
- $maj_avatar_png_image_width = (int) ($maj_avatar_png_image_width * $maj_sizefactor);
- $maj_avatar_png_image_height = (int) ($maj_avatar_png_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-png.txt")) {
- $maj_avatar_png_image_resize = imagecreatetruecolor($maj_avatar_png_image_width,$maj_avatar_png_image_height);
- imagealphablending($maj_avatar_png_image_resize, false);
- imagesavealpha($maj_avatar_png_image_resize, true);
- $maj_avatar_png_image_original = imagecreatefrompng("images/members/$maj_author/avatar.png");
- 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]);
- unlink("images/members/$maj_author/avatar.png");
- imagepng($maj_avatar_png_image_resize,"images/members/$maj_author/avatar.png",100);
- imagedestroy($maj_avatar_png_image_resize);
- imagedestroy($maj_avatar_png_image_original);
- }
- }
- echo "<img src=\"images/members/$maj_author/avatar.png\" border=\"0\" width=\"$maj_avatar_png_image_width\" height=\"$maj_avatar_png_image_height\">";
- }
- echo "<br>";
- }
- echo "<b>$maj_author</b></a><br>";
- if ((file_get_contents("data/username.txt") == $maj_author) and file_exists("data/rank.txt")) {
- echo "administrator<br>";
- }
- elseif (file_exists("data/members/active/$maj_author/rank.txt") and file_exists("data/rank.txt")) {
- $maj_rank = file_get_contents("data/members/active/$maj_author/rank.txt");
- echo "$maj_rank<br>";
- }
- elseif (!file_exists("data/members/active/$maj_author/rank.txt") and file_exists("data/rank.txt")) {
- echo "member<br>";
- }
- if ($maj_dh_author_posts = opendir("data/items")) {
- while (($maj_author_post = readdir($maj_dh_author_posts)) !== false) {
- if ($maj_author_post != "." && $maj_author_post != "..") {
- if (file_exists("data/items/$maj_author_post/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_author_post/categories")) {
- if ($maj_dh_entry_categories_posts = opendir("data/items/$maj_author_post/categories")) {
- while (($maj_entry_category_posts = readdir($maj_dh_entry_categories_posts)) !== false) {
- if ($maj_entry_category_posts != "." && $maj_entry_category_posts != "..") {
- if (file_exists("data/categories/$maj_entry_category_posts/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_entry_categories_posts);
- }
- }
- 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")) {
- continue;
- }
- if (file_exists("data/members/active/$maj_author") and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$maj_author_post/author.txt") and (file_get_contents("data/items/$maj_author_post/author.txt") == $maj_author)) {
- $maj_items_posts[] = $maj_author_post;
- }
- }
- elseif (!file_exists("data/members/active/$maj_author") and (file_get_contents("data/username.txt") == $maj_author) and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$maj_author_post/author.txt") and (file_get_contents("data/items/$maj_author_post/author.txt") == $maj_author)) {
- $maj_items_posts[] = $maj_author_post;
- }
- }
- }
- }
- closedir($maj_dh_author_posts);
- }
- $maj_posts = count($maj_items_posts);
- if ($maj_posts == 1) {
- echo "$maj_posts post";
- }
- if ($maj_posts > 1) {
- echo "$maj_posts posts";
- }
- unset($maj_items_posts);
- echo "</td><td width=513 valign=top>";
- }
- else {
- echo "<td width=598 valign=top>";
- }
- if (file_exists("data/items/$maj_d/passwd.txt")) {
- $maj_passwd = file_get_contents("data/items/$maj_d/passwd.txt");
- }
- if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
- $maj_crypt_passwd = sha1($_REQUEST['passwd']);
- $maj_crypt_passwd = md5($maj_crypt_passwd);
- $maj_crypt_passwd = crypt($maj_crypt_passwd,$maj_crypt_passwd);
- }
- echo "<font style=\"font-size: $maj_font_10px; color: #999999;\">";
- 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"))))) {
- $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
- echo "$maj_xavatar_author - ";
- }
- entry2date($maj_d);
- if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) or file_exists("data/items/$maj_d/lastmod.txt")) {
- if (file_exists("data/items/$maj_d/revisions.txt")) {
- echo " (Revision ";
- readfile("data/items/$maj_d/revisions.txt");
- echo " - ";
- echo date("l, M j, Y, g:i A",filemtime("data/items/$maj_d/body.txt"));
- echo ")";
- }
- }
- echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
- if (isset($maj_d_text_b)) {
- echo "<font style=\"color: $maj_d_text_b;\">";
- }
- 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))) {
- 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.";
- }
- else {
- $maj_entry_body = file_get_contents("data/items/$maj_d/body.txt");
- 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"))))) {
- $maj_badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $maj_censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $maj_censor = "[expletive]";
- }
- $maj_entry_body = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_entry_body);
- }
- if (file_exists("data/items/$maj_d/maxlines.txt") and (!isset($_REQUEST['view']) or ($_REQUEST['view'] != "full"))) {
- $maj_entry_shorten = file_get_contents("data/items/$maj_d/maxlines.txt");
- $maj_entry_lines = explode("\r",$maj_entry_body);
- if (count($maj_entry_lines) > $maj_entry_shorten) {
- $maj_entry_body = implode("",array_slice($maj_entry_lines,0,$maj_entry_shorten));
- $maj_entry_body = $maj_entry_body . "<br><br><a href=\"index.php?entry=$maj_d&view=full\">read more</a>";
- }
- }
- echo $maj_entry_body;
- }
- 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")) {
- $maj_sig = file_get_contents("data/sig.txt");
- echo "<br><br>--<br>$maj_sig";
- }
- elseif (file_exists("data/members/active/$maj_author/sig.txt") and file_exists("data/bb.txt") and file_exists("data/bb-sig.txt")) {
- $maj_sig = file_get_contents("data/members/active/$maj_author/sig.txt");
- echo "<br><br>--<br>$maj_sig";
- }
- if (isset($maj_d_text_b)) {
- echo "</font>";
- }
- echo "</td></tr></table>";
- if (file_exists("data/round.txt")) {
- echo "<div class=\"rbspace\"></div>";
- }
- echo "</div>";
- if (file_exists("data/items/$maj_d/categories") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- if ($maj_dh_entry_categories = opendir("data/items/$maj_d/categories")) {
- while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
- if ($maj_entry_category != "." && $maj_entry_category != "..") {
- $maj_entry_categories[] = $maj_entry_category;
- }
- }
- closedir($maj_dh_entry_categories);
- }
- sort($maj_entry_categories);
- reset($maj_entry_categories);
- if (count($maj_entry_categories) > 0) {
- if (count($maj_entry_categories) > 1) {
- $maj_category_list = "categories";
- }
- else {
- $maj_category_list = "category";
- }
- foreach ($maj_entry_categories as $maj_filed_under) {
- $maj_category_list = $maj_category_list . " | <a href=\"index.php?category=$maj_filed_under\">$maj_filed_under</a>";
- }
- echo "<div class=\"panel_category\"";
- if (isset($maj_d_border) or isset($maj_d_bgcolor_c) or isset($maj_d_text_c)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_c)) {
- echo "background-color: $maj_d_bgcolor_c;";
- }
- if (isset($maj_d_text_c)) {
- echo "color: $maj_d_text_c;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_c) or isset($maj_d_text_c)) {
- echo '"';
- }
- echo ">$maj_category_list</div>";
- }
- unset($maj_entry_categories);
- }
- echo "<div class=\"panel_footer\"";
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f) or isset($maj_d_text_f)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_f)) {
- echo "background-color: $maj_d_bgcolor_f;";
- }
- if (isset($maj_d_text_f)) {
- echo "color: $maj_d_text_f;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f) or isset($maj_d_text_f)) {
- echo '"';
- }
- echo '>';
- if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
- if (!file_exists("data/items/$maj_d/comments/live")) {
- echo "<a href=\"index.php?entry=$maj_d&show=comments\">add comment</a>";
- }
- else {
- if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
- while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
- if ($maj_live_comment != "." && $maj_live_comment != "..") {
- $maj_live_comments[] = $maj_live_comment;
- }
- }
- closedir($maj_dh_comments);
- }
- $maj_count_live_comments = count($maj_live_comments);
- echo "<a href=\"index.php?entry=$maj_d&show=comments\">";
- if ($maj_count_live_comments == 1) {
- echo "$maj_count_live_comments comment";
- }
- elseif ($maj_count_live_comments < 1) {
- echo "add comment";
- }
- else {
- echo "$maj_count_live_comments comments";
- }
- echo "</a>";
- unset($maj_live_comments);
- }
- }
- else {
- echo "<a href=\"index.php?entry=$maj_d\">permalink</a>";
- }
- if (file_exists("data/items/$maj_d/views.txt")) {
- $maj_views_value = file_get_contents("data/items/$maj_d/views.txt");
- if ($maj_views_value == 1) {
- echo " ( $maj_views_value view ) ";
- }
- elseif ($maj_views_value > 1) {
- echo " ( $maj_views_value views ) ";
- }
- else {
- echo " ";
- }
- }
- if (!file_exists("images/$maj_d/album")) {
- echo " ";
- }
- else {
- if ($maj_dh_album = opendir("images/$maj_d/album")) {
- while (($maj_entry_album = readdir($maj_dh_album)) !== false) {
- if ($maj_entry_album != "." && $maj_entry_album != "..") {
- $maj_items_album[] = $maj_entry_album;
- }
- }
- closedir($maj_dh_album);
- }
- $maj_album = count($maj_items_album);
- echo " | <a href=\"index.php?entry=$maj_d&show=album\">";
- if ($maj_album == 1) {
- echo "$maj_album image";
- }
- elseif ($maj_album < 1) {
- echo "album";
- }
- else {
- echo "$maj_album images";
- }
- echo "</a>";
- unset($maj_items_album);
- }
- 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)) {
- if (!file_exists("data/items/$maj_d/album")) {
- mkdir("data/items/$maj_d/album");
- }
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
- $maj_album_views_value = $maj_album_views_value + 1;
- }
- }
- $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
- if ($maj_album_views_value == 1) {
- echo " ( $maj_album_views_value view ) ";
- }
- elseif ($maj_album_views_value > 1) {
- echo " ( $maj_album_views_value views ) ";
- }
- else {
- echo " ";
- }
- if (!file_exists("data/items/$maj_d/filedrop/files")) {
- echo " ";
- }
- else {
- if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
- while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
- if ($maj_dl_file != "." && $maj_dl_file != "..") {
- $maj_items_filedrop[] = $maj_dl_file;
- }
- }
- closedir($maj_dh_filedrop);
- }
- $maj_filedrop = count($maj_items_filedrop);
- echo " | <a href=\"index.php?entry=$maj_d&show=filedrop\">";
- if ($maj_filedrop == 1) {
- echo "$maj_filedrop file";
- }
- elseif ($maj_filedrop < 1) {
- echo "filedrop";
- }
- else {
- echo "$maj_filedrop files";
- }
- echo "</a> ";
- unset($maj_items_filedrop);
- }
- 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)) {
- if (!file_exists("data/items/$maj_d/filedrop")) {
- mkdir("data/items/$maj_d/filedrop");
- }
- if (file_exists("data/items/$maj_d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
- $maj_filedrop_views_value = $maj_filedrop_views_value + 1;
- }
- }
- $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
- if ($maj_filedrop_views_value == 1) {
- echo " ( $maj_filedrop_views_value view ) ";
- }
- elseif ($maj_filedrop_views_value > 1) {
- echo " ( $maj_filedrop_views_value views ) ";
- }
- else {
- echo " ";
- }
- if (!file_exists("data/nopdf.txt") and file_exists("data/items/$maj_d/pdf/file")) {
- echo "| <a href=\"index.php?entry=$maj_d&show=pdf\">pdf</a> ";
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username)) {
- $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
- $maj_pdf_views_value = $maj_pdf_views_value + 1;
- }
- $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
- if ($maj_pdf_views_value == 1) {
- echo " ( $maj_pdf_views_value view ) ";
- }
- elseif ($maj_pdf_views_value > 1) {
- echo " ( $maj_pdf_views_value views ) ";
- }
- else {
- echo " ";
- }
- }
- if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
- echo "| <a href=\"index.php?entry=$maj_d\">permalink</a>";
- }
- echo "</div>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4e"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_f)) {
- echo "background-color: $maj_d_bgcolor_f;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f)) {
- echo '"';
- }
- echo '></b><b class="rb3e"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_f)) {
- echo "background-color: $maj_d_bgcolor_f;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f)) {
- echo '"';
- }
- echo '></b><b class="rb2e"';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f)) {
- echo ' style="';
- }
- if (isset($maj_d_bgcolor_f)) {
- echo "background-color: $maj_d_bgcolor_f;";
- }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_f)) {
- echo '"';
- }
- echo '></b><b class="rb1e"';
- if (isset($maj_d_border)) {
- echo " style=\"background-color: $maj_d_border;\"";
- }
- echo '></b></b>';
- }
- echo "</td></tr></table>";
- if ($maj_count_entry_panels > 0) {
- foreach ($maj_entry_panels as $maj_entry_panel) {
- if (!file_exists("data/panels/$maj_entry_panel/free.txt")) {
- if (file_exists("data/panels/$maj_entry_panel/border.txt")) {
- $maj_entry_panel_border = file_get_contents("data/panels/$maj_entry_panel/border.txt");
- }
- else {
- if (isset($maj_entry_panel_border)) {
- unset($maj_entry_panel_border);
- }
- }
- if (file_exists("data/panels/$maj_entry_panel/bgcolor-t.txt")) {
- $maj_entry_panel_bgcolor_t = file_get_contents("data/panels/$maj_entry_panel/bgcolor-t.txt");
- }
- else {
- if (isset($maj_entry_panel_bgcolor_t)) {
- unset($maj_entry_panel_bgcolor_t);
- }
- }
- if (file_exists("data/panels/$maj_entry_panel/bgcolor-c.txt")) {
- $maj_entry_panel_bgcolor_c = file_get_contents("data/panels/$maj_entry_panel/bgcolor-c.txt");
- }
- else {
- if (isset($maj_entry_panel_bgcolor_c)) {
- unset($maj_entry_panel_bgcolor_c);
- }
- }
- if (file_exists("data/panels/$maj_entry_panel/text-t.txt")) {
- $maj_entry_panel_text_t = file_get_contents("data/panels/$maj_entry_panel/text-t.txt");
- }
- else {
- if (isset($maj_entry_panel_text_t)) {
- unset($maj_entry_panel_text_t);
- }
- }
- if (file_exists("data/panels/$maj_entry_panel/text-c.txt")) {
- $maj_entry_panel_text_c = file_get_contents("data/panels/$maj_entry_panel/text-c.txt");
- }
- else {
- if (isset($maj_entry_panel_text_c)) {
- unset($maj_entry_panel_text_c);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($maj_entry_panel_border)) {
- echo " style=\"background-color: $maj_entry_panel_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_t)) {
- echo "background-color: $maj_entry_panel_bgcolor_t;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_t)) {
- echo "background-color: $maj_entry_panel_bgcolor_t;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_t)) {
- echo "background-color: $maj_entry_panel_bgcolor_t;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_t)) {
- echo "background-color: $maj_entry_panel_bgcolor_t;";
- }
- if (isset($maj_entry_panel_text_t)) {
- echo "color: $maj_entry_panel_text_t;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div class="panel_title"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_t)) {
- echo "background-color: $maj_entry_panel_bgcolor_t;";
- }
- if (isset($maj_entry_panel_text_t)) {
- echo "color: $maj_entry_panel_text_t;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_t) or isset($maj_entry_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/panels/$maj_entry_panel/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo "<a href=\"panels.php#{$maj_entry_panel}\">";
- echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
- }
- if (file_exists("data/panels/$maj_entry_panel/private.txt")) {
- echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
- }
- echo '</div>';
- echo '<div class="panel_body"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c) or isset($maj_entry_panel_text_c)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_c)) {
- echo "background-color: $maj_entry_panel_bgcolor_c;";
- }
- if (isset($maj_entry_panel_text_c)) {
- echo "color: $maj_entry_panel_text_c;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c) or isset($maj_entry_panel_text_c)) {
- echo '"';
- }
- echo '>';
- }
- if (file_exists("data/panels/$maj_entry_panel/free.txt")) {
- echo '<div class=panel_free>';
- }
- include("data/panels/$maj_entry_panel/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$maj_entry_panel/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_c)) {
- echo "background-color: $maj_entry_panel_bgcolor_c;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb3b"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_c)) {
- echo "background-color: $maj_entry_panel_bgcolor_c;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb2b"';
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_entry_panel_bgcolor_c)) {
- echo "background-color: $maj_entry_panel_bgcolor_c;";
- }
- if (isset($maj_entry_panel_border)) {
- echo "border-color: $maj_entry_panel_border;";
- }
- if (isset($maj_entry_panel_border) or isset($maj_entry_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb1b"';
- if (isset($maj_entry_panel_border)) {
- echo " style=\"background-color: $maj_entry_panel_border;\"";
- }
- echo '></b></b>';
- }
- }
- }
- 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")) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'Album';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo '<a href=del.php?entry=';
- echo $maj_d;
- echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
- }
- echo '</div><div class=panel_body>';
- 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))) {
- 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.";
- }
- else {
- if (file_exists("images/$maj_d/thumbnails")) {
- if ($maj_dh_album = opendir("images/$maj_d/thumbnails")) {
- while (($maj_thumbnail_album = readdir($maj_dh_album)) !== false) {
- if ($maj_thumbnail_album != "." && $maj_thumbnail_album != "..") {
- $maj_current_thumbnail = "images/$maj_d/thumbnails/$maj_thumbnail_album";
- $maj_parent_image = str_replace("-thumbnail.jpg","",$maj_thumbnail_album);
- $maj_parent_image = "images/$maj_d/album/$maj_parent_image";
- if (file_exists($maj_current_thumbnail) and !file_exists($maj_parent_image)) {
- unlink($maj_current_thumbnail);
- }
- }
- }
- }
- }
- if (file_exists("data/items/$maj_d/album/captions")) {
- if ($maj_dh_album = opendir("data/items/$maj_d/album/captions")) {
- while (($maj_caption_album = readdir($maj_dh_album)) !== false) {
- if ($maj_caption_album != "." && $maj_caption_album != "..") {
- $maj_current_caption = "data/items/$maj_d/album/captions/$maj_caption_album";
- $maj_parent_image = str_replace(".txt","",$maj_caption_album);
- $maj_parent_image = "images/$maj_d/album/$maj_parent_image";
- if (file_exists($maj_current_caption) and !file_exists($maj_parent_image)) {
- unlink($maj_current_caption);
- }
- }
- }
- }
- }
- if (file_exists("images/$maj_d/album")) {
- if ($maj_dh_album = opendir("images/$maj_d/album")) {
- while (($maj_entry_album = readdir($maj_dh_album)) !== false) {
- if ($maj_entry_album != "." && $maj_entry_album != "..") {
- $maj_sort_album[] = $maj_entry_album;
- }
- }
- closedir($maj_dh_album);
- }
- sort($maj_sort_album);
- reset($maj_sort_album);
- $maj_count_album_entry = count($maj_sort_album);
- if ($maj_count_album_entry < 1) {
- rmdirr("images/$maj_d/album");
- rmdirr("images/$maj_d/thumbnails");
- }
- else {
- foreach($maj_sort_album as $maj_album_entry) {
- $maj_current_image = "images/$maj_d/album/$maj_album_entry";
- $maj_current_image_size = getimagesize($maj_current_image);
- $maj_current_width = $maj_current_image_size[0];
- $maj_current_height = $maj_current_image_size[1];
- $maj_max_width = 98;
- $maj_max_height = 73;
- if (($maj_current_width > $maj_max_width) || ($maj_current_height > $maj_max_height)) {
- if ($maj_current_height > $maj_current_width) {
- $maj_sizefactor = (double) ($maj_max_height / $maj_current_height);
- }
- else {
- $maj_sizefactor = (double) ($maj_max_width / $maj_current_width) ;
- }
- $maj_new_width = (int) ($maj_current_width * $maj_sizefactor);
- $maj_new_height = (int) ($maj_current_height * $maj_sizefactor);
- }
- else {
- $maj_new_width = $maj_current_width;
- $maj_new_height = $maj_current_height;
- }
- if (!file_exists("images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg")) {
- $maj_work_thumb = imagecreatetruecolor($maj_new_width,$maj_new_height);
- $maj_get_mimetype = image_type_to_mime_type(exif_imagetype($maj_current_image));
- switch($maj_get_mimetype) {
- case "image/jpg":
- case "image/jpeg":
- $maj_work_image = imagecreatefromjpeg($maj_current_image);
- break;
- case "image/gif":
- $maj_work_image = imagecreatefromgif($maj_current_image);
- break;
- case "image/png":
- $maj_work_image = imagecreatefrompng($maj_current_image);
- break;
- }
- imagecopyresampled($maj_work_thumb,$maj_work_image,0,0,0,0,$maj_new_width,$maj_new_height,$maj_current_width,$maj_current_height);
- if (!file_exists("images/$maj_d/thumbnails")) {
- mkdir("images/$maj_d/thumbnails");
- }
- imagejpeg($maj_work_thumb,"images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg",80);
- imagedestroy($maj_work_thumb);
- imagedestroy($maj_work_image);
- }
- echo "<a href=\"album.php?entry=$maj_d&show=$maj_album_entry\">";
- if (!file_exists("images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg")) {
- echo "<img src=\"images/$maj_d/album/$maj_album_entry\" width=$maj_new_width height=$maj_new_height border=0 hspace=2 vspace=2";
- }
- else {
- 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";
- }
- if (file_exists("data/items/$maj_d/album/captions/{$maj_album_entry}.txt")) {
- echo ' alt="';
- $maj_img_alt = file_get_contents("data/items/$maj_d/album/captions/{$maj_album_entry}.txt");
- $maj_img_alt = strip_tags($maj_img_alt);
- echo $maj_img_alt;
- echo '"';
- }
- echo "></a>";
- }
- }
- }
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- echo '</td></tr></table>';
- }
- 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")) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo "<div class=panel_title>";
- }
- echo "Filedrop";
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- 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>";
- }
- echo "</div><div class=panel_body>";
- 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))) {
- 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.";
- }
- else {
- if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
- while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
- if ($maj_dl_file != "." && $maj_dl_file != "..") {
- $maj_filedrop_files[] = $maj_dl_file;
- }
- }
- closedir($maj_dh_filedrop);
- }
- reset($maj_filedrop_files);
- sort($maj_filedrop_files);
- foreach ($maj_filedrop_files as $maj_filedrop_file) {
- echo "<table border=0 cellspacing=0 cellpadding=4><tr><td>";
- echo "<a href=\"index.php?entry=$maj_d&download=$maj_filedrop_file&type=filedrop\">";
- echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
- echo "<td><b>$maj_filedrop_file</b>";
- if (file_exists("data/items/$maj_d/filedrop/sha1.txt")) {
- $maj_sha1 = sha1_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
- echo "<br>$maj_sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
- }
- if (file_exists("data/items/$maj_d/filedrop/md5.txt")) {
- $maj_md5 = md5_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
- echo "<br>$maj_md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
- }
- $maj_size = filesize("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
- echo "<br>$maj_size_string";
- $maj_filedrop_count_file = "data/items/$maj_d/filedrop/count/$maj_filedrop_file" . '.txt';
- if (file_exists($maj_filedrop_count_file)) {
- echo "<br>$maj_filedrop_count";
- if ($maj_filedrop_count == 1) {
- echo " download";
- }
- if ($maj_filedrop_count > 1) {
- echo " downloads";
- }
- }
- echo "</td></tr></table>";
- }
- }
- echo "</div>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- echo '</td></tr></table>';
- }
- 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")) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'PDF';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo '<a href=del.php?entry=';
- echo $maj_d;
- echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
- }
- echo '</div><div class=panel_body>';
- 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))) {
- 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.";
- }
- else {
- if ($maj_dh_pdf = opendir("data/items/$maj_d/pdf/file")) {
- while (($maj_dl_file = readdir($maj_dh_pdf)) !== false) {
- if ($maj_dl_file != "." && $maj_dl_file != "..") {
- echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
- echo "<a href=\"index.php?entry=$maj_d&download=$maj_dl_file&type=pdf\">";
- echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
- echo '<td><b>';
- echo $maj_dl_file;
- echo'</b><br>';
- $maj_size = filesize("data/items/$maj_d/pdf/file/$maj_dl_file");
- echo $maj_size_string;
- $maj_pdf_count_file = "data/items/$maj_d/pdf/count/dl.txt";
- if (file_exists($maj_pdf_count_file)) {
- echo '<br>';
- echo $maj_pdf_count;
- if ($maj_pdf_count == 1) {
- echo ' download';
- }
- if ($maj_pdf_count > 1) {
- echo ' downloads';
- }
- }
- echo '</td></tr></table>';
- }
- }
- closedir($maj_dh_pdf);
- }
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- echo '</td></tr></table>';
- }
- 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'])))) {
- 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))) {
- }
- else {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
- if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
- while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
- if ($maj_live_comment != "." && $maj_live_comment != "..") {
- $maj_show_comments[] = $maj_live_comment;
- }
- }
- closedir($maj_dh_comments);
- }
- asort($maj_show_comments);
- reset($maj_show_comments);
- foreach ($maj_show_comments as $maj_comment) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
- echo '<a target=_maj href=';
- readfile("data/items/$maj_d/comments/live/$maj_comment/url.txt");
- echo '>';
- }
- readfile("data/items/$maj_d/comments/live/$maj_comment/firstname.txt");
- echo ' ';
- readfile("data/items/$maj_d/comments/live/$maj_comment/lastname.txt");
- if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
- echo '</a>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo ' <';
- readfile("data/items/$maj_d/comments/live/$maj_comment/email.txt");
- echo '>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- 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>';
- 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>';
- 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>';
- }
- echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
- 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")) {
- echo "<td width=85 valign=top>";
- $maj_c_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
- echo "<a href=member.php?id=$maj_c_author>";
- 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"))) {
- if (file_exists("images/avatar.gif")) {
- $maj_c_avatar_gif_image_size = getimagesize("images/avatar.gif");
- $maj_c_avatar_gif_image_width = $maj_c_avatar_gif_image_size[0];
- $maj_c_avatar_gif_image_height = $maj_c_avatar_gif_image_size[1];
- $maj_c_max_avatar_gif_image_width = 80;
- if ($maj_c_avatar_gif_image_width > $maj_c_max_avatar_gif_image_width) {
- $maj_sizefactor = (double) ($maj_c_max_avatar_gif_image_width / $maj_c_avatar_gif_image_width) ;
- $maj_c_avatar_gif_image_width = (int) ($maj_c_avatar_gif_image_width * $maj_sizefactor);
- $maj_c_avatar_gif_image_height = (int) ($maj_c_avatar_gif_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-gif.txt")) {
- $maj_c_avatar_gif_image_resize = imagecreatetruecolor($maj_c_avatar_gif_image_width,$maj_c_avatar_gif_image_height);
- imagealphablending($maj_c_avatar_gif_image_resize, false);
- imagesavealpha($maj_c_avatar_gif_image_resize, true);
- $maj_c_avatar_gif_image_original = imagecreatefromgif("images/avatar.gif");
- $maj_c_avatar_gif_transparent_index = imagecolortransparent($maj_c_avatar_gif_image_original);
- if ($maj_c_avatar_gif_transparent_index >= 0) {
- $maj_c_avatar_gif_transparent_color = imagecolorsforindex($maj_c_avatar_gif_image_original, $maj_c_avatar_gif_transparent_index);
- $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']);
- imagefill($maj_c_avatar_gif_image_resize, 0, 0, $maj_c_avatar_gif_transparent_index);
- imagecolortransparent($maj_c_avatar_gif_image_resize, $maj_c_avatar_gif_transparent_index);
- }
- 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]);
- unlink("images/avatar.gif");
- imagegif($maj_c_avatar_gif_image_resize,"images/avatar.gif",100);
- imagedestroy($maj_c_avatar_gif_image_resize);
- imagedestroy($maj_c_avatar_gif_image_original);
- }
- }
- echo "<img src=images/avatar.gif border=0 width=";
- echo $maj_c_avatar_gif_image_width;
- echo " height=";
- echo $maj_c_avatar_gif_image_height;
- }
- if (file_exists("images/avatar.jpg")) {
- $maj_c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
- $maj_c_avatar_jpg_image_width = $maj_c_avatar_jpg_image_size[0];
- $maj_c_avatar_jpg_image_height = $maj_c_avatar_jpg_image_size[1];
- $maj_c_max_avatar_jpg_image_width = 80;
- if ($maj_c_avatar_jpg_image_width > $maj_c_max_avatar_jpg_image_width) {
- $maj_sizefactor = (double) ($maj_c_max_avatar_jpg_image_width / $maj_c_avatar_jpg_image_width) ;
- $maj_c_avatar_jpg_image_width = (int) ($maj_c_avatar_jpg_image_width * $maj_sizefactor);
- $maj_c_avatar_jpg_image_height = (int) ($maj_c_avatar_jpg_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-jpg.txt")) {
- $maj_c_avatar_jpg_image_resize = imagecreatetruecolor($maj_c_avatar_jpg_image_width,$maj_c_avatar_jpg_image_height);
- $maj_c_avatar_jpg_image_original = imagecreatefromjpeg("images/avatar.jpg");
- 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]);
- unlink("images/avatar.jpg");
- imagejpeg($maj_c_avatar_jpg_image_resize,"images/avatar.jpg",100);
- imagedestroy($maj_c_avatar_jpg_image_resize);
- imagedestroy($maj_c_avatar_jpg_image_original);
- }
- }
- echo "<img src=images/avatar.jpg border=0 width=";
- echo $maj_c_avatar_jpg_image_width;
- echo " height=";
- echo $maj_c_avatar_jpg_image_height;
- }
- if (file_exists("images/avatar.png")) {
- $maj_c_avatar_png_image_size = getimagesize("images/avatar.png");
- $maj_c_avatar_png_image_width = $maj_c_avatar_png_image_size[0];
- $maj_c_avatar_png_image_height = $maj_c_avatar_png_image_size[1];
- $maj_c_max_avatar_png_image_width = 80;
- if ($maj_c_avatar_png_image_width > $maj_c_max_avatar_png_image_width) {
- $maj_sizefactor = (double) ($maj_c_max_avatar_png_image_width / $maj_c_avatar_png_image_width) ;
- $maj_c_avatar_png_image_width = (int) ($maj_c_avatar_png_image_width * $maj_sizefactor);
- $maj_c_avatar_png_image_height = (int) ($maj_c_avatar_png_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-png.txt")) {
- $maj_c_avatar_png_image_resize = imagecreatetruecolor($maj_c_avatar_png_image_width,$maj_c_avatar_png_image_height);
- imagealphablending($maj_c_avatar_png_image_resize, false);
- imagesavealpha($maj_c_avatar_png_image_resize, true);
- $maj_c_avatar_png_image_original = imagecreatefrompng("images/avatar.png");
- 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]);
- unlink("images/avatar.png");
- imagepng($maj_c_avatar_png_image_resize,"images/avatar.png",100);
- imagedestroy($maj_c_avatar_png_image_resize);
- imagedestroy($maj_c_avatar_png_image_original);
- }
- }
- echo "<img src=images/avatar.png border=0 width=";
- echo $maj_c_avatar_png_image_width;
- echo " height=";
- echo $maj_c_avatar_png_image_height;
- }
- echo "><br>";
- }
- 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")) {
- if (file_exists("images/members/$maj_c_author/avatar.gif")) {
- $maj_c_avatar_gif_image_size = getimagesize("images/members/$maj_c_author/avatar.gif");
- $maj_c_avatar_gif_image_width = $maj_c_avatar_gif_image_size[0];
- $maj_c_avatar_gif_image_height = $maj_c_avatar_gif_image_size[1];
- $maj_c_max_avatar_gif_image_width = 80;
- if ($maj_c_avatar_gif_image_width > $maj_c_max_avatar_gif_image_width) {
- $maj_sizefactor = (double) ($maj_c_max_avatar_gif_image_width / $maj_c_avatar_gif_image_width) ;
- $maj_c_avatar_gif_image_width = (int) ($maj_c_avatar_gif_image_width * $maj_sizefactor);
- $maj_c_avatar_gif_image_height = (int) ($maj_c_avatar_gif_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-gif.txt")) {
- $maj_c_avatar_gif_image_resize = imagecreatetruecolor($maj_c_avatar_gif_image_width,$maj_c_avatar_gif_image_height);
- imagealphablending($maj_c_avatar_gif_image_resize, false);
- imagesavealpha($maj_c_avatar_gif_image_resize, true);
- $maj_c_avatar_gif_image_original = imagecreatefromgif("images/members/$maj_c_author/avatar.gif");
- $maj_c_avatar_gif_transparent_index = imagecolortransparent($maj_c_avatar_gif_image_original);
- if ($maj_c_avatar_gif_transparent_index >= 0) {
- $maj_c_avatar_gif_transparent_color = imagecolorsforindex($maj_c_avatar_gif_image_original, $maj_c_avatar_gif_transparent_index);
- $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']);
- imagefill($maj_c_avatar_gif_image_resize, 0, 0, $maj_c_avatar_gif_transparent_index);
- imagecolortransparent($maj_c_avatar_gif_image_resize, $maj_c_avatar_gif_transparent_index);
- }
- 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]);
- unlink("images/members/$maj_c_author/avatar.gif");
- imagegif($maj_c_avatar_gif_image_resize,"images/members/$maj_c_author/avatar.gif",100);
- imagedestroy($maj_c_avatar_gif_image_resize);
- imagedestroy($maj_c_avatar_gif_image_original);
- }
- }
- echo "<img src=images/members/$maj_c_author/avatar.gif border=0 width=";
- echo $maj_c_avatar_gif_image_width;
- echo " height=";
- echo $maj_c_avatar_gif_image_height;
- }
- if (file_exists("images/members/$maj_c_author/avatar.jpg")) {
- $maj_c_avatar_jpg_image_size = getimagesize("images/members/$maj_c_author/avatar.jpg");
- $maj_c_avatar_jpg_image_width = $maj_c_avatar_jpg_image_size[0];
- $maj_c_avatar_jpg_image_height = $maj_c_avatar_jpg_image_size[1];
- $maj_c_max_avatar_jpg_image_width = 80;
- if ($maj_c_avatar_jpg_image_width > $maj_c_max_avatar_jpg_image_width) {
- $maj_sizefactor = (double) ($maj_c_max_avatar_jpg_image_width / $maj_c_avatar_jpg_image_width) ;
- $maj_c_avatar_jpg_image_width = (int) ($maj_c_avatar_jpg_image_width * $maj_sizefactor);
- $maj_c_avatar_jpg_image_height = (int) ($maj_c_avatar_jpg_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-jpg.txt")) {
- $maj_c_avatar_jpg_image_resize = imagecreatetruecolor($maj_c_avatar_jpg_image_width,$maj_c_avatar_jpg_image_height);
- $maj_c_avatar_jpg_image_original = imagecreatefromjpeg("images/members/$maj_c_author/avatar.jpg");
- 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]);
- unlink("images/members/$maj_c_author/avatar.jpg");
- imagejpeg($maj_c_avatar_jpg_image_resize,"images/members/$maj_c_author/avatar.jpg",100);
- imagedestroy($maj_c_avatar_jpg_image_resize);
- imagedestroy($maj_c_avatar_jpg_image_original);
- }
- }
- echo "<img src=images/members/$maj_c_author/avatar.jpg border=0 width=";
- echo $maj_c_avatar_jpg_image_width;
- echo " height=";
- echo $maj_c_avatar_jpg_image_height;
- }
- if (file_exists("images/members/$maj_c_author/avatar.png")) {
- $maj_c_avatar_png_image_size = getimagesize("images/members/$maj_c_author/avatar.png");
- $maj_c_avatar_png_image_width = $maj_c_avatar_png_image_size[0];
- $maj_c_avatar_png_image_height = $maj_c_avatar_png_image_size[1];
- $maj_c_max_avatar_png_image_width = 80;
- if ($maj_c_avatar_png_image_width > $maj_c_max_avatar_png_image_width) {
- $maj_sizefactor = (double) ($maj_c_max_avatar_png_image_width / $maj_c_avatar_png_image_width) ;
- $maj_c_avatar_png_image_width = (int) ($maj_c_avatar_png_image_width * $maj_sizefactor);
- $maj_c_avatar_png_image_height = (int) ($maj_c_avatar_png_image_height * $maj_sizefactor);
- if (file_exists("data/avatar-resize-png.txt")) {
- $maj_c_avatar_png_image_resize = imagecreatetruecolor($maj_c_avatar_png_image_width,$maj_c_avatar_png_image_height);
- imagealphablending($maj_c_avatar_png_image_resize, false);
- imagesavealpha($maj_c_avatar_png_image_resize, true);
- $maj_c_avatar_png_image_original = imagecreatefrompng("images/members/$maj_c_author/avatar.png");
- 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]);
- unlink("images/members/$maj_c_author/avatar.png");
- imagepng($maj_c_avatar_png_image_resize,"images/members/$maj_c_author/avatar.png",100);
- imagedestroy($maj_c_avatar_png_image_resize);
- imagedestroy($maj_c_avatar_png_image_original);
- }
- }
- echo "<img src=images/members/$maj_c_author/avatar.png border=0 width=";
- echo $maj_c_avatar_png_image_width;
- echo " height=";
- echo $maj_c_avatar_png_image_height;
- }
- echo "><br>";
- }
- echo "$maj_c_author</a><br>";
- if ((file_get_contents("data/username.txt") == $maj_c_author) and file_exists("data/rank.txt")) {
- echo "administrator<br>";
- }
- elseif (file_exists("data/members/active/$maj_c_author/rank.txt") and file_exists("data/rank.txt")) {
- $maj_c_rank = file_get_contents("data/members/active/$maj_c_author/rank.txt");
- echo "$maj_c_rank<br>";
- }
- elseif (!file_exists("data/members/active/$maj_c_author/rank.txt") and file_exists("data/rank.txt")) {
- echo "member<br>";
- }
- if ($maj_c_dh_posts = opendir("data/items")) {
- while (($maj_c_entry_posts = readdir($maj_c_dh_posts)) !== false) {
- if (file_exists("data/items/$maj_c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- if (file_exists("data/items/$maj_c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_entry_c_entry_posts/categories")) {
- if ($maj_dh_cat2_c_entry_posts = opendir("data/items/$maj_entry_c_entry_posts/categories")) {
- while (($maj_entry_cat2_c_entry_posts = readdir($maj_dh_cat2_c_entry_posts)) !== false) {
- if ($maj_entry_cat2_c_entry_posts != "." && $maj_entry_cat2_c_entry_posts != "..") {
- if (file_exists("data/categories/$maj_entry_cat2_c_entry_posts/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_cat2_c_entry_posts);
- }
- }
- 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")) {
- continue;
- }
- if ($maj_c_entry_posts != "." && $maj_c_entry_posts != "..") {
- if (file_exists("data/members/active/$maj_c_author") and file_exists("data/bb.txt")) {
- 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)) {
- $maj_c_items_posts[] = $maj_c_entry_posts;
- }
- }
- 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")) {
- 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)) {
- $maj_c_items_posts[] = $maj_c_entry_posts;
- }
- }
- }
- }
- closedir($maj_c_dh_posts);
- }
- $maj_c_posts = count($maj_c_items_posts);
- if ($maj_c_posts == 1) {
- echo "$maj_c_posts post";
- }
- if ($maj_c_posts > 1) {
- echo "$maj_c_posts posts";
- }
- unset($maj_c_items_posts);
- echo "</td><td width=513 valign=top>";
- }
- else {
- echo "<td width=598 valign=top>";
- }
- echo "<font style=\"font-size: $maj_font_10px; color: #999999;\">";
- 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"))))) {
- $maj_cxavatar_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
- echo "<a href=member.php?id=$maj_cxavatar_author>$maj_cxavatar_author</a> - ";
- }
- entry2date($maj_comment);
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- if (file_exists("data/items/$maj_d/comments/live/$maj_comment/revisions.txt")) {
- echo ' (Revision ';
- readfile("data/items/$maj_d/comments/live/$maj_comment/revisions.txt");
- echo ')';
- }
- }
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- $maj_entry_comment = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/comment.txt");
- 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"))))) {
- $maj_badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $maj_censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $maj_censor = "[expletive]";
- }
- $maj_entry_comment = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_entry_comment);
- }
- echo $maj_entry_comment;
- echo '</tr></table></div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- unset($maj_show_comments);
- echo '</td></tr></table>';
- if (isset($_SESSION['logged_in'])) {
- if (($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and file_exists("data/comments/unread/$maj_d")) {
- rmdirr("data/comments/unread/$maj_d");
- if (count(glob("data/comments/unread/*")) < 1) {
- rmdirr("data/comments/unread");
- }
- }
- else {
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_d")) {
- rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread/$maj_d");
- if (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) < 1) {
- rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread");
- }
- }
- }
- }
- }
- if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
- 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']}")))) {
- 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']))) {
- 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>";
- }
- }
- echo "<font style=\"font-size: $maj_font_12px;\"><b>Add Comment</b></font>";
- 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))) {
- 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>";
- }
- else {
- $maj_captcha_rand = str_rand(7);
- echo "<p>Fill out the form below";
- if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
- echo " and enter <b>$maj_captcha_rand</b> in the CAPTCHA field";
- }
- echo " to add your comment.";
- 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")))) {
- echo " Note that it will not be posted immediately, but will be ";
- if (file_exists("data/email.txt")) {
- echo "e-mailed";
- }
- else {
- echo "sent";
- }
- echo " to me first.";
- if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
- echo " Comments with bogus contact information will be discarded.";
- }
- }
- echo "</p>";
- ?>
- <table border=0 cellspacing=2 cellpadding=0 width=500>
- <form enctype="multipart/form-data" action="index.php?entry=<?php echo $maj_d; ?>&show=comments" method="post">
- <input type=hidden name=captcha_get value="<?php echo $maj_captcha_rand; ?>">
- <tr>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- ?>
- <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>
- <?php
- }
- 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")) {
- ?>
- <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>
- <?php
- }
- else {
- ?>
- <td width=75><nobr>First Name*</nobr></td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
- <?php
- }
- ?>
- <td rowspan=7 valign=top width=75 align=right>
- <table border=0 cellspacing=1 cellpadding=2>
- <tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
- <tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
- <tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
- <tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
- <tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
- <tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
- <tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
- <tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
- <tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
- <tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
- </td></tr>
- </table>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- ?>
- <td width=75></td><td><input type=hidden name=lastname value="<?php echo trim(str_replace(",","",$maj_logged_in_author[1])); ?>"></td>
- <?php
- }
- 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")) {
- ?>
- <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>
- <?php
- }
- else {
- ?>
- <tr><td><nobr>Last Name*</nobr></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
- <?php
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- if (file_exists("data/email.txt")) {
- ?>
- <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
- <?php
- }
- else {
- echo "<tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
- }
- }
- 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")) {
- ?>
- <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>
- <?php
- }
- else {
- ?>
- <tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
- <?php
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- ?>
- <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
- <?php
- }
- 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")) {
- ?>
- <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>
- <?php
- }
- else {
- ?>
- <tr><td><nobr>Website</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
- <?php
- }
- ?>
- <tr><td><nobr>Comment*</nobr></td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- echo "<input type=hidden name=captcha_put value=\"$maj_captcha_rand\">";
- }
- else {
- echo "<tr><td><nobr>CAPTCHA*</nobr></td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
- }
- ?>
- <tr><td></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
- </form>
- </table>
- <?php
- }
- ?>
- </td></tr></table>
- <?php
- }
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and isset($maj_req_entry) and !empty($maj_req_entry)) {
- if ($maj_dh_pending_comments = opendir("data/items/$maj_d/comments/pending")) {
- while (($maj_entry_pending_comments = readdir($maj_dh_pending_comments)) !== false) {
- if ($maj_entry_pending_comments != "." && $maj_entry_pending_comments != "..") {
- $maj_show_pending_comments[] = $maj_entry_pending_comments;
- }
- }
- closedir($maj_dh_pending_comments);
- }
- asort($maj_show_pending_comments);
- reset($maj_show_pending_comments);
- $maj_count_pending_comments = count($maj_show_pending_comments);
- if ($maj_count_pending_comments > 0) {
- if ($maj_count_pending_comments == 1) {
- echo '<p><b>Pending Comment</b></p>';
- }
- else {
- echo '<p><b>Pending Comments</b></p>';
- }
- foreach ($maj_show_pending_comments as $maj_pending_comment) {
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
- echo '<a target=_maj href=';
- readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt");
- echo '>';
- }
- readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/firstname.txt");
- echo ' ';
- readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/lastname.txt");
- if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
- echo '</a>';
- }
- echo ' <';
- readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/email.txt");
- echo '>';
- 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>';
- $maj_pending_comment_key_file = "data/items/$maj_d/comments/pending/$maj_pending_comment/key.txt";
- $maj_pending_comment_login_key = fread($maj_open_pending_comment_key_file,filesize($maj_pending_comment_key_file));
- 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>";
- 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>";
- 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>';
- echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
- 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")) {
- echo "<td width=85 valign=top>";
- $maj_pc_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
- echo "<a href=member.php?id=$maj_pc_author>";
- 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"))) {
- if (file_exists("images/avatar.gif")) {
- $maj_pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
- $maj_pc_avatar_gif_image_width = $maj_pc_avatar_gif_image_size[0];
- $maj_pc_avatar_gif_image_height = $maj_pc_avatar_gif_image_size[1];
- $maj_pc_max_avatar_gif_image_width = 80;
- if ($maj_pc_avatar_gif_image_width > $maj_pc_max_avatar_gif_image_width) {
- $maj_sizefactor = (double) ($maj_pc_max_avatar_gif_image_width / $maj_pc_avatar_gif_image_width) ;
- $maj_pc_avatar_gif_image_width = (int) ($maj_pc_avatar_gif_image_width * $maj_sizefactor);
- $maj_pc_avatar_gif_image_height = (int) ($maj_pc_avatar_gif_image_height * $maj_sizefactor);
- }
- echo "<img src=images/avatar.gif border=0 width=";
- echo $maj_pc_avatar_gif_image_width;
- echo " height=";
- echo $maj_pc_avatar_gif_image_height;
- }
- if (file_exists("images/avatar.jpg")) {
- $maj_pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
- $maj_pc_avatar_jpg_image_width = $maj_pc_avatar_jpg_image_size[0];
- $maj_pc_avatar_jpg_image_height = $maj_pc_avatar_jpg_image_size[1];
- $maj_pc_max_avatar_jpg_image_width = 80;
- if ($maj_pc_avatar_jpg_image_width > $maj_pc_max_avatar_jpg_image_width) {
- $maj_sizefactor = (double) ($maj_pc_max_avatar_jpg_image_width / $maj_pc_avatar_jpg_image_width) ;
- $maj_pc_avatar_jpg_image_width = (int) ($maj_pc_avatar_jpg_image_width * $maj_sizefactor);
- $maj_pc_avatar_jpg_image_height = (int) ($maj_pc_avatar_jpg_image_height * $maj_sizefactor);
- }
- echo "<img src=images/avatar.jpg border=0 width=";
- echo $maj_pc_avatar_jpg_image_width;
- echo " height=";
- echo $maj_pc_avatar_jpg_image_height;
- }
- if (file_exists("images/avatar.png")) {
- $maj_pc_avatar_png_image_size = getimagesize("images/avatar.png");
- $maj_pc_avatar_png_image_width = $maj_pc_avatar_png_image_size[0];
- $maj_pc_avatar_png_image_height = $maj_pc_avatar_png_image_size[1];
- $maj_pc_max_avatar_png_image_width = 80;
- if ($maj_pc_avatar_png_image_width > $maj_pc_max_avatar_png_image_width) {
- $maj_sizefactor = (double) ($maj_pc_max_avatar_png_image_width / $maj_pc_avatar_png_image_width) ;
- $maj_pc_avatar_png_image_width = (int) ($maj_pc_avatar_png_image_width * $maj_sizefactor);
- $maj_pc_avatar_png_image_height = (int) ($maj_pc_avatar_png_image_height * $maj_sizefactor);
- }
- echo "<img src=images/avatar.png border=0 width=";
- echo $maj_pc_avatar_png_image_width;
- echo " height=";
- echo $maj_pc_avatar_png_image_height;
- }
- echo "><br>";
- }
- 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")) {
- if (file_exists("images/members/$maj_pc_author/avatar.gif")) {
- $maj_pc_avatar_gif_image_size = getimagesize("images/members/$maj_pc_author/avatar.gif");
- $maj_pc_avatar_gif_image_width = $maj_pc_avatar_gif_image_size[0];
- $maj_pc_avatar_gif_image_height = $maj_pc_avatar_gif_image_size[1];
- $maj_pc_max_avatar_gif_image_width = 80;
- if ($maj_pc_avatar_gif_image_width > $maj_pc_max_avatar_gif_image_width) {
- $maj_sizefactor = (double) ($maj_pc_max_avatar_gif_image_width / $maj_pc_avatar_gif_image_width) ;
- $maj_pc_avatar_gif_image_width = (int) ($maj_pc_avatar_gif_image_width * $maj_sizefactor);
- $maj_pc_avatar_gif_image_height = (int) ($maj_pc_avatar_gif_image_height * $maj_sizefactor);
- }
- echo "<img src=images/members/$maj_pc_author/avatar.gif border=0 width=";
- echo $maj_pc_avatar_gif_image_width;
- echo " height=";
- echo $maj_pc_avatar_gif_image_height;
- }
- if (file_exists("images/members/$maj_pc_author/avatar.jpg")) {
- $maj_pc_avatar_jpg_image_size = getimagesize("images/members/$maj_pc_author/avatar.jpg");
- $maj_pc_avatar_jpg_image_width = $maj_pc_avatar_jpg_image_size[0];
- $maj_pc_avatar_jpg_image_height = $maj_pc_avatar_jpg_image_size[1];
- $maj_pc_max_avatar_jpg_image_width = 80;
- if ($maj_pc_avatar_jpg_image_width > $maj_pc_max_avatar_jpg_image_width) {
- $maj_sizefactor = (double) ($maj_pc_max_avatar_jpg_image_width / $maj_pc_avatar_jpg_image_width) ;
- $maj_pc_avatar_jpg_image_width = (int) ($maj_pc_avatar_jpg_image_width * $maj_sizefactor);
- $maj_pc_avatar_jpg_image_height = (int) ($maj_pc_avatar_jpg_image_height * $maj_sizefactor);
- }
- echo "<img src=images/members/$maj_pc_author/avatar.jpg border=0 width=";
- echo $maj_pc_avatar_jpg_image_width;
- echo " height=";
- echo $maj_pc_avatar_jpg_image_height;
- }
- if (file_exists("images/members/$maj_pc_author/avatar.png")) {
- $maj_pc_avatar_png_image_size = getimagesize("images/members/$maj_pc_author/avatar.png");
- $maj_pc_avatar_png_image_width = $maj_pc_avatar_png_image_size[0];
- $maj_pc_avatar_png_image_height = $maj_pc_avatar_png_image_size[1];
- $maj_pc_max_avatar_png_image_width = 80;
- if ($maj_pc_avatar_png_image_width > $maj_pc_max_avatar_png_image_width) {
- $maj_sizefactor = (double) ($maj_pc_max_avatar_png_image_width / $maj_pc_avatar_png_image_width) ;
- $maj_pc_avatar_png_image_width = (int) ($maj_pc_avatar_png_image_width * $maj_sizefactor);
- $maj_pc_avatar_png_image_height = (int) ($maj_pc_avatar_png_image_height * $maj_sizefactor);
- }
- echo "<img src=images/members/$maj_pc_author/avatar.png border=0 width=";
- echo $maj_pc_avatar_png_image_width;
- echo " height=";
- echo $maj_pc_avatar_png_image_height;
- }
- echo "><br>";
- }
- echo "$maj_pc_author</a><br>";
- if ((file_get_contents("data/username.txt") == $maj_pc_author) and file_exists("data/rank.txt")) {
- echo "administrator<br>";
- }
- elseif (file_exists("data/members/active/$maj_pc_author/rank.txt") and file_exists("data/rank.txt")) {
- $maj_pc_rank = file_get_contents("data/members/active/$maj_pc_author/rank.txt");
- echo "$maj_pc_rank<br>";
- }
- elseif (!file_exists("data/members/active/$maj_pc_author/rank.txt") and file_exists("data/rank.txt")) {
- echo "member<br>";
- }
- if ($maj_pc_dh_posts = opendir("data/items")) {
- while (($maj_pc_entry_posts = readdir($maj_pc_dh_posts)) !== false) {
- if (file_exists("data/items/$maj_pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- if (file_exists("data/items/$maj_pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_entry_pc_entry_posts/categories")) {
- if ($maj_dh_cat2_pc_entry_posts = opendir("data/items/$maj_entry_pc_entry_posts/categories")) {
- while (($maj_entry_cat2_pc_entry_posts = readdir($maj_dh_cat2_pc_entry_posts)) !== false) {
- if ($maj_entry_cat2_pc_entry_posts != "." && $maj_entry_cat2_pc_entry_posts != "..") {
- if (file_exists("data/categories/$maj_entry_cat2_pc_entry_posts/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_cat2_pc_entry_posts);
- }
- }
- 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")) {
- continue;
- }
- if ($maj_pc_entry_posts != "." && $maj_pc_entry_posts != "..") {
- if (file_exists("data/members/active/$maj_pc_author") and file_exists("data/bb.txt")) {
- 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)) {
- $maj_pc_items_posts[] = $maj_pc_entry_posts;
- }
- }
- 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")) {
- 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)) {
- $maj_pc_items_posts[] = $maj_pc_entry_posts;
- }
- }
- }
- }
- closedir($maj_pc_dh_posts);
- }
- $maj_pc_posts = count($maj_pc_items_posts);
- if ($maj_pc_posts == 1) {
- echo "$maj_pc_posts post";
- }
- if ($maj_pc_posts > 1) {
- echo "$maj_pc_posts posts";
- }
- unset($maj_pc_items_posts);
- echo "</td><td width=513 valign=top>";
- }
- else {
- echo "<td width=598 valign=top>";
- }
- echo "<font style=\"font-size: $maj_font_10px; color: #999999;\">";
- 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"))))) {
- $maj_pxavatar_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
- echo "<a href=member.php?id=$maj_pxavatar_author>$maj_pxavatar_author</a> - ";
- }
- readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/timestamp.txt");
- if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt")) {
- echo ' (Revision ';
- readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt");
- echo ')';
- }
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/comment.txt");
- echo '</tr></table></div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- unset($maj_show_pending_comments);
- echo '</td></tr></table>';
- }
- }
- }
- }
- ?>
- <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
- <?php
- if (($maj_start >= $maj_increase) and ($maj_start != 0)) {
- echo "<td align=left><a href=\"index.php?";
- if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
- echo "category=$maj_req_category";
- }
- if (isset($maj_req_archive) and !empty($maj_req_archive)) {
- echo "archive=$maj_req_archive";
- }
- 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")) {
- echo "author=$maj_req_author";
- }
- 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")) {
- echo "author=$maj_req_author";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "private")) {
- echo "find=private";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "member")) {
- echo "find=member";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "unfiled")) {
- echo "find=unfiled";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "passwd")) {
- echo "find=passwd";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "comments")) {
- echo "find=comments";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "album")) {
- echo "find=album";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "filedrop")) {
- echo "find=filedrop";
- }
- echo "&start=" . ($maj_start-$maj_increase) . "\">previous</a></td>";
- }
- if ($maj_end < sizeof($maj_items)) {
- echo "<td align=right><a href=\"index.php?";
- if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
- echo "category=$maj_req_category";
- }
- if (isset($maj_req_archive) and !empty($maj_req_archive)) {
- echo "archive=$maj_req_archive";
- }
- 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")) {
- echo "author=$maj_req_author";
- }
- 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")) {
- echo "author=$maj_req_author";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "private")) {
- echo "find=private";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "member")) {
- echo "find=member";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "unfiled")) {
- echo "find=unfiled";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "passwd")) {
- echo "find=passwd";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "comments")) {
- echo "find=comments";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "album")) {
- echo "find=album";
- }
- if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "filedrop")) {
- echo "find=filedrop";
- }
- echo "&start=" . ($maj_start+$maj_increase) . "\">next</a></td>";
- }
- // right side
- echo "</tr></table></td><td width=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td><td width=\"$maj_wside\" valign=\"top\">";
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- if ($maj_dh_pending_comment_flags = opendir("data/comments/pending")) {
- while (($maj_entry_pending_comment_flags = readdir($maj_dh_pending_comment_flags)) !== false) {
- if ($maj_entry_pending_comment_flags != "." && $maj_entry_pending_comment_flags != "..") {
- $maj_show_pending_comment_flags[] = $maj_entry_pending_comment_flags;
- }
- }
- closedir($maj_dh_pending_comment_flags);
- }
- rsort($maj_show_pending_comment_flags);
- reset($maj_show_pending_comment_flags);
- $maj_count_pending_comment_flags = count($maj_show_pending_comment_flags);
- if (($maj_count_latest > 0) and ($maj_count_pending_comment_flags > 0)) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'Pending Comments</div>';
- echo '<div class="panel_body">';
- if ($maj_dh_list_pending_comment_flags = opendir("data/comments/pending")) {
- while (($maj_entry_list_pending_comment_flags = readdir($maj_dh_list_pending_comment_flags)) !== false) {
- if ($maj_entry_list_pending_comment_flags != "." && $maj_entry_list_pending_comment_flags != "..") {
- echo "<a href=\"index.php?entry=$maj_entry_list_pending_comment_flags&show=comments\">";
- readfile("data/items/$maj_entry_list_pending_comment_flags/title.txt");
- echo "</a><br><font style=\"font-size: $maj_font_10px; color: #999999;\">";
- $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt","r");
- $maj_comment_count_value = fread($maj_fp_comment_count_txt,filesize("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt"));
- if ($maj_comment_count_value == 1) {
- echo ' ( ' . $maj_comment_count_value . ' comment ) ';
- }
- elseif ($maj_comment_count_value > 1) {
- echo ' ( ' . $maj_comment_count_value . ' comments ) ';
- }
- else {
- echo '';
- }
- echo '</font><br>';
- }
- }
- closedir($maj_dh_list_pending_comment_flags);
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- if (!file_exists("data/xucomment.txt") and isset($_SESSION['logged_in'])) {
- if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
- if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
- if ($maj_dh_unread_comments = opendir("data/comments/unread")) {
- while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
- if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
- $maj_unread_comments[] = $maj_unread_comment;
- }
- }
- closedir($maj_dh_unread_comments);
- }
- }
- }
- else {
- if (file_exists("data/members/active/{$_SESSION['logged_in']}")) {
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread") and (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) > 0)) {
- if ($maj_dh_unread_comments = opendir("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
- while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
- if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
- $maj_unread_comments[] = $maj_unread_comment;
- }
- }
- closedir($maj_dh_unread_comments);
- }
- }
- }
- }
- sort($maj_unread_comments);
- reset($maj_unread_comments);
- if (count($maj_unread_comments) > 0) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'Unread Comments</div><div class=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
- foreach ($maj_unread_comments as $maj_unread_comment) {
- $maj_unread_comment_title = file_get_contents("data/items/$maj_unread_comment/title.txt");
- echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$maj_unread_comment&show=comments\">$maj_unread_comment_title</a></td></tr>";
- }
- echo '</table></div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- 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")) {
- if ($maj_dh_pending_list = opendir("data/members/confirmed")) {
- while (($maj_entry_pending_list = readdir($maj_dh_pending_list)) !== false) {
- if ($maj_entry_pending_list != "." && $maj_entry_pending_list != "..") {
- $maj_show_pending_list[] = $maj_entry_pending_list;
- }
- }
- closedir($maj_dh_pending_list);
- }
- sort($maj_show_pending_list);
- reset($maj_show_pending_list);
- $maj_count_pending_list = count($maj_show_pending_list);
- if ($maj_count_pending_list > 0) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo "Pending Member";
- if ($maj_count_pending_list > 1) {
- echo "s";
- }
- echo "</div><div class=panel_body>Please approve or deny $maj_count_pending_list pending membership request";
- if ($maj_count_pending_list > 1) {
- echo "s";
- }
- echo " below.</div>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- foreach ($maj_show_pending_list as $maj_pending_list_entry) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo "$maj_pending_list_entry";
- echo '<a href=reg.php?username=';
- echo $maj_pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
- 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=';
- echo $maj_pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
- echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
- echo "<div class=panel_body>";
- if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
- echo "<a href=\"";
- readfile("data/members/confirmed/$maj_pending_list_entry/url.txt");
- echo "\" target=_pending>";
- }
- readfile("data/members/confirmed/$maj_pending_list_entry/firstname.txt");
- echo " ";
- readfile("data/members/confirmed/$maj_pending_list_entry/lastname.txt");
- if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
- echo "</a>";
- }
- echo "<br>";
- $maj_pending_email = file_get_contents("data/members/confirmed/$maj_pending_list_entry/email.txt");
- $maj_pending_email = wordwrap($maj_pending_email,30);
- echo $maj_pending_email;
- if (file_exists("data/members/confirmed/$maj_pending_list_entry/timestamp.txt")) {
- $maj_confirmed = file_get_contents("data/members/confirmed/$maj_pending_list_entry/timestamp.txt");
- $maj_confirmed_year = substr($maj_confirmed,0,4);
- $maj_confirmed_month = substr($maj_confirmed,4,2);
- $maj_confirmed_day = substr($maj_confirmed,6,2);
- $maj_confirmed_hh = substr($maj_confirmed,8,2);
- $maj_confirmed_mm = substr($maj_confirmed,10,2);
- $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));
- echo "<br>$maj_email_confirmed";
- }
- echo "</div>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- }
- if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo "Bulletin Board</div><div class=panel_body>";
- if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
- if ($maj_dh_active_list = opendir("data/members/active")) {
- while (($maj_entry_active_list = readdir($maj_dh_active_list)) !== false) {
- if ($maj_entry_active_list != "." && $maj_entry_active_list != "..") {
- $maj_show_active_list[] = $maj_entry_active_list;
- }
- }
- closedir($maj_dh_active_list);
- }
- sort($maj_show_active_list);
- reset($maj_show_active_list);
- $maj_count_active_list = count($maj_show_active_list);
- if ($maj_count_active_list > 0) {
- echo "Registered Members: $maj_count_active_list";
- }
- }
- if (file_exists("data/items")) {
- if ($maj_dh_mempost_list = opendir("data/items")) {
- while (($maj_entry_mempost_list = readdir($maj_dh_mempost_list)) !== false) {
- if (file_exists("data/items/$maj_entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- $maj_private_categories = "0";
- if (file_exists("data/items/$maj_entry_mempost_list/categories")) {
- if ($maj_dh_entry_categories_mempost_list = opendir("data/items/$maj_entry_mempost_list/categories")) {
- while (($maj_entry_category_mempost_list = readdir($maj_dh_entry_categories_mempost_list)) !== false) {
- if ($maj_entry_category_mempost_list != "." && $maj_entry_category_mempost_list != "..") {
- if (file_exists("data/categories/$maj_entry_category_mempost_list/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
- }
- }
- closedir($maj_dh_entry_categories_mempost_list);
- }
- }
- 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")) {
- continue;
- }
- if ($maj_entry_mempost_list != "." && $maj_entry_mempost_list != "..") {
- $maj_entry_mempost_list = substr("$maj_entry_mempost_list",0,6);
- $maj_show_mempost_list[] = $maj_entry_mempost_list;
- }
- }
- closedir($maj_dh_mempost_list);
- }
- rsort($maj_show_mempost_list);
- $maj_count_mempost_list = count($maj_show_mempost_list);
- echo "<br>Total Posts: $maj_count_mempost_list";
- unset($maj_show_mempost_list);
- }
- if (file_exists("data/bb-new.txt")) {
- $maj_bb_new = file_get_contents("data/bb-new.txt");
- echo "<br>Newest User: <a href=member.php?id=$maj_bb_new>$maj_bb_new</a>";
- }
- if (file_exists("data/bb-last.txt")) {
- $maj_bb_last = file_get_contents("data/bb-last.txt");
- echo "<br>Latest Login: <a href=member.php?id=$maj_bb_last>$maj_bb_last</a>";
- }
- echo "</div>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- if ($maj_count_grand > 0) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- ?>
- Search</div>
- <form enctype="multipart/form-data" action="dig.php" method="post">
- <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
- </form>
- </div>
- <?php
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo "Find Entries</div><div class=panel_body>";
- echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
- if (file_exists("data/bb.txt")) {
- echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
- }
- echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
- echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
- echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
- echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
- echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
- echo "</div>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- if (file_exists("data/categories")) {
- if ($maj_dh_categories = opendir("data/categories")) {
- while (($maj_entry_categories = readdir($maj_dh_categories)) !== false) {
- if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- if (file_exists("data/categories/$maj_entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
- continue;
- }
- if ($maj_entry_categories != "." && $maj_entry_categories != "..") {
- $maj_show_categories[] = $maj_entry_categories;
- }
- }
- closedir($maj_dh_categories);
- }
- sort($maj_show_categories);
- reset($maj_show_categories);
- $maj_count_categories = count($maj_show_categories);
- if ($maj_count_categories > 0) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'Categories</div><div class=panel_body>';
- foreach ($maj_show_categories as $maj_category) {
- echo "<a class=\"navlink\" href=\"index.php?category=$maj_category\">";
- if (file_exists("data/categories/$maj_category/title.txt")) {
- $maj_category_title = file_get_contents("data/categories/$maj_category/title.txt");
- }
- else {
- $maj_category_title = ucfirst(str_replace("_"," ",$maj_category));
- }
- echo $maj_category_title;
- echo "</a><br>";
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'Statistics</div><div class=panel_body>';
- echo "Total Entries: $maj_count_latest";
- if (file_exists("data/hits.txt")) {
- echo '<br>Site Hits: ';
- readfile("data/hits.txt");
- }
- if (file_exists("data/google.txt")) {
- echo '<br>Google Visits: ';
- readfile("data/google.txt");
- }
- if (file_exists("data/rss-0.91.txt")) {
- echo '<br>RSS 0.91 Hits: ';
- readfile("data/rss-0.91.txt");
- }
- if (file_exists("data/rss-1.0.txt")) {
- echo '<br>RSS 1.0 Hits: ';
- readfile("data/rss-1.0.txt");
- }
- if (file_exists("data/rss-2.0.txt")) {
- echo '<br>RSS 2.0 Hits: ';
- readfile("data/rss-2.0.txt");
- }
- if (file_exists("data/sitemap.txt")) {
- echo '<br>Sitemap Requests: ';
- readfile("data/sitemap.txt");
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo 'Recent Entries</div><div class=panel_body>';
- $maj_increment_recent_entries = "0";
- if ($maj_count_latest < 10) {
- $maj_max_recent_entries = $maj_count_latest;
- }
- else {
- $maj_max_recent_entries = "10";
- }
- while ($maj_increment_recent_entries < $maj_max_recent_entries) {
- echo "<a class=\"navlink\" href=\"index.php?entry=$maj_latest[$maj_increment_recent_entries]\">";
- readfile("data/items/$maj_latest[$maj_increment_recent_entries]/title.txt");
- echo "</a><br>";
- $maj_increment_recent_entries = $maj_increment_recent_entries + 1;
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- if ($maj_count_albums > 0) {
- if (file_exists("data/round.txt")) {
- echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
- }
- else {
- echo "<div class=\"panel_title\">";
- }
- echo "Albums</div><div class=\"panel_body\">";
- foreach ($maj_albums as $maj_album) {
- echo "<a class=\"navlink\" href=\"index.php?entry=$maj_album&show=album\">";
- readfile("data/items/$maj_album/title.txt");
- echo "</a><br>";
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- if (!file_exists("data/xrand.txt")) {
- shuffle($maj_random);
- reset($maj_random);
- if (file_exists("data/increase.txt")) {
- $maj_limit_random = file_get_contents("data/increase.txt");
- }
- else {
- $maj_limit_random = 5;
- }
- if ($maj_count_random > $maj_limit_random) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div class="panel_title">';
- }
- echo "Random Entries</div><div class=\"panel_body\">";
- $maj_increment_random = 0;
- if ($maj_count_random <= $maj_limit_random * 2) {
- $maj_show_random = $maj_count_random - 1;
- }
- else {
- $maj_show_random = $maj_limit_random * 2 - 1;
- }
- while ($maj_increment_random <= $maj_show_random) {
- echo "<a class=\"navlink\" href=\"index.php?entry={$maj_random[$maj_increment_random]}\">";
- readfile("data/items/$maj_random[$maj_increment_random]/title.txt");
- echo "</a><br>";
- $maj_increment_random = $maj_increment_random + 1;
- }
- }
- if ($maj_count_random > $maj_limit_random) {
- echo "</div>";
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- ?>
- <?php
- 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']))) {
- $maj_archive_entries = implode(" ",$maj_archives);
- $maj_unique_archive_list = array_unique($maj_archives);
- if (file_exists("data/round.txt")) {
- echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
- }
- else {
- echo "<div class=\"panel_title\">";
- }
- echo "Archives ($maj_count_archives)</div>";
- echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
- foreach ($maj_unique_archive_list as $maj_archive_list_entry) {
- $maj_archive_list_value = substr($maj_archive_list_entry,0,6);
- $maj_archive_list_year = substr($maj_archive_list_entry,0,4);
- $maj_archive_list_month = substr($maj_archive_list_entry,4,2);
- $maj_archive_list_num = substr_count($maj_archive_entries,$maj_archive_list_entry);
- 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>";
- }
- echo "</table></div>";
- if (file_exists("data/round.txt")) {
- echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
- }
- }
- if ($maj_count_right_panels > 0) {
- foreach ($maj_right_panels as $maj_right_panel) {
- if (!file_exists("data/panels/$maj_right_panel/free.txt")) {
- if (file_exists("data/panels/$maj_right_panel/border.txt")) {
- $maj_right_panel_border = file_get_contents("data/panels/$maj_right_panel/border.txt");
- }
- else {
- if (isset($maj_right_panel_border)) {
- unset($maj_right_panel_border);
- }
- }
- if (file_exists("data/panels/$maj_right_panel/bgcolor-t.txt")) {
- $maj_right_panel_bgcolor_t = file_get_contents("data/panels/$maj_right_panel/bgcolor-t.txt");
- }
- else {
- if (isset($maj_right_panel_bgcolor_t)) {
- unset($maj_right_panel_bgcolor_t);
- }
- }
- if (file_exists("data/panels/$maj_right_panel/bgcolor-c.txt")) {
- $maj_right_panel_bgcolor_c = file_get_contents("data/panels/$maj_right_panel/bgcolor-c.txt");
- }
- else {
- if (isset($maj_right_panel_bgcolor_c)) {
- unset($maj_right_panel_bgcolor_c);
- }
- }
- if (file_exists("data/panels/$maj_right_panel/text-t.txt")) {
- $maj_right_panel_text_t = file_get_contents("data/panels/$maj_right_panel/text-t.txt");
- }
- else {
- if (isset($maj_right_panel_text_t)) {
- unset($maj_right_panel_text_t);
- }
- }
- if (file_exists("data/panels/$maj_right_panel/text-c.txt")) {
- $maj_right_panel_text_c = file_get_contents("data/panels/$maj_right_panel/text-c.txt");
- }
- else {
- if (isset($maj_right_panel_text_c)) {
- unset($maj_right_panel_text_c);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($maj_right_panel_border)) {
- echo " style=\"background-color: $maj_right_panel_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_t)) {
- echo "background-color: $maj_right_panel_bgcolor_t;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_t)) {
- echo "background-color: $maj_right_panel_bgcolor_t;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_t)) {
- echo "background-color: $maj_right_panel_bgcolor_t;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_t)) {
- echo "background-color: $maj_right_panel_bgcolor_t;";
- }
- if (isset($maj_right_panel_text_t)) {
- echo "color: $maj_right_panel_text_t;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div class="panel_title"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_t)) {
- echo "background-color: $maj_right_panel_bgcolor_t;";
- }
- if (isset($maj_right_panel_text_t)) {
- echo "color: $maj_right_panel_text_t;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_t) or isset($maj_right_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/panels/$maj_right_panel/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo "<a href=\"panels.php#{$maj_right_panel}\">";
- echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
- }
- if (file_exists("data/panels/$maj_right_panel/private.txt")) {
- echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
- }
- echo '</div>';
- echo '<div class="panel_body"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c) or isset($maj_right_panel_text_c)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_c)) {
- echo "background-color: $maj_right_panel_bgcolor_c;";
- }
- if (isset($maj_right_panel_text_c)) {
- echo "color: $maj_right_panel_text_c;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c) or isset($maj_right_panel_text_c)) {
- echo '"';
- }
- echo '>';
- }
- if (file_exists("data/panels/$maj_right_panel/free.txt")) {
- echo '<div class=panel_free>';
- }
- include("data/panels/$maj_right_panel/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$maj_right_panel/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_c)) {
- echo "background-color: $maj_right_panel_bgcolor_c;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb3b"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_c)) {
- echo "background-color: $maj_right_panel_bgcolor_c;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb2b"';
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($maj_right_panel_bgcolor_c)) {
- echo "background-color: $maj_right_panel_bgcolor_c;";
- }
- if (isset($maj_right_panel_border)) {
- echo "border-color: $maj_right_panel_border;";
- }
- if (isset($maj_right_panel_border) or isset($maj_right_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb1b"';
- if (isset($maj_right_panel_border)) {
- echo " style=\"background-color: $maj_right_panel_border;\"";
- }
- echo '></b></b>';
- }
- }
- }
- if ($maj_count_latest > 0) {
- echo '<table border="0" cellspacing="2" cellpadding="0" width="100%">';
- 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>';
- 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>';
- $maj_validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $maj_validate_uri = str_replace('//','/',$maj_validate_uri);
- $maj_validate_uri = "http://" . $maj_validate_uri;
- 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>';
- 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>';
- 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>';
- 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>';
- 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>';
- if (file_exists("data/sfx.txt")) {
- $maj_sfx = file_get_contents("data/sfx.txt");
- 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>";
- }
- echo '</table>';
- }
- echo "</td></tr>";
- 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>";
- echo "</table>";
- if (file_exists("data/footer.txt")) {
- $maj_footer_panel = file_get_contents("data/footer.txt");
- if (file_exists("data/panels/$maj_footer_panel") and (!file_exists("data/panels/$maj_footer_panel/private.txt") or isset($_SESSION['logged_in']))) {
- include("data/panels/$maj_footer_panel/panel.php");
- }
- }
- if (file_exists("data/center.txt")) {
- echo "</center>";
- }
- ?>