This blob has been accessed 503 times via Git panel.
- <?php
- ini_set("session.use_trans_sid", 0);
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- if (get_magic_quotes_gpc()) {
- function stripslashes_array($data) {
- if (is_array($data)){
- foreach ($data as $key => $value){
- $data[$key] = stripslashes_array($value);
- }
- return $data;
- }
- else{
- return stripslashes($data);
- }
- }
- $_REQUEST = stripslashes_array($_REQUEST);
- }
- $dir = "data/items";
- $default_title = file_get_contents("data/title.txt");
- if (file_exists("data/offset.txt")) {
- $offset = file_get_contents("data/offset.txt");
- }
- else {
- $offset = 0;
- }
- if (file_exists("data/increase.txt")) {
- $increase = file_get_contents("data/increase.txt");
- }
- else {
- $increase = 5;
- }
- $default_blog_title = "My Activity Journal";
- $default_username = "maj";
- $default_password = "php";
- $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>GPL</a>'ed blog written from scratch as a spare time family project by <a href=http://engels.mortega.net/ target=_maj>Engels</a>, <a href=http://gaffud.com/ target=_maj>Magie</a>, and <a href=http://psylocke.org/ target=_maj>Psylocke</a> Antonio.";
- $default_blog_author = "My Activity Journal";
- if (!file_exists("data")) {
- mkdir("data");
- }
- if (!file_exists("data/.htaccess")) {
- $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")) {
- $default_password = sha1($default_password);
- $default_password = md5($default_password);
- $default_password = crypt($default_password, $default_password);
- }
- if (!file_exists("data/profile.php")) {
- }
- if (!file_exists("data/author.txt")) {
- }
- $login_username = file_get_contents("data/username.txt");
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $global_hits_count = $global_hits_count + 1;
- }
- $agent = $_SERVER['HTTP_USER_AGENT'];
- if (@ereg("Google", $agent)) {
- $google_hits_count = $google_hits_count + 1;
- }
- function str_rand($length = 8, $seeds = 'abcdefghijklmnopqrstuvwxyz0123456789')
- {
- $str = '';
- list($usec, $sec) = explode(' ', microtime());
- $seed = (float) $sec + ((float) $usec * 100000);
- mt_srand($seed);
- for ($i = 0; $length > $i; $i++) {
- $str .= $seeds{mt_rand(0, $seeds_count - 1)};
- }
- return $str;
- }
- function rmdirr($recurse_dirname)
- {
- if (!file_exists($recurse_dirname)) {
- return false;
- }
- if (is_file($recurse_dirname)) {
- return unlink($recurse_dirname);
- }
- $recurse_dir = dir($recurse_dirname);
- while (false !== $recurse_entry = $recurse_dir->read()) {
- if ($recurse_entry == '.' || $recurse_entry == '..') {
- continue;
- }
- rmdirr("$recurse_dirname/$recurse_entry");
- }
- $recurse_dir->close();
- return rmdir($recurse_dirname);
- }
- if (isset($_REQUEST['download']) and !empty($_REQUEST['download'])) {
- ini_set('zlib.output_compression','off');
- $file = str_replace('../','', @$_REQUEST['download']);
- go_download($file);
- die();
- }
- function go_download($dl_file) {
- $d = $_REQUEST['entry'];
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == pdf)) {
- $dl_path = "data/items/$d/pdf/file";
- $count_path = "data/items/$d/pdf/count";
- $count_file = "dl.txt";
- }
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == filedrop)) {
- $dl_path = "data/items/$d/filedrop/files";
- $count_path = "data/items/$d/filedrop/count";
- $count_file = "{$dl_file}.txt";
- }
- header("Cache-Control: ");
- header("Pragma: ");
- header("Content-type: application/octet-stream");
- header("Content-Disposition: attachment; filename=\"" . $dl_file . "\"");
- header("Content-length: " . filesize("$dl_path/$dl_file"));
- echo $buf;
- }
- if ($bytes_sent==filesize("$dl_path/$dl_file")) {
- if (!file_exists($count_path)) {
- mkdir($count_path);
- }
- $unique_downloads = "$count_path/$count_file";
- $count_unique_downloads = $count_unique_downloads + 1;
- }
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['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'])) {
- $comment_dir = 'data/items/' . $_REQUEST['entry'] .'/comments/pending/' . $_REQUEST['comment'];
- $key_file = $comment_dir . '/key.txt';
- if ($_REQUEST['key'] == $login_key) {
- if ($_REQUEST['action'] == "approve") {
- $live_dir = "data/items/{$_REQUEST['entry']}/comments/live/{$_REQUEST['comment']}";
- unlink("$live_dir/key.txt");
- $cat_dir = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
- if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_exists("data/email.txt") and !file_exists("data/items/{$_REQUEST['entry']}/private.txt") and !file_exists("data/categories/$cat_dir/private.txt")) {
- if (file_exists("data/ml-reply2.txt")) {
- $ml_reply2 = file_get_contents("data/ml-reply2.txt");
- }
- $ml_from = file_get_contents("$live_dir/email.txt");
- $ml_from = str_replace(" at ","@",$ml_from);
- $ml_from_firstname = file_get_contents("$live_dir/firstname.txt");
- $ml_from_lastname = file_get_contents("$live_dir/lastname.txt");
- $ml_from = '"' . "$ml_from_firstname $ml_from_lastname" . '" <' . $ml_from . '>';
- $ml_subject = file_get_contents("data/items/{$_REQUEST['entry']}/title.txt");
- if (file_exists("data/ml-prepend.txt")) {
- $ml_prepend = file_get_contents("data/ml-prepend.txt");
- $ml_subject = str_replace($ml_prepend,"",$ml_subject);
- $ml_subject = $ml_prepend . " " . $ml_subject;
- }
- $ml_subject = str_replace("Re:","",$ml_subject);
- $ml_subject = "Re: " . $ml_subject;
- $ml_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
- $ml_body = file_get_contents("$live_dir/comment.txt");
- $ml_body = str_replace('<br />', "\n", $ml_body);
- $ml_body = str_replace('<img src=images/smileys/crying.png border=0>', ':((', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/frown.png border=0>', ':(', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/indifferent.png border=0>', ':|', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/laughing.png border=0>', ':D', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/lick.png border=0>', ':P', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/ohno.png border=0>', ':O', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/smile.png border=0>', ':)', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/surprised.png border=0>', '=)', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/undecided.png border=0>', ':\\', $ml_body);
- $ml_body = str_replace('<img src=images/smileys/wink.png border=0>', ';)', $ml_body);
- $ml_body = str_replace('&','&',$ml_body);
- $ml_body = str_replace('<','<',$ml_body);
- $ml_body = str_replace('>','>',$ml_body);
- $ml_body = str_replace('®','(R)',$ml_body);
- if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt")) {
- $badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $censor = "[expletive]";
- }
- $ml_body = preg_replace("/\b($badwords)\b/i",$censor,$ml_body);
- }
- if (file_exists("data/ml-header.txt")) {
- $ml_header = file_get_contents("data/ml-header.txt");
- $ml_body = $ml_header . "\n\n" . $ml_body;
- }
- $ml_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $ml_url = str_replace('//', '/', $ml_url);
- $ml_url = "http://" . $ml_url . "index.php?entry={$_REQUEST['entry']}&show=comments";
- $ml_body = $ml_body . "\n\nPlease visit the following URL for the full thread:\n\n" . $ml_url;
- if (file_exists("data/items/{$_REQUEST['entry']}/member.txt")) {
- $ml_body = $ml_body . "\n\nYou need to login first to view the entry or to add a comment.";
- }
- if (file_exists("data/ml-footer.txt")) {
- $ml_footer = file_get_contents("data/ml-footer.txt");
- $ml_body = $ml_body . "\n\n" . $ml_footer;
- }
- if ($dh_ml_member = opendir("data/members/active")) {
- while (($ml_member = readdir($dh_ml_member)) !== false) {
- if ($ml_member != "." && $ml_member != ".." && fnmatch("*", $ml_member)) {
- if (file_exists("data/members/active/$ml_member/noml.txt")) {
- continue;
- }
- if (file_exists("data/members/active/$ml_member/vacation.txt")) {
- continue;
- }
- $ml_to_firstname = file_get_contents("data/members/active/$ml_member/firstname.txt");
- $ml_to_lastname = file_get_contents("data/members/active/$ml_member/lastname.txt");
- $ml_to = file_get_contents("data/members/active/$ml_member/email.txt");
- $ml_to = '"' . "$ml_to_firstname $ml_to_lastname" . '" <'. $ml_to . '>';
- if (file_exists("data/ml-reply2.txt")) {
- mail($ml_to, $ml_subject, $ml_body,
- "From: $ml_from\r\n" .
- "Reply-To: $ml_reply2\r\n" .
- "References: {$_REQUEST['entry']}\r\n" .
- "X-Mailer: $ml_mailer");
- }
- else {
- mail($ml_to, $ml_subject, $ml_body,
- "From: $ml_from\r\n" .
- "References: {$_REQUEST['entry']}\r\n" .
- "X-Mailer: $ml_mailer");
- }
- }
- }
- closedir($dh_ml_member);
- }
- }
- }
- if ($_REQUEST['action'] == "delete") {
- rmdirr($comment_dir);
- }
- $pending_comment_flag_dir = $_REQUEST['entry'];
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
- if ($comment_count_value <= 1) {
- rmdirr("data/comments/pending/$pending_comment_flag_dir");
- }
- else {
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
- $comment_count_value = $comment_count_value - 1;
- }
- header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $_REQUEST['entry'] . '&show=comments');
- }
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
- $check = $dir . '/' . $_REQUEST['entry'];
- if (file_exists("$check")) {
- $filter = $_REQUEST['entry'];
- echo '<title>';
- $title = $check . '/title.txt';
- readfile($title);
- echo '</title>';
- $views = $check . '/views.txt';
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $count_views = $count_views + 1;
- }
- if (isset($_REQUEST['show']) and !empty($_REQUEST['show']) and isset($_REQUEST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_REQUEST['firstname']) and !empty($_REQUEST['firstname']) and isset($_REQUEST['lastname']) and !empty($_REQUEST['lastname']) and isset($_REQUEST['email']) and !empty($_REQUEST['email']) and isset($_REQUEST['new_comment']) and !empty($_REQUEST['new_comment']) and isset($_REQUEST['captcha_put']) and !empty($_REQUEST['captcha_put']) and ($_REQUEST['captcha_get'] == $_REQUEST['captcha_put']) and (ereg("@", $_REQUEST['email'])) and (ereg("\.", $_REQUEST['email']))) {
- if (!file_exists("$check/comments")) {
- mkdir("$check/comments");
- }
- if (!file_exists("$check/comments/pending")) {
- mkdir("$check/comments/pending");
- }
- if (!file_exists("$check/comments/live")) {
- mkdir("$check/comments/live");
- }
- // GNU date format
- //$timestamp = date("D M j H:i:s \P\H\T Y", time() + $offset);
- // Simple PHP Blog format
- mkdir("$check/comments/pending/$comment_entry_dir");
- $body_content = ucfirst($_REQUEST['new_comment']);
- $body_content = htmlentities($body_content, ENT_NOQUOTES);
- // $body_content = str_replace('href=', 'target=_maj href=', $body_content);
- $body_content = str_replace("\n", '<br />', $body_content);
- $body_content = trim($body_content);
- $body_content = str_replace(':((', '<img src=images/smileys/crying.png border=0>', $body_content);
- $body_content = str_replace(':(', '<img src=images/smileys/frown.png border=0>', $body_content);
- $body_content = str_replace(':|', '<img src=images/smileys/indifferent.png border=0>', $body_content);
- $body_content = str_replace(':D', '<img src=images/smileys/laughing.png border=0>', $body_content);
- $body_content = str_replace(':P', '<img src=images/smileys/lick.png border=0>', $body_content);
- $body_content = str_replace(':O', '<img src=images/smileys/ohno.png border=0>', $body_content);
- $body_content = str_replace(':)', '<img src=images/smileys/smile.png border=0>', $body_content);
- $body_content = str_replace('=)', '<img src=images/smileys/surprised.png border=0>', $body_content);
- $body_content = str_replace(':\\', '<img src=images/smileys/undecided.png border=0>', $body_content);
- $body_content = str_replace(';)', '<img src=images/smileys/wink.png border=0>', $body_content);
- $firstname = strtolower($_REQUEST['firstname']);
- $firstname = ucwords($firstname);
- $firstname = trim($firstname);
- $firstname = htmlentities($firstname, ENT_NOQUOTES);
- $lastname = strtolower($_REQUEST['lastname']);
- $lastname = ucwords($lastname);
- $lastname = trim($lastname);
- $lastname = htmlentities($lastname, ENT_NOQUOTES);
- $email = str_replace('@', ' at ', $_REQUEST['email']);
- $email = strtolower($email);
- $email = trim($email);
- $email = htmlentities($email, ENT_NOQUOTES);
- if (isset($_REQUEST['url']) and !empty($_REQUEST['url']) and (ereg("\.", $_REQUEST['url']))) {
- $url = str_replace('http://', '', $_REQUEST['url']);
- $url = strtolower($url);
- $url = trim($url);
- $url = 'http://' . $url;
- $url = htmlentities($url, ENT_NOQUOTES);
- }
- if (isset($_REQUEST['cauthor']) and !empty($_REQUEST['cauthor'])) {
- }
- $key_rand = str_rand(14);
- $comment_quote = ucfirst($_REQUEST['new_comment']);
- //$comment_quote = htmlentities($comment_quote, ENT_NOQUOTES);
- $sig_author_file = "data/author.txt";
- $sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $sig_url = str_replace('//', '/', $sig_url);
- $sig_url = "http://" . $sig_url;
- $email_to = strtolower($_REQUEST['email']);
- $email_to = '"' . "$firstname $lastname" . '" <' . $email_to . '>';
- if (file_exists("data/email.txt")) {
- $from_email_author = file_get_contents("data/author.txt");
- $from_email = file_get_contents("data/email.txt");
- $from_email = '"' . $from_email_author . '" <' . $from_email . '>';
- }
- $mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
- $commented_entry_title_file = "data/items/{$_REQUEST['entry']}/title.txt";
- if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
- $comment_thanks = "Hi $firstname,\n\nThanks for submitting the following comment last $timestamp:\n\n\"$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{$sig_url}index.php?entry={$_REQUEST['entry']}&show=comments\n\nThanks again! =)\n\n--\n$sig_author\n$sig_url\n";
- $comment_thanks = wordwrap($comment_thanks);
- mail($email_to, "Thanks for sharing your thoughts!", $comment_thanks,
- "From: $from_email\r\n" .
- "Reply-To: $from_email\r\n" .
- "X-Mailer: $mailer");
- }
- if (file_exists("data/email.txt")) {
- $comment_notice = "The following comment was submitted by $email_to last $timestamp for the entry \"$commented_entry_title\":\n\n\"$comment_quote\"\n\nVisit the link below to approve and post this pending comment:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&comment={$comment_entry_dir}&key={$key_rand}&action=approve\n\nVisit the link below to disapprove and delete this pending comment:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&comment={$comment_entry_dir}&key={$key_rand}&action=delete\n\nYou can also approve or disapprove pending comments at a later time by logging on to your blog.";
- $comment_notice = wordwrap($comment_notice);
- mail($from_email, "Pending Comment", $comment_notice,
- "From: $from_email\r\n" .
- "Reply-To: $from_email\r\n" .
- "X-Mailer: $mailer");
- }
- if (!file_exists("data/comments")) {
- mkdir("data/comments");
- }
- if (!file_exists("data/comments/pending")) {
- mkdir("data/comments/pending");
- }
- $pending_comment_flag = $_REQUEST['entry'];
- if (!file_exists("data/comments/pending/$pending_comment_flag")) {
- mkdir("data/comments/pending/$pending_comment_flag");
- }
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag/count.txt"));
- $comment_count_value = $comment_count_value + 1;
- }
- }
- else {
- echo '<title>' . $default_title . '</title>';
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- $filter = $_REQUEST['archive'] . "*";
- }
- else {
- $filter = "*";
- }
- }
- }
- else {
- echo '<title>' . $default_title . '</title>';
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- $filter = $_REQUEST['archive'] . "*";
- }
- else {
- $filter = "*";
- }
- }
- ?>
- <?php
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and file_exists("data/items/{$_REQUEST['entry']}")) {
- $cat_dir = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
- if (!file_exists("data/categories/$cat_dir/private.txt")) {
- if (!file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
- if (!file_exists("data/items/{$_REQUEST['entry']}/private.txt")) {
- $description = file_get_contents("data/items/{$_REQUEST['entry']}/body.txt");
- $description = strip_tags($description);
- $description = html_entity_decode($description);
- $description = str_replace("&","&",$description);
- $description = str_replace("<","<",$description);
- $description = str_replace(">",">",$description);
- $description = str_replace("<br>"," ",$description);
- $description = str_replace("<br />"," ",$description);
- $description = str_replace("\r"," ",$description);
- $description = str_replace("\n"," ",$description);
- $description = str_replace(chr(10)," ",$description);
- $description = str_replace(chr(13)," ",$description);
- $description = trim($description);
- $description = substr($description,0,210);
- $description = htmlentities($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"))))) {
- $badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $censor = "[expletive]";
- }
- $description = preg_replace("/\b($badwords)\b/i",$censor,$description);
- }
- echo "<meta name=\"description\" content=\"{$description}\">";
- }
- }
- }
- }
- ?>
- <style>
- body {
- color: <?php
- if (file_exists("data/colors/font.txt")) {
- $font_color = file_get_contents("data/colors/font.txt");
- echo $font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- margin: 0px 0px 10px 10px;
- padding: 0px;
- text-align: left;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, helvetica, sans-serif;
- background-color: <?php
- if (file_exists("data/colors/bg.txt")) {
- $background_color = file_get_contents("data/colors/bg.txt");
- if ($background_color == "transparent") {
- echo "#ffffff";
- }
- else {
- echo $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: 11px;
- }
- a {
- font-weight: bold;
- text-decoration: none;
- }
- a:link {
- color: <?php
- if (file_exists("data/colors/link.txt")) {
- $a_link_color = file_get_contents("data/colors/link.txt");
- echo $a_link_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:visited {
- color: <?php
- if (file_exists("data/colors/vlink.txt")) {
- $a_visited_color = file_get_contents("data/colors/vlink.txt");
- echo $a_visited_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:hover {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- $a_hover_color = file_get_contents("data/colors/hover.txt");
- echo $a_hover_color;
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- a:active {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- $a_active_color = file_get_contents("data/colors/hover.txt");
- echo $a_active_color;
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- #panel_title {
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$font_panel_title},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: <?php
- if (file_exists("data/colors/pt-font.txt")) {
- $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
- echo $panel_title_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
- echo $panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 10px 0px 0px 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_title_border_color;
- }
- else {
- echo "#cccccc";
- }
- ?>;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
- }
- #panel_body {
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$font_panel_body},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: <?php
- if (file_exists("data/colors/pb-font.txt")) {
- $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
- echo $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")) {
- $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
- echo $panel_body_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_body_border_color = file_get_contents("data/colors/border.txt");
- echo $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 {
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$font_panel_footer},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: <?php
- if (file_exists("data/colors/pf-font.txt")) {
- $panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
- echo $panel_footer_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/pf-bg.txt")) {
- $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $panel_footer_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_footer_border_color = file_get_contents("data/colors/border.txt");
- echo $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;';
- }
- ?>
- text-align: right;
- }
- .input {
- color: <?php
- if (file_exists("data/colors/border.txt")) {
- $input_color = file_get_contents("data/colors/border.txt");
- echo $input_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- background: #ffffff;
- border: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_footer_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_footer_border_color;
- }
- else {
- echo "#999999";
- }
- ?> solid 1px;
- width: 300px;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- }
- .search {
- color: #666666;
- background: #ffffff;
- width: 100%;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- }
- #panel_free {
- padding: 0px 5px 0px 5px;
- margin: 10px 0px 0px 0px;
- }
- .rbtop {
- display: block;
- background: transparent;
- font-size: 1px;
- margin: 10px 0px 0px 0px;
- }
- .rbbottom {
- display: block;
- background: transparent;
- font-size: 1px;
- margin: 0px 0px 0px 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 {
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
- echo $panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-left: 1px solid;
- border-right: 1px solid;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rb2b, .rb3b, .rb4b {
- background-color: <?php
- if (file_exists("data/colors/pb-bg.txt")) {
- $panel_title_background_color = file_get_contents("data/colors/pb-bg.txt");
- echo $panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-left: 1px solid;
- border-right: 1px solid;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rb2e, .rb3e, .rb4e {
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- $panel_title_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-left: 1px solid;
- border-right: 1px solid;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rb1t, .rb1b, .rb1e {
- margin: 0 5px;
- background: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $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-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$font_panel_title},";
- }
- ?> arial, helvetica, sans-serif;
- color: <?php
- if (file_exists("data/colors/pt-font.txt")) {
- $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
- echo $panel_title_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
- echo $panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_title_border_color;
- }
- else {
- echo "#cccccc";
- };
- ?>;
- }
- .rbspace {
- height: 3px;
- }
- </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("header.php")) {
- include("header.php");
- echo '<p></p>';
- }
- ?>
- <table border=0 cellspacing=10 cellpadding=0>
- <tr><td width=175 valign=top>
- <?php
- 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 id=panel_title>';
- }
- ?>
- Profile</div>
- <?php
- if (file_exists("images/profile.gif")) {
- $profile_gif_image_size = getimagesize("images/profile.gif");
- $profile_gif_image_width = $profile_gif_image_size[0];
- $profile_gif_image_height = $profile_gif_image_size[1];
- $max_profile_gif_image_width = 163;
- if ($profile_gif_image_width > $max_profile_gif_image_width) {
- $sizefactor = (double) ($max_profile_gif_image_width / $profile_gif_image_width) ;
- $profile_gif_image_width = (int) ($profile_gif_image_width * $sizefactor);
- $profile_gif_image_height = (int) ($profile_gif_image_height * $sizefactor);
- }
- echo "<img src=images/profile.gif border=0 width=";
- echo $profile_gif_image_width;
- echo " height=";
- echo $profile_gif_image_height;
- echo " align=left>";
- }
- if (file_exists("images/profile.jpg")) {
- $profile_jpg_image_size = getimagesize("images/profile.jpg");
- $profile_jpg_image_width = $profile_jpg_image_size[0];
- $profile_jpg_image_height = $profile_jpg_image_size[1];
- $max_profile_jpg_image_width = 163;
- if ($profile_jpg_image_width > $max_profile_jpg_image_width) {
- $sizefactor = (double) ($max_profile_jpg_image_width / $profile_jpg_image_width) ;
- $profile_jpg_image_width = (int) ($profile_jpg_image_width * $sizefactor);
- $profile_jpg_image_height = (int) ($profile_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/profile.jpg border=0 width=";
- echo $profile_jpg_image_width;
- echo " height=";
- echo $profile_jpg_image_height;
- echo " align=left>";
- }
- if (file_exists("images/profile.png")) {
- $profile_png_image_size = getimagesize("images/profile.png");
- $profile_png_image_width = $profile_png_image_size[0];
- $profile_png_image_height = $profile_png_image_size[1];
- $max_profile_png_image_width = 163;
- if ($profile_png_image_width > $max_profile_png_image_width) {
- $sizefactor = (double) ($max_profile_png_image_width / $profile_png_image_width) ;
- $profile_png_image_width = (int) ($profile_png_image_width * $sizefactor);
- $profile_png_image_height = (int) ($profile_png_image_height * $sizefactor);
- }
- echo "<img src=images/profile.png border=0 width=";
- echo $profile_png_image_width;
- echo " height=";
- echo $profile_png_image_height;
- echo " 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>';
- }
- ?>
- <?php
- 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 id=panel_title>';
- }
- ?>
- Navigation</div>
- <a href="<?php echo $_SERVER['PHP_SELF']; ?>">Home</a><br>
- <?php
- if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
- echo '<a href=member.php?id=all>Members</a><br>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=add.php>Add Entry</a><br>';
- echo '<a href=settings.php>Settings</a><br>';
- echo '<a href=panels.php>Panels</a><br>';
- echo '<a href=cat.php>Categories</a><br>';
- echo '<a href=colors.php>Colors</a><br>';
- echo '<a href=fonts.php>Fonts</a><br>';
- echo '<a href=login.php>Logout</a>';
- } elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $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']}/category.txt")) {
- $bb_cat = file_get_contents("data/members/active/{$_SESSION['logged_in']}/category.txt");
- if (!file_exists("data/categories/$bb_cat") or ($bb_cat == "")) {
- unlink("data/members/active/{$_SESSION['logged_in']}/category.txt");
- }
- }
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") or file_exists("data/members/active/{$_SESSION['logged_in']}/category.txt")) {
- echo '<a href=add.php>Add Entry</a><br>';
- }
- echo '<a href=options.php>Options</a><br>';
- echo '<a href=login.php>Logout</a>';
- }
- else {
- if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
- echo '<a href=reg.php>Register</a><br>';
- }
- echo '<a 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>';
- }
- ?>
- <?php
- if (file_exists("data/sticky")) {
- if ($dh_sticky_list = opendir("data/sticky")) {
- while (($entry_sticky_list = readdir($dh_sticky_list)) !== false) {
- if (file_exists("data/items/$entry_sticky_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$entry_sticky_list/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $get_cat_dir = file_get_contents("data/items/$entry_sticky_list/category.txt");
- if (file_exists("data/categories/$get_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_sticky_list/cat.txt")) {
- continue;
- }
- if ($entry_sticky_list != "." && $entry_sticky_list != ".." && fnmatch("*", $entry_sticky_list)) {
- $show_sticky_list[] = $entry_sticky_list;
- }
- }
- closedir($dh_sticky_list);
- }
- sort($show_sticky_list);
- reset($show_sticky_list);
- $count_sticky_list = count($show_sticky_list);
- if ($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 id=panel_title>';
- }
- echo 'Quick Links</div>';
- echo '<div id=panel_body>';
- foreach ($show_sticky_list as $sticky_list_entry) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=';
- echo $sticky_list_entry;
- echo '>';
- readfile("data/items/$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>';
- }
- }
- }
- ?>
- <?php
- if (file_exists("data/panels")) {
- if ($dh_panel_list = opendir("data/panels")) {
- while (($entry_panel_list = readdir($dh_panel_list)) !== false) {
- if (file_exists("data/panels/$entry_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/panels/$entry_panel_list/right.txt")) {
- continue;
- }
- if (file_exists("data/panels/$entry_panel_list/center.txt")) {
- continue;
- }
- if (file_exists("data/panels/$entry_panel_list/top.txt")) {
- continue;
- }
- if (file_exists("data/panels/$entry_panel_list/entry.txt")) {
- continue;
- }
- if ($entry_panel_list != "." && $entry_panel_list != ".." && fnmatch("*", $entry_panel_list)) {
- $show_panel_list[] = $entry_panel_list;
- }
- }
- closedir($dh_panel_list);
- }
- sort($show_panel_list);
- reset($show_panel_list);
- $count_panel_list = count($show_panel_list);
- if ($count_panel_list > 0) {
- foreach ($show_panel_list as $panel_list_entry) {
- if (!file_exists("data/panels/$panel_list_entry/free.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 id=panel_title>';
- }
- readfile("data/panels/$panel_list_entry/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo "<a href=panels.php#{$panel_list_entry}>";
- echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
- }
- if (file_exists("data/panels/$panel_list_entry/private.txt")) {
- echo '<img src=images/widget.private.png border=0 width=11 height=11 align=right>';
- }
- echo '</div><div id=panel_body>';
- }
- if (file_exists("data/panels/$panel_list_entry/free.txt")) {
- echo '<div id=panel_free>';
- }
- include("data/panels/$panel_list_entry/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$panel_list_entry/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- }
- ?>
- </td>
- <td valign=top width=<?php if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) { echo "610"; } else { echo "525"; } ?>>
- <?php
- if (file_exists("data/panels")) {
- if ($dh_top_panel_list = opendir("data/panels")) {
- while (($entry_top_panel_list = readdir($dh_top_panel_list)) !== false) {
- if (file_exists("data/panels/$entry_top_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (!file_exists("data/panels/$entry_top_panel_list/top.txt")) {
- continue;
- }
- if ($entry_top_panel_list != "." && $entry_top_panel_list != ".." && fnmatch("*", $entry_top_panel_list)) {
- $show_top_panel_list[] = $entry_top_panel_list;
- }
- }
- closedir($dh_top_panel_list);
- }
- sort($show_top_panel_list);
- reset($show_top_panel_list);
- $count_top_panel_list = count($show_top_panel_list);
- if ($count_top_panel_list > 0) {
- foreach ($show_top_panel_list as $top_panel_list_entry) {
- if (!file_exists("data/panels/$top_panel_list_entry/free.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 id=panel_title>';
- }
- readfile("data/panels/$top_panel_list_entry/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo "<a href=panels.php#{$top_panel_list_entry}>";
- echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
- }
- echo '</div><div id=panel_body>';
- }
- if (file_exists("data/panels/$top_panel_list_entry/free.txt")) {
- echo '<div id=panel_free>';
- }
- include("data/panels/$top_panel_list_entry/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$top_panel_list_entry/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- }
- ?>
- <?php
- if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_exists("data/lite.txt") and !isset($_REQUEST['entry']) and !isset($_REQUEST['category']) and !isset($_REQUEST['start']) and !isset($_REQUEST['author']) and !isset($_REQUEST['archive']) and !isset($_REQUEST['find'])) {
- if ($dh_latest_post_items = opendir($dir)) {
- while (($entry_latest_post_items = readdir($dh_latest_post_items)) !== false) {
- if (file_exists("data/items/$entry_latest_post_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- // hide_member (20070606)
- //if (file_exists("data/items/$entry_latest_post_items/member.txt") and (!isset($_SESSION['logged_in']))) {
- // continue;
- //}
- $cat_dir = file_get_contents("data/items/$entry_latest_post_items/category.txt");
- if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_latest_post_items/cat.txt")) {
- continue;
- }
- if ($entry_latest_post_items != "." && $entry_latest_post_items != ".." && fnmatch("*", $entry_latest_post_items)) {
- $show_latest_post_items[] = $entry_latest_post_items;
- }
- }
- closedir($dh_latest_post_items);
- }
- rsort($show_latest_post_items);
- reset($show_latest_post_items);
- $count_latest_post_items = count($show_latest_post_items);
- if ($count_latest_post_items > 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 id=panel_title>';
- }
- echo "Latest Entries</div><div id=panel_body>";
- echo "<table border=0 cellspacing=1 cellpadding=2 bgcolor=#cccccc width=100%>";
- echo "<tr><td bgcolor=#eeeeee align=center><p>topic</p></td><td bgcolor=#eeeeee align=center><p>author</p></td><td bgcolor=#eeeeee align=center><p>views</p></td><td bgcolor=#eeeeee align=center><p>comments</p></td><td bgcolor=#eeeeee align=center><p>last post</p></td></tr>";
- $increment_latest_post_entries = 0;
- $show_latest_post_entries = 5;
- while ($increment_latest_post_entries <= $show_latest_post_entries) {
- echo '<tr><td bgcolor=#ffffff><a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_post_items[$increment_latest_post_entries];
- if ($dh_summary_comments = opendir("$dir/$show_latest_post_items[$increment_latest_post_entries]/comments/live")) {
- while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
- if ($entry_summary_comments != "." && $entry_summary_comments != ".." && fnmatch("*", $entry_summary_comments)) {
- $items_summary_comments[] = $entry_summary_comments;
- }
- }
- closedir($dh_summary_comments);
- }
- rsort($items_summary_comments);
- $summary_comments = count($items_summary_comments);
- if ($summary_comments > 0) {
- echo '&show=comments';
- }
- echo '>';
- readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/title.txt");
- echo '</a></td>';
- echo '<td bgcolor=#ffffff><a href=member.php?id=';
- readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
- echo '>';
- readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
- echo '</a></td>';
- echo '<td bgcolor=#ffffff align=right>';
- if (!file_exists("$dir/$show_latest_post_items[$increment_latest_post_entries]/views.txt")) {
- echo 0;
- }
- else {
- readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/views.txt");
- }
- echo '</td>';
- if ($summary_comments < 1) {
- echo "<td bgcolor=#ffffff align=right><p>0</p></td>";
- echo "<td bgcolor=#ffffff align=right><p>";
- $iso_year = substr($show_latest_post_items[$increment_latest_post_entries],0,4);
- $iso_month = substr($show_latest_post_items[$increment_latest_post_entries],4,2);
- $iso_day = substr($show_latest_post_items[$increment_latest_post_entries],6,2);
- $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
- echo $iso_last;
- echo "</p></td>";
- }
- else {
- echo "<td bgcolor=#ffffff align=right><p>$summary_comments</p></td>";
- echo "<td bgcolor=#ffffff align=right><p>";
- $iso_year = substr($items_summary_comments[0],0,4);
- $iso_month = substr($items_summary_comments[0],4,2);
- $iso_day = substr($items_summary_comments[0],6,2);
- $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
- echo $iso_last;
- echo "</p></td>";
- }
- unset($items_summary_comments);
- $increment_latest_post_entries = $increment_latest_post_entries + 1;
- }
- }
- if ($count_latest_post_items > 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>';
- }
- }
- }
- ?>
- <?php
- if (file_exists("data/panels")) {
- if ($dh_center_panel_list = opendir("data/panels")) {
- while (($entry_center_panel_list = readdir($dh_center_panel_list)) !== false) {
- if (file_exists("data/panels/$entry_center_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (!file_exists("data/panels/$entry_center_panel_list/center.txt")) {
- continue;
- }
- if ($entry_center_panel_list != "." && $entry_center_panel_list != ".." && fnmatch("*", $entry_center_panel_list)) {
- $show_center_panel_list[] = $entry_center_panel_list;
- }
- }
- closedir($dh_center_panel_list);
- }
- sort($show_center_panel_list);
- reset($show_center_panel_list);
- $count_center_panel_list = count($show_center_panel_list);
- if ($count_center_panel_list > 0) {
- foreach ($show_center_panel_list as $center_panel_list_entry) {
- if (!file_exists("data/panels/$center_panel_list_entry/free.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 id=panel_title>';
- }
- readfile("data/panels/$center_panel_list_entry/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo "<a href=panels.php#{$center_panel_list_entry}>";
- echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
- }
- echo '</div><div id=panel_body>';
- }
- if (file_exists("data/panels/$center_panel_list_entry/free.txt")) {
- echo '<div id=panel_free>';
- }
- include("data/panels/$center_panel_list_entry/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$center_panel_list_entry/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- }
- ?>
- <?php
- if (is_dir($dir)) {
- if ($dh = opendir($dir)) {
- while (($entry_main = readdir($dh)) !== false) {
- if (file_exists("data/items/$entry_main/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$entry_main/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $cat_dir = file_get_contents("data/items/$entry_main/category.txt");
- if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_main/cat.txt")) {
- continue;
- }
- if (file_exists("data/nocat.txt") and file_exists("data/items/$entry_main/category.txt") and !file_exists("data/items/$entry_main/cat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['category']) or empty($_REQUEST['category'])) and (!isset($_REQUEST['entry']) or empty($_REQUEST['entry'])) and (!isset($_REQUEST['author']) or empty($_REQUEST['author']))) {
- continue;
- }
- if ($entry_main != "." && $entry_main != ".." && fnmatch($filter, $entry_main)) {
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "-", "data/categories/{$_REQUEST['category']}"))))) {
- $category = str_replace(" ", "-", $_REQUEST['category']);
- $category = strtolower($category);
- $category = strip_tags($category);
- if (file_exists("data/items/$entry_main/category.txt") and (file_get_contents("data/items/$entry_main/category.txt") == "$category")) {
- $items[] = $entry_main;
- }
- }
- elseif (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$entry_main/author.txt") and (file_get_contents("data/items/$entry_main/author.txt") == $_REQUEST['author'])) {
- $items[] = $entry_main;
- }
- }
- elseif (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and !file_exists("data/members/active/{$_REQUEST['author']}") and (file_get_contents("data/username.txt") == $_REQUEST['author']) and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$entry_main/author.txt") and (file_get_contents("data/items/$entry_main/author.txt") == $_REQUEST['author'])) {
- $items[] = $entry_main;
- }
- }
- elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "private")) {
- if (file_exists("data/items/$entry_main/private.txt")) {
- $items[] = $entry_main;
- }
- }
- elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "member")) {
- if (file_exists("data/items/$entry_main/member.txt")) {
- $items[] = $entry_main;
- }
- }
- elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "passwd")) {
- if (file_exists("data/items/$entry_main/passwd.txt")) {
- $items[] = $entry_main;
- }
- }
- elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "filedrop")) {
- if (count(glob("data/items/$entry_main/filedrop/*")) === 0) {
- rmdir("data/items/$entry_main/filedrop");
- }
- if (file_exists("data/items/$entry_main/filedrop")) {
- $items[] = $entry_main;
- }
- }
- elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "album")) {
- if (file_exists("images/$entry_main/album")) {
- $items[] = $entry_main;
- }
- }
- else {
- $items[] = $entry_main;
- }
- }
- }
- closedir($dh);
- }
- }
- if (!file_exists("data/old.txt")) {
- rsort($items);
- }
- if (file_exists("data/old.txt")) {
- sort($items);
- }
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
- $category = str_replace(" ", "-", $_REQUEST['category']);
- $category = strtolower($category);
- $category = strip_tags($category);
- if (file_exists("data/categories/$category/book.txt")) {
- sort($items);
- }
- }
- reset($items);
- $start = $_REQUEST['start'];
- if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
- $start = 0;
- }
- $end=$start+$increase;
- $disp=array_slice($items,$start,$increase);
- foreach ($disp as $d) {
- if (file_exists("$dir/$d/category.txt")) {
- $category_check = 'data/categories/' . file_get_contents("$dir/$d/category.txt");
- if (!file_exists($category_check)) {
- unlink("$dir/$d/category.txt");
- }
- }
- if (file_exists("$dir/$d/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("$dir/$d/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- echo '<table border=0 cellspacing=0 cellpadding=0 bgcolor=#cccccc style="background-color: transparent;"><tr><td width=';
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
- echo '>';
- 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 id=panel_title>';
- }
- readfile("$dir/$d/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $d;
- echo '><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete entry"></a>';
- if (!file_exists("$dir/$d/private.txt") and !file_exists("$dir/$d/category.txt") and file_exists("data/bb.txt") and (count(glob("$dir/$d/comments/live/*")) === 0) and (count(glob("$dir/$d/comments/pending/*")) === 0)) {
- echo '<a href=move.php?entry=';
- echo $d;
- echo '><img src=images/widget.move.png border=0 width=11 height=11 align=right alt="move to comment"></a>';
- }
- echo '<a href=edit.php?entry=';
- echo $d;
- echo '><img src=images/widget.edit.png border=0 width=11 height=11 align=right alt="edit entry"></a>';
- if (file_exists("$dir/$d/passwd.txt")) {
- echo '<img src=images/widget.protected.png border=0 width=11 height=11 align=right alt="protected entry">';
- }
- if (file_exists("$dir/$d/private.txt")) {
- echo '<img src=images/widget.private.png border=0 width=11 height=11 align=right alt="private entry">';
- }
- if (file_exists("$dir/$d/member.txt")) {
- echo '<img src=images/widget.member.png border=0 width=11 height=11 align=right alt="member-only entry">';
- }
- if (file_exists("$dir/$d/cat.txt")) {
- echo '<img src=images/widget.cat.png border=0 width=11 height=11 align=right alt="always display">';
- }
- if (file_exists("$dir/$d/category.txt")) {
- $read_cat_dir = file_get_contents("$dir/$d/category.txt");
- if (file_exists("data/categories/$read_cat_dir/private.txt")) {
- echo '<img src=images/widget.hidden.png border=0 width=11 height=11 align=right alt="category hidden">';
- }
- if (file_exists("data/nocat.txt")) {
- echo '<img src=images/widget.isolated.png border=0 width=11 height=11 align=right alt="category isolated">';
- }
- if (file_exists("data/categories/$read_cat_dir/book.txt")) {
- echo '<img src=images/widget.booked.png border=0 width=11 height=11 align=right alt="category booked">';
- }
- echo '<img src=images/widget.filed.png border=0 width=11 height=11 align=right alt="filed under ';
- readfile("$dir/$d/category.txt");
- echo '">';
- }
- }
- echo '</div><div id=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("$dir/$d/author.txt")) {
- echo "<td width=85 valign=top><p>";
- $author = file_get_contents("$dir/$d/author.txt");
- echo "<a href=member.php?id=$author>";
- if ((file_get_contents("data/username.txt") == $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")) {
- $avatar_gif_image_size = getimagesize("images/avatar.gif");
- $avatar_gif_image_width = $avatar_gif_image_size[0];
- $avatar_gif_image_height = $avatar_gif_image_size[1];
- $max_avatar_gif_image_width = 80;
- if ($avatar_gif_image_width > $max_avatar_gif_image_width) {
- $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
- $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
- $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.gif border=0 width=";
- echo $avatar_gif_image_width;
- echo " height=";
- echo $avatar_gif_image_height;
- }
- if (file_exists("images/avatar.jpg")) {
- $avatar_jpg_image_size = getimagesize("images/avatar.jpg");
- $avatar_jpg_image_width = $avatar_jpg_image_size[0];
- $avatar_jpg_image_height = $avatar_jpg_image_size[1];
- $max_avatar_jpg_image_width = 80;
- if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {
- $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
- $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
- $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.jpg border=0 width=";
- echo $avatar_jpg_image_width;
- echo " height=";
- echo $avatar_jpg_image_height;
- }
- if (file_exists("images/avatar.png")) {
- $avatar_png_image_size = getimagesize("images/avatar.png");
- $avatar_png_image_width = $avatar_png_image_size[0];
- $avatar_png_image_height = $avatar_png_image_size[1];
- $max_avatar_png_image_width = 80;
- if ($avatar_png_image_width > $max_avatar_png_image_width) {
- $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
- $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
- $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.png border=0 width=";
- echo $avatar_png_image_width;
- echo " height=";
- echo $avatar_png_image_height;
- }
- echo "><br>";
- }
- elseif (file_exists("images/members/$author/avatar.jpg") or file_exists("images/members/$author/avatar.gif") or file_exists("images/members/$author/avatar.png")) {
- if (file_exists("images/members/$author/avatar.gif")) {
- $avatar_gif_image_size = getimagesize("images/members/$author/avatar.gif");
- $avatar_gif_image_width = $avatar_gif_image_size[0];
- $avatar_gif_image_height = $avatar_gif_image_size[1];
- $max_avatar_gif_image_width = 80;
- if ($avatar_gif_image_width > $max_avatar_gif_image_width) {
- $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
- $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
- $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=images/members/$author/avatar.gif border=0 width=";
- echo $avatar_gif_image_width;
- echo " height=";
- echo $avatar_gif_image_height;
- }
- if (file_exists("images/members/$author/avatar.jpg")) {
- $avatar_jpg_image_size = getimagesize("images/members/$author/avatar.jpg");
- $avatar_jpg_image_width = $avatar_jpg_image_size[0];
- $avatar_jpg_image_height = $avatar_jpg_image_size[1];
- $max_avatar_jpg_image_width = 80;
- if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {
- $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
- $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
- $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/members/$author/avatar.jpg border=0 width=";
- echo $avatar_jpg_image_width;
- echo " height=";
- echo $avatar_jpg_image_height;
- }
- if (file_exists("images/members/$author/avatar.png")) {
- $avatar_png_image_size = getimagesize("images/members/$author/avatar.png");
- $avatar_png_image_width = $avatar_png_image_size[0];
- $avatar_png_image_height = $avatar_png_image_size[1];
- $max_avatar_png_image_width = 80;
- if ($avatar_png_image_width > $max_avatar_png_image_width) {
- $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
- $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
- $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
- }
- echo "<img src=images/members/$author/avatar.png border=0 width=";
- echo $avatar_png_image_width;
- echo " height=";
- echo $avatar_png_image_height;
- }
- echo "><br>";
- }
- echo "$author</a><br>";
- if ((file_get_contents("data/username.txt") == $author) and file_exists("data/rank.txt")) {
- echo "administrator<br>";
- }
- elseif (file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
- $rank = file_get_contents("data/members/active/$author/rank.txt");
- echo "$rank<br>";
- }
- elseif (!file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
- echo "member<br>";
- }
- if ($dh_posts = opendir("data/items")) {
- while (($entry_posts = readdir($dh_posts)) !== false) {
- if (file_exists("data/items/$entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- // hide_member (20070606)
- //if (file_exists("data/items/$entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
- // continue;
- //}
- $post_cat_dir = file_get_contents("data/items/$entry_posts/category.txt");
- if (file_exists("data/categories/$post_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_posts/cat.txt")) {
- continue;
- }
- if ($entry_posts != "." && $entry_posts != ".." && fnmatch("*", $entry_posts)) {
- if (file_exists("data/members/active/$author") and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$entry_posts/author.txt") and (file_get_contents("data/items/$entry_posts/author.txt") == $author)) {
- $items_posts[] = $entry_posts;
- }
- }
- elseif (!file_exists("data/members/active/$author") and (file_get_contents("data/username.txt") == $author) and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$entry_posts/author.txt") and (file_get_contents("data/items/$entry_posts/author.txt") == $author)) {
- $items_posts[] = $entry_posts;
- }
- }
- }
- }
- closedir($dh_posts);
- }
- $posts = count($items_posts);
- if ($posts == 1) {
- echo "$posts post";
- }
- if ($posts > 1) {
- echo "$posts posts";
- }
- unset($items_posts);
- echo "</p></td><td width=513 valign=top>";
- }
- else {
- echo "<td width=598 valign=top>";
- }
- if (file_exists("$dir/$d/passwd.txt")) {
- $passwd = file_get_contents("$dir/$d/passwd.txt");
- }
- if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
- $crypt_passwd = sha1($_REQUEST['passwd']);
- $crypt_passwd = md5($crypt_passwd);
- $crypt_passwd = crypt($crypt_passwd, $crypt_passwd);
- }
- echo '<font style="font-size: 10px; color: #999999;">';
- if ((file_exists("$dir/$d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("$dir/$d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
- $xavatar_author = file_get_contents("$dir/$d/author.txt");
- echo "<a href=member.php?id=$xavatar_author>$xavatar_author</a> - ";
- }
- readfile("$dir/$d/date.txt");
- if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("$dir/$d/lastmod.txt")) {
- if (file_exists("$dir/$d/revisions.txt")) {
- echo ' (Revision ';
- readfile("$dir/$d/revisions.txt");
- echo " - ";
- echo date("l, M j, Y, g:i A", filemtime("$dir/$d/body.txt"));
- echo ')';
- }
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if (file_exists("$dir/$d/category.txt")) {
- echo ' Filed under ';
- $category_key = file_get_contents("$dir/$d/category.txt");
- $category_key = strtolower($category_key);
- if (file_exists("data/categories/{$category_key}/title.txt")) {
- $category_dsp = file_get_contents("data/categories/{$category_key}/title.txt");
- echo "$category_key ($category_dsp)";
- }
- else {
- echo "$category_key";
- }
- }
- }
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d>here</a> to enter it.";
- }
- else {
- $entry_body = file_get_contents("$dir/$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"))))) {
- $badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $censor = "[expletive]";
- }
- $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
- }
- echo $entry_body;
- }
- if ((file_get_contents("data/username.txt") == $author) and file_exists("data/sig.txt") and file_exists("data/bb.txt") and file_exists("data/bb-sig.txt")) {
- $sig = file_get_contents("data/sig.txt");
- echo "<br><br>--<br>$sig";
- }
- elseif (file_exists("data/members/active/$author/sig.txt") and file_exists("data/bb.txt") and file_exists("data/bb-sig.txt")) {
- $sig = file_get_contents("data/members/active/$author/sig.txt");
- echo "<br><br>--<br>$sig";
- }
- echo '</td></tr></table>';
- if (file_exists("data/round.txt")) {
- echo "<div class=rbspace></div>";
- }
- echo '</div><div id=panel_footer>';
- echo '<font style="font-size: 10px; color: ';
- if (file_exists("data/colors/pf-font.txt")) {
- readfile("data/colors/pf-font.txt");
- }
- else {
- echo "#999999";
- }
- echo ';">';
- if (!file_exists("data/nocomment.txt")) {
- if (!file_exists("$dir/$d/comments/live")) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=comments>add comment</a>';
- }
- else {
- if ($dh_comments = opendir("$dir/$d/comments/live")) {
- while (($entry_comments = readdir($dh_comments)) !== false) {
- if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) {
- $items_comments[] = $entry_comments;
- }
- }
- closedir($dh_comments);
- }
- $comments = count($items_comments);
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=comments>';
- if ($comments == 1) {
- echo $comments . ' comment';
- }
- elseif ($comments < 1) {
- echo 'add comment';
- }
- else {
- echo $comments . ' comments';
- }
- echo '</a>';
- unset($items_comments);
- }
- }
- else {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '>permalink</a>';
- }
- if (file_exists("$dir/$d/views.txt")) {
- if ($views_value == 1) {
- echo ' ( ' . $views_value . ' view ) ';
- }
- elseif ($views_value > 1) {
- echo ' ( ' . $views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- }
- if (!file_exists("images/$d/album")) {
- echo ' ';
- }
- else {
- if ($dh_album = opendir("images/$d/album")) {
- while (($entry_album = readdir($dh_album)) !== false) {
- if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
- $items_album[] = $entry_album;
- }
- }
- closedir($dh_album);
- }
- $album = count($items_album);
- echo ' | <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=album>';
- if ($album == 1) {
- echo $album . ' image';
- }
- elseif ($album < 1) {
- echo 'album';
- }
- else {
- echo $album . ' images';
- }
- echo '</a>';
- unset($items_album);
- }
- if (file_exists("images/$d/album") and isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == album)) {
- if (!file_exists("$dir/$d/album")) {
- mkdir("$dir/$d/album");
- }
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $album_views_value = $album_views_value + 1;
- }
- }
- if ($album_views_value == 1) {
- echo ' ( ' . $album_views_value . ' view ) ';
- }
- elseif ($album_views_value > 1) {
- echo ' ( ' . $album_views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- if (!file_exists("data/items/$d/filedrop/files")) {
- echo ' ';
- }
- else {
- if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
- while (($dl_file = readdir($dh_filedrop)) !== false) {
- if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
- $items_filedrop[] = $dl_file;
- }
- }
- closedir($dh_filedrop);
- }
- $filedrop = count($items_filedrop);
- echo ' | <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=filedrop>';
- if ($filedrop == 1) {
- echo $filedrop . ' file';
- }
- elseif ($filedrop < 1) {
- echo 'filedrop';
- }
- else {
- echo $filedrop . ' files';
- }
- echo '</a> ';
- unset($items_filedrop);
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == filedrop)) {
- if (!file_exists("$dir/$d/filedrop")) {
- mkdir("$dir/$d/filedrop");
- }
- if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $filedrop_views_value = $filedrop_views_value + 1;
- }
- }
- if ($filedrop_views_value == 1) {
- echo ' ( ' . $filedrop_views_value . ' view ) ';
- }
- elseif ($filedrop_views_value > 1) {
- echo ' ( ' . $filedrop_views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- if (!file_exists("data/nopdf.txt") and file_exists("$dir/$d/pdf/file")) {
- echo "| <a href={$_SERVER['PHP_SELF']}?entry=$d&show=pdf>pdf</a> ";
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
- $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
- $pdf_views_value = $pdf_views_value + 1;
- }
- $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
- if ($pdf_views_value == 1) {
- echo ' ( ' . $pdf_views_value . ' view ) ';
- }
- elseif ($pdf_views_value > 1) {
- echo ' ( ' . $pdf_views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- }
- if (!file_exists("data/nocomment.txt")) {
- echo '| <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '>permalink</a></font>';
- }
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4e"></b><b class="rb3e"></b><b class="rb2e"></b><b class="rb1e"></b></b>';
- }
- echo '</td></tr></table>';
- // entry panel
- unset($show_per_entry_panel_list);
- if (file_exists("data/panels")) {
- if ($dh_per_entry_panel_list = opendir("data/panels")) {
- while (($entry_per_entry_panel_list = readdir($dh_per_entry_panel_list)) !== false) {
- if (file_exists("data/panels/$entry_per_entry_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (!file_exists("data/panels/$entry_per_entry_panel_list/entry.txt")) {
- continue;
- }
- if ($entry_per_entry_panel_list != "." && $entry_per_entry_panel_list != ".." && fnmatch("*", $entry_per_entry_panel_list)) {
- $show_per_entry_panel_list[] = $entry_per_entry_panel_list;
- }
- }
- closedir($dh_per_entry_panel_list);
- }
- sort($show_per_entry_panel_list);
- reset($show_per_entry_panel_list);
- $count_per_entry_panel_list = count($show_per_entry_panel_list);
- if ($count_per_entry_panel_list > 0) {
- foreach ($show_per_entry_panel_list as $per_entry_panel_list_entry) {
- if (!file_exists("data/panels/$per_entry_panel_list_entry/free.txt")) {
- if (file_exists("data/round.txt")) {
- echo '<p></p><b class="rbper_entry"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<p></p><div id=panel_title>';
- }
- readfile("data/panels/$per_entry_panel_list_entry/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo "<a href=panels.php#{$per_entry_panel_list_entry}>";
- echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
- }
- echo '</div><div id=panel_body>';
- }
- if (file_exists("data/panels/$per_entry_panel_list_entry/free.txt")) {
- echo '<div id=panel_free>';
- }
- include("data/panels/$per_entry_panel_list_entry/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$per_entry_panel_list_entry/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- }
- // entry panel
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == album) and file_exists("images/$d/album")) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=';
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
- echo '><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 id=panel_title>';
- }
- echo 'Album';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $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 id=panel_body>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=album>here</a> to enter it.";
- }
- else {
- /* thumbnail auto-clean-up (20060409) - This should delete thumbnails of non-existent album images. */
- if (file_exists("images/$d/thumbnails")) {
- if ($dh_album = opendir("images/$d/thumbnails")) {
- while (($thumbnail_album = readdir($dh_album)) !== false) {
- if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*", $thumbnail_album)) {
- $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
- $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
- $parent_image = "images/$d/album/$parent_image";
- if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
- unlink($current_thumbnail);
- }
- }
- }
- }
- }
- /* caption auto-clean-up (20070216) This should delete captions of non-existent album images. */
- if (file_exists("data/items/$d/album/captions")) {
- if ($dh_album = opendir("data/items/$d/album/captions")) {
- while (($caption_album = readdir($dh_album)) !== false) {
- if ($caption_album != "." && $caption_album != ".." && fnmatch("*", $caption_album)) {
- $current_caption = "data/items/$d/album/captions/$caption_album";
- $parent_image = str_replace(".txt","",$caption_album);
- $parent_image = "images/$d/album/$parent_image";
- if (file_exists($current_caption) and !file_exists($parent_image)) {
- unlink($current_caption);
- }
- }
- }
- }
- }
- /* auto-sort entries (20060409) - MAJ previously relied on readdir() alone, causing entries to be displayed in the order in which they are stored by the filesystem. */
- if (file_exists("images/$d/album")) {
- if ($dh_album = opendir("images/$d/album")) {
- while (($entry_album = readdir($dh_album)) !== false) {
- if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
- $sort_album[] = $entry_album;
- }
- }
- closedir($dh_album);
- }
- sort($sort_album);
- reset($sort_album);
- $count_album_entry = count($sort_album);
- if ($count_album_entry < 1) {
- rmdirr("images/$d/album");
- rmdirr("images/$d/thumbnails");
- }
- else {
- foreach($sort_album as $album_entry) {
- $current_image = "images/$d/album/$album_entry";
- $current_image_size = getimagesize($current_image);
- $current_width = $current_image_size[0];
- $current_height = $current_image_size[1];
- $max_width = 98;
- $max_height = 73;
- if (($current_width > $max_width) || ($current_height > $max_height)) {
- if ($current_height > $current_width) {
- $sizefactor = (double) ($max_height / $current_height);
- }
- else {
- $sizefactor = (double) ($max_width / $current_width) ;
- }
- $new_width = (int) ($current_width * $sizefactor);
- $new_height = (int) ($current_height * $sizefactor);
- }
- else {
- $new_width = $current_width;
- $new_height = $current_height;
- }
- /* auto-thumbnails (20060213) - In maj-0.14-20060131, album thumbnails were simply the original images displayed with smaller "width=" and "height=" values. Album index loading was painfully slow since the browser had to download the original images from the server. This should speed things up. We placed the "function" here instead of edit.php or add.php to make auto-thumbnail generation available for maj-0.14-20060131 users who may already have existing albums. */
- if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
- $work_thumb = imagecreatetruecolor($new_width,$new_height);
- $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
- switch($get_mimetype) {
- case "image/jpg":
- case "image/jpeg":
- $work_image = imagecreatefromjpeg($current_image);
- break;
- case "image/gif":
- $work_image = imagecreatefromgif($current_image);
- break;
- case "image/png":
- $work_image = imagecreatefrompng($current_image);
- break;
- }
- imagecopyresampled($work_thumb,$work_image,0,0,0,0,$new_width,$new_height,$current_width,$current_height);
- if (!file_exists("images/$d/thumbnails")) {
- mkdir("images/$d/thumbnails");
- }
- imagejpeg($work_thumb,"images/$d/thumbnails/{$album_entry}-thumbnail.jpg",80);
- }
- echo "<a href=\"album.php?entry=$d&show=$album_entry\">";
- /* auto-thumbnails (20060519) - Just in case php-gd does not exist, do it the old way. */
- if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
- echo "<img src=\"images/$d/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
- }
- else {
- echo "<img src=\"images/$d/thumbnails/{$album_entry}-thumbnail.jpg\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
- }
- if (file_exists("data/items/$d/album/captions/{$album_entry}.txt")) {
- echo ' alt="';
- $img_alt = file_get_contents("data/items/$d/album/captions/{$album_entry}.txt");
- $img_alt = strip_tags($img_alt);
- echo $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($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == filedrop) and file_exists("$dir/$d/filedrop/files")) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=';
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
- echo '><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 id=panel_title>';
- }
- echo 'Filedrop';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $d;
- echo '&target=filedrop><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete filedrop"></a>';
- }
- echo '</div><div id=panel_body>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=filedrop>here</a> to enter it.";
- }
- else {
- if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
- while (($dl_file = readdir($dh_filedrop)) !== false) {
- if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
- echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&download=' . $dl_file. '&type=filedrop>';
- echo '<img src=images/filedrop.png width=36 height=36 border=0 alt="download file"></a></td>';
- echo '<td><p><b>';
- echo $dl_file;
- echo'</b>';
- if (file_exists("data/items/$d/filedrop/sha1.txt")) {
- $sha1 = sha1_file("data/items/$d/filedrop/files/$dl_file");
- echo "<br />$sha1 (<a href=http://www.faqs.org/rfcs/rfc3174 target=_maj>sha1</a>)";
- }
- if (file_exists("data/items/$d/filedrop/md5.txt")) {
- $md5 = md5_file("data/items/$d/filedrop/files/$dl_file");
- echo "<br />$md5 (<a href=http://www.faqs.org/rfcs/rfc1321 target=_maj>md5</a>)";
- }
- $size = filesize("data/items/$d/filedrop/files/$dl_file");
- echo "<br />$size_string";
- $filedrop_count_file = "data/items/$d/filedrop/count/$dl_file" . '.txt';
- if (file_exists($filedrop_count_file)) {
- echo '<br>';
- echo $filedrop_count;
- if ($filedrop_count == 1) {
- echo ' download';
- }
- if ($filedrop_count > 1) {
- echo ' downloads';
- }
- }
- echo '</p></td></tr></table>';
- }
- }
- closedir($dh_filedrop);
- }
- }
- 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($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == pdf) and file_exists("data/items/$d/pdf/file")) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=';
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
- echo '><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 id=panel_title>';
- }
- echo 'PDF';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $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 id=panel_body>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=pdf>here</a> to enter it.";
- }
- else {
- if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
- while (($dl_file = readdir($dh_pdf)) !== false) {
- if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
- echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&download=' . $dl_file. '&type=pdf>';
- echo '<img src=images/pdf.png width=48 height=48 border=0 alt="download file"></a></td>';
- echo '<td><p><b>';
- echo $dl_file;
- echo'</b><br>';
- $size = filesize("data/items/$d/pdf/file/$dl_file");
- echo $size_string;
- $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
- if (file_exists($pdf_count_file)) {
- echo '<br>';
- echo $pdf_count;
- if ($pdf_count == 1) {
- echo ' download';
- }
- if ($pdf_count > 1) {
- echo ' downloads';
- }
- }
- echo '</p></td></tr></table>';
- }
- }
- closedir($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($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == comments) and !file_exists("data/nocomment.txt")) {
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- }
- else {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=';
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
- echo '><tr><td>';
- if ($dh_comments = opendir("$dir/$d/comments/live")) {
- while (($entry_comments = readdir($dh_comments)) !== false) {
- if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) { $show_comments[] = $entry_comments;
- }
- }
- closedir($dh_comments);
- }
- asort($show_comments);
- reset($show_comments);
- foreach ($show_comments as $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 id=panel_title>';
- }
- if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
- echo '<a target=_maj href=';
- readfile("$dir/$d/comments/live/$comment/url.txt");
- echo '>';
- }
- readfile("$dir/$d/comments/live/$comment/firstname.txt");
- echo ' ';
- readfile("$dir/$d/comments/live/$comment/lastname.txt");
- if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
- echo '</a>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo ' <';
- readfile("$dir/$d/comments/live/$comment/email.txt");
- echo '>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=' . $d . '&comment=' . $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=' . $d . '&comment=' . $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=' . $d . '&comment=' . $comment . '&type=live><img src=images/widget.edit.png width=11 height=11 border=0 align=right alt="edit comment"></a>';
- }
- echo '</div><div id=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("$dir/$d/comments/live/$comment/author.txt")) {
- echo "<td width=85 valign=top><p>";
- $c_author = file_get_contents("$dir/$d/comments/live/$comment/author.txt");
- echo "<a href=member.php?id=$c_author>";
- if ((file_get_contents("data/username.txt") == $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")) {
- $c_avatar_gif_image_size = getimagesize("images/avatar.gif");
- $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
- $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
- $c_max_avatar_gif_image_width = 80;
- if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {
- $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
- $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
- $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.gif border=0 width=";
- echo $c_avatar_gif_image_width;
- echo " height=";
- echo $c_avatar_gif_image_height;
- }
- if (file_exists("images/avatar.jpg")) {
- $c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
- $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
- $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
- $c_max_avatar_jpg_image_width = 80;
- if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {
- $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
- $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
- $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.jpg border=0 width=";
- echo $c_avatar_jpg_image_width;
- echo " height=";
- echo $c_avatar_jpg_image_height;
- }
- if (file_exists("images/avatar.png")) {
- $c_avatar_png_image_size = getimagesize("images/avatar.png");
- $c_avatar_png_image_width = $c_avatar_png_image_size[0];
- $c_avatar_png_image_height = $c_avatar_png_image_size[1];
- $c_max_avatar_png_image_width = 80;
- if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {
- $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
- $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
- $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.png border=0 width=";
- echo $c_avatar_png_image_width;
- echo " height=";
- echo $c_avatar_png_image_height;
- }
- echo "><br>";
- }
- elseif (file_exists("images/members/$c_author/avatar.jpg") or file_exists("images/members/$c_author/avatar.gif") or file_exists("images/members/$c_author/avatar.png")) {
- if (file_exists("images/members/$c_author/avatar.gif")) {
- $c_avatar_gif_image_size = getimagesize("images/members/$c_author/avatar.gif");
- $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
- $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
- $c_max_avatar_gif_image_width = 80;
- if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {
- $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
- $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
- $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=images/members/$c_author/avatar.gif border=0 width=";
- echo $c_avatar_gif_image_width;
- echo " height=";
- echo $c_avatar_gif_image_height;
- }
- if (file_exists("images/members/$c_author/avatar.jpg")) {
- $c_avatar_jpg_image_size = getimagesize("images/members/$c_author/avatar.jpg");
- $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
- $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
- $c_max_avatar_jpg_image_width = 80;
- if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {
- $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
- $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
- $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/members/$c_author/avatar.jpg border=0 width=";
- echo $c_avatar_jpg_image_width;
- echo " height=";
- echo $c_avatar_jpg_image_height;
- }
- if (file_exists("images/members/$c_author/avatar.png")) {
- $c_avatar_png_image_size = getimagesize("images/members/$c_author/avatar.png");
- $c_avatar_png_image_width = $c_avatar_png_image_size[0];
- $c_avatar_png_image_height = $c_avatar_png_image_size[1];
- $c_max_avatar_png_image_width = 80;
- if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {
- $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
- $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
- $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
- }
- echo "<img src=images/members/$c_author/avatar.png border=0 width=";
- echo $c_avatar_png_image_width;
- echo " height=";
- echo $c_avatar_png_image_height;
- }
- echo "><br>";
- }
- echo "$c_author</a><br>";
- if ((file_get_contents("data/username.txt") == $c_author) and file_exists("data/rank.txt")) {
- echo "administrator<br>";
- }
- elseif (file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
- $c_rank = file_get_contents("data/members/active/$c_author/rank.txt");
- echo "$c_rank<br>";
- }
- elseif (!file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
- echo "member<br>";
- }
- if ($c_dh_posts = opendir("data/items")) {
- while (($c_entry_posts = readdir($c_dh_posts)) !== false) {
- if (file_exists("data/items/$c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $c_post_cat_dir = file_get_contents("data/items/$c_entry_posts/category.txt");
- if (file_exists("data/categories/$c_post_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$c_entry_posts/cat.txt")) {
- continue;
- }
- if ($c_entry_posts != "." && $c_entry_posts != ".." && fnmatch("*", $c_entry_posts)) {
- if (file_exists("data/members/active/$c_author") and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
- $c_items_posts[] = $c_entry_posts;
- }
- }
- elseif (!file_exists("data/members/active/$c_author") and (file_get_contents("data/username.txt") == $c_author) and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
- $c_items_posts[] = $c_entry_posts;
- }
- }
- }
- }
- closedir($c_dh_posts);
- }
- $c_posts = count($c_items_posts);
- if ($c_posts == 1) {
- echo "$c_posts post";
- }
- if ($c_posts > 1) {
- echo "$c_posts posts";
- }
- unset($c_items_posts);
- echo "</p></td><td width=513 valign=top>";
- }
- else {
- echo "<td width=598 valign=top>";
- }
- echo '<p><font style="font-size: 10px; color: #999999;">';
- if ((file_exists("$dir/$d/comments/live/$comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("$dir/$d/comments/live/$comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
- $cxavatar_author = file_get_contents("$dir/$d/comments/live/$comment/author.txt");
- echo "<a href=member.php?id=$cxavatar_author>$cxavatar_author</a> - ";
- }
- readfile("$dir/$d/comments/live/$comment/timestamp.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if (file_exists("$dir/$d/comments/live/$comment/revisions.txt")) {
- echo ' (Revision ';
- readfile("$dir/$d/comments/live/$comment/revisions.txt");
- echo ')';
- }
- }
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- $entry_comment = file_get_contents("$dir/$d/comments/live/$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"))))) {
- $badwords = file_get_contents("data/pf-badwords.txt");
- if (file_exists("data/pf-censor.txt")) {
- $censor = file_get_contents("data/pf-censor.txt");
- }
- else {
- $censor = "[expletive]";
- }
- $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
- }
- echo $entry_comment;
- echo '</p></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($show_comments);
- echo '</td></tr></table>';
- }
- if (!file_exists("data/nocomment.txt")) {
- echo '<p><table border=0 cellspacing=0 cellpadding=0 width=';
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
- echo '><tr><td>';
- echo '<p><font style="font-size: 12px;"><b>Add Comment</b></font></p>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "<p>This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=comments>here</a> to enter it.</p>";
- }
- else {
- $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>$captcha_rand</b> in the anti-spam field";
- }
- echo " to add your comment.";
- if (!isset($_SESSION['logged_in']) 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="<?php echo $_SERVER['PHP_SELF']; ?>?entry=<?php echo $d; ?>&show=comments" method="post">
- <input type=hidden name=captcha_get value="<?php echo $captcha_rand; ?>">
- <tr>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- ?>
- <td width=75><p></p></td><td><input type=hidden name=cauthor value="<?php echo $_SESSION['logged_in']; ?>"><input type=hidden name=firstname value="<?php $logged_in_author = explode(" ", file_get_contents("data/author.txt")); echo trim(str_replace(",","",$logged_in_author[0])); ?>"></p></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><p></p></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"); ?>"></p></td>
- <?php
- }
- else {
- ?>
- <td width=75><p>First Name*</p></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><p>:((</p></td><td ><p>crying</p></td></tr>
- <tr><td><img src=images/smileys/frown.png border=0></td><td><p>:(</p></td><td><p>frown</p></td></tr>
- <tr><td><img src=images/smileys/indifferent.png border=0></td><td><p>:|</p></td><td><p>indifferent</p></td></tr>
- <tr><td><img src=images/smileys/laughing.png border=0></td><td><p>:D</p></td><td><p>laughing</p></td></tr>
- <tr><td><img src=images/smileys/lick.png border=0></td><td><p>:P</p></td><td><p>lick</p></td></tr>
- <tr><td><img src=images/smileys/ohno.png border=0></td><td><p>:O</p></td><td><p>oh no!</p></td></tr>
- <tr><td><img src=images/smileys/smile.png border=0></td><td><p>:)</p></td><td><p>smile</p></td></tr>
- <tr><td><img src=images/smileys/surprised.png border=0></td><td><p>=)</p></td><td><p>surprised</p></td></tr>
- <tr><td><img src=images/smileys/undecided.png border=0></td><td><p>:\</p></td><td><p>undecided</p></td></tr>
- <tr><td><img src=images/smileys/wink.png border=0></td><td><p>;)</p></td><td><p>wink</p></td></tr>
- </td></tr>
- </table>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- ?>
- <td width=75><p></p></td><td><input type=hidden name=lastname value="<?php echo trim(str_replace(",","",$logged_in_author[1])); ?>"></p></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><p></p></td><td><input type=hidden name=lastname value="<?php echo file_get_contents("data/members/active/{$_SESSION['logged_in']}/lastname.txt"); ?>"></p></td>
- <?php
- }
- else {
- ?>
- <tr><td><p>Last Name*</p></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
- <?php
- }
- ?>
- <?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><p></p></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></p></td>
- <?php
- }
- else {
- echo "<tr><td><p>E-mail*</p></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><p></p></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/members/active/{$_SESSION['logged_in']}/email.txt"); ?>"></p></td>
- <?php
- }
- else {
- ?>
- <tr><td><p>E-mail*</p></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
- <?php
- }
- ?>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- ?>
- <td width=75><p></p></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></p></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><p></p></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"); } ?>"></p></td>
- <?php
- }
- else {
- ?>
- <tr><td><p>Website</p></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
- <?php
- }
- ?>
- <tr><td><p>Comment*</p></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=\"$captcha_rand\">";
- }
- else {
- echo "<tr><td><p>Anti-Spam*</p></td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
- }
- ?>
- <tr><td><p></p></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
- </form>
- </table>
- <?php } ?>
- </td></tr></table></p>
- <?php
- }
- 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($_REQUEST['show']) and !empty($_REQUEST['show']) and isset($_REQUEST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_REQUEST['firstname']) and !empty($_REQUEST['firstname']) and isset($_REQUEST['lastname']) and !empty($_REQUEST['lastname']) and isset($_REQUEST['email']) and !empty($_REQUEST['email']) and isset($_REQUEST['new_comment']) and !empty($_REQUEST['new_comment']) and isset($_REQUEST['captcha_put']) and !empty($_REQUEST['captcha_put']) and ($_REQUEST['captcha_get'] == $_REQUEST['captcha_put']) and (ereg("@", $_REQUEST['email'])) and (ereg("\.", $_REQUEST['email']))) {
- echo '<p><table border=0 cellspacing=0 cellpadding=0><tr><td><p><font style="font-size: 12px;"><b>Thanks!</b></font></p><p>Your comment has been submitted for approval.<br>Please check back soon to see if it has been posted.</p></td></tr></table></p>';
- }
- }
- ?>
- <?php
- }
- }
- ?>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
- if ($dh_pending_comments = opendir("$dir/$d/comments/pending")) {
- while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
- if ($entry_pending_comments != "." && $entry_pending_comments != ".." && fnmatch("*", $entry_pending_comments)) {
- $show_pending_comments[] = $entry_pending_comments;
- }
- }
- closedir($dh_pending_comments);
- }
- asort($show_pending_comments);
- reset($show_pending_comments);
- $count_pending_comments = count($show_pending_comments);
- if ($count_pending_comments > 0) {
- if ($count_pending_comments == 1) {
- echo '<p><b>Pending Comment</b></p>';
- }
- else {
- echo '<p><b>Pending Comments</b></p>';
- }
- foreach ($show_pending_comments as $pending_comment) {
- echo '<p><table border=0 cellspacing=0 cellpadding=0 width=';
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
- echo '><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 id=panel_title>';
- }
- if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
- echo '<a target=_maj href=';
- readfile("$dir/$d/comments/pending/$pending_comment/url.txt");
- echo '>';
- }
- readfile("$dir/$d/comments/pending/$pending_comment/firstname.txt");
- echo ' ';
- readfile("$dir/$d/comments/pending/$pending_comment/lastname.txt");
- if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
- echo '</a>';
- }
- echo ' <';
- readfile("$dir/$d/comments/pending/$pending_comment/email.txt");
- echo '>';
- echo '<a href=del.php?entry=' . $d . '&comment=' . $pending_comment . '&type=pending><img src=images/widget.del.png width=11 height=11 border=0 align=right alt="delete comment"></a>';
- $pending_comment_key_file = "$dir/$d/comments/pending/$pending_comment/key.txt";
- $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&comment=' . $pending_comment . '&key=' . $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=' . $d . '&comment=' . $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=' . $d . '&comment=' . $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 id=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("$dir/$d/comments/pending/$pending_comment/author.txt")) {
- echo "<td width=85 valign=top><p>";
- $pc_author = file_get_contents("$dir/$d/comments/pending/$pending_comment/author.txt");
- echo "<a href=member.php?id=$pc_author>";
- if ((file_get_contents("data/username.txt") == $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")) {
- $pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
- $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
- $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
- $pc_max_avatar_gif_image_width = 80;
- if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {
- $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
- $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
- $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.gif border=0 width=";
- echo $pc_avatar_gif_image_width;
- echo " height=";
- echo $pc_avatar_gif_image_height;
- }
- if (file_exists("images/avatar.jpg")) {
- $pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
- $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
- $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
- $pc_max_avatar_jpg_image_width = 80;
- if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {
- $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
- $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
- $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.jpg border=0 width=";
- echo $pc_avatar_jpg_image_width;
- echo " height=";
- echo $pc_avatar_jpg_image_height;
- }
- if (file_exists("images/avatar.png")) {
- $pc_avatar_png_image_size = getimagesize("images/avatar.png");
- $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
- $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
- $pc_max_avatar_png_image_width = 80;
- if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {
- $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
- $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
- $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
- }
- echo "<img src=images/avatar.png border=0 width=";
- echo $pc_avatar_png_image_width;
- echo " height=";
- echo $pc_avatar_png_image_height;
- }
- echo "><br>";
- }
- elseif (file_exists("images/members/$pc_author/avatar.jpg") or file_exists("images/members/$pc_author/avatar.gif") or file_exists("images/members/$pc_author/avatar.png")) {
- if (file_exists("images/members/$pc_author/avatar.gif")) {
- $pc_avatar_gif_image_size = getimagesize("images/members/$pc_author/avatar.gif");
- $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
- $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
- $pc_max_avatar_gif_image_width = 80;
- if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {
- $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
- $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
- $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=images/members/$pc_author/avatar.gif border=0 width=";
- echo $pc_avatar_gif_image_width;
- echo " height=";
- echo $pc_avatar_gif_image_height;
- }
- if (file_exists("images/members/$pc_author/avatar.jpg")) {
- $pc_avatar_jpg_image_size = getimagesize("images/members/$pc_author/avatar.jpg");
- $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
- $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
- $pc_max_avatar_jpg_image_width = 80;
- if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {
- $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
- $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
- $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/members/$pc_author/avatar.jpg border=0 width=";
- echo $pc_avatar_jpg_image_width;
- echo " height=";
- echo $pc_avatar_jpg_image_height;
- }
- if (file_exists("images/members/$pc_author/avatar.png")) {
- $pc_avatar_png_image_size = getimagesize("images/members/$pc_author/avatar.png");
- $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
- $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
- $pc_max_avatar_png_image_width = 80;
- if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {
- $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
- $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
- $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
- }
- echo "<img src=images/members/$pc_author/avatar.png border=0 width=";
- echo $pc_avatar_png_image_width;
- echo " height=";
- echo $pc_avatar_png_image_height;
- }
- echo "><br>";
- }
- echo "$pc_author</a><br>";
- if ((file_get_contents("data/username.txt") == $pc_author) and file_exists("data/rank.txt")) {
- echo "administrator<br>";
- }
- elseif (file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
- $pc_rank = file_get_contents("data/members/active/$pc_author/rank.txt");
- echo "$pc_rank<br>";
- }
- elseif (!file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
- echo "member<br>";
- }
- if ($pc_dh_posts = opendir("data/items")) {
- while (($pc_entry_posts = readdir($pc_dh_posts)) !== false) {
- if (file_exists("data/items/$pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $pc_post_cat_dir = file_get_contents("data/items/$pc_entry_posts/category.txt");
- if (file_exists("data/categories/$pc_post_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$pc_entry_posts/cat.txt")) {
- continue;
- }
- if ($pc_entry_posts != "." && $pc_entry_posts != ".." && fnmatch("*", $pc_entry_posts)) {
- if (file_exists("data/members/active/$pc_author") and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
- $pc_items_posts[] = $pc_entry_posts;
- }
- }
- elseif (!file_exists("data/members/active/$pc_author") and (file_get_contents("data/username.txt") == $pc_author) and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
- $pc_items_posts[] = $pc_entry_posts;
- }
- }
- }
- }
- closedir($pc_dh_posts);
- }
- $pc_posts = count($pc_items_posts);
- if ($pc_posts == 1) {
- echo "$pc_posts post";
- }
- if ($pc_posts > 1) {
- echo "$pc_posts posts";
- }
- unset($pc_items_posts);
- echo "</p></td><td width=513 valign=top>";
- }
- else {
- echo "<td width=598 valign=top>";
- }
- echo '<p><font style="font-size: 10px; color: #999999;">';
- if ((file_exists("$dir/$d/comments/pending/$pending_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("$dir/$d/comments/pending/$pending_comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
- $pxavatar_author = file_get_contents("$dir/$d/comments/pending/$pending_comment/author.txt");
- echo "<a href=member.php?id=$pxavatar_author>$pxavatar_author</a> - ";
- }
- readfile("$dir/$d/comments/pending/$pending_comment/timestamp.txt");
- if (file_exists("$dir/$d/comments/pending/$pending_comment/revisions.txt")) {
- echo ' (Revision ';
- readfile("$dir/$d/comments/pending/$pending_comment/revisions.txt");
- echo ')';
- }
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- readfile("$dir/$d/comments/pending/$pending_comment/comment.txt");
- echo '</p></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($show_pending_comments);
- echo '</td></tr></table></p>';
- }
- }
- }
- ?>
- <p><table border=0 cellspacing=0 cellpadding=0 width=100%><tr>
- <?php
- if (($start >= $increase) and ($start != 0)) {
- echo "<td align=left><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
- echo "category={$_REQUEST['category']}&";
- }
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- echo "archive={$_REQUEST['archive']}&";
- }
- if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
- echo "author={$_REQUEST['author']}&";
- }
- if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and !file_exists("data/members/active/{$_REQUEST['author']}") and (file_get_contents("data/username.txt") == $_REQUEST['author']) and file_exists("data/bb.txt")) {
- echo "author={$_REQUEST['author']}&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "private")) {
- echo "find=private&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "member")) {
- echo "find=member&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "passwd")) {
- echo "find=passwd&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "album")) {
- echo "find=album&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "filedrop")) {
- echo "find=filedrop&";
- }
- echo "start=" . ($start-$increase) . "\">previous</a></p></td>";
- }
- if ($end < sizeof($items)) {
- echo "<td align=right><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
- echo "category={$_REQUEST['category']}&";
- }
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- echo "archive={$_REQUEST['archive']}&";
- }
- if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
- echo "author={$_REQUEST['author']}&";
- }
- if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and !file_exists("data/members/active/{$_REQUEST['author']}") and (file_get_contents("data/username.txt") == $_REQUEST['author']) and file_exists("data/bb.txt")) {
- echo "author={$_REQUEST['author']}&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "private")) {
- echo "find=private&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "member")) {
- echo "find=member&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "passwd")) {
- echo "find=passwd&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "album")) {
- echo "find=album&";
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "filedrop")) {
- echo "find=filedrop&";
- }
- echo "start=" . ($start+$increase) . "\">next</a></p></td>";
- }
- ?>
- </tr></table></p>
- </td>
- <td width=175 valign=top>
- <?php
- if ($dh_latest_items = opendir($dir)) {
- while (($entry_latest_items = readdir($dh_latest_items)) !== false) {
- if (file_exists("data/items/$entry_latest_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$entry_latest_items/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $cat_dir = file_get_contents("data/items/$entry_latest_items/category.txt");
- if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_latest_items/cat.txt")) {
- continue;
- }
- if (file_exists("data/nocat.txt") and file_exists("data/items/$entry_latest_items/category.txt") and !file_exists("data/items/$entry_latest_items/cat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if ($entry_latest_items != "." && $entry_latest_items != ".." && fnmatch("*", $entry_latest_items)) {
- $show_latest_items[] = $entry_latest_items;
- }
- }
- closedir($dh_latest_items);
- }
- rsort($show_latest_items);
- reset($show_latest_items);
- $count_latest_items = count($show_latest_items);
- if ($count_latest_items > 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 id=panel_title>';
- }
- echo 'Recent Entries</div><div id=panel_body>';
- $increment_recent_entries = 0;
- if (($count_latest_items <= $increase) or ($count_latest_items <= $increase * 2)) {
- $increase = $count_latest_items;
- $show_recent_entries = $increase - 1;
- }
- else {
- $show_recent_entries = $increase * 2 - 1;
- }
- while ($increment_recent_entries <= $show_recent_entries) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_items[$increment_recent_entries] . '>';
- readfile("$dir/$show_latest_items[$increment_recent_entries]/title.txt");
- echo '</a><br>';
- $increment_recent_entries = $increment_recent_entries + 1;
- }
- }
- if ($count_latest_items > 0) {
- 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 (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 id=panel_title>';
- }
- echo "Bulletin Board</div><div id=panel_body>";
- if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
- if ($dh_active_list = opendir("data/members/active")) {
- while (($entry_active_list = readdir($dh_active_list)) !== false) {
- if ($entry_active_list != "." && $entry_active_list != ".." && fnmatch("*", $entry_active_list)) {
- $show_active_list[] = $entry_active_list;
- }
- }
- closedir($dh_active_list);
- }
- sort($show_active_list);
- reset($show_active_list);
- $count_active_list = count($show_active_list);
- if ($count_active_list > 0) {
- echo "Registered Members: $count_active_list";
- }
- }
- if (file_exists("data/items")) {
- if ($dh_mempost_list = opendir("data/items")) {
- while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
- if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- // hide_member (20070606)
- //if (file_exists("data/items/$entry_mempost_list/member.txt") and (!isset($_SESSION['logged_in']))) {
- // continue;
- //}
- $get_cat_dir = file_get_contents("data/items/$entry_mempost_list/category.txt");
- if (file_exists("data/categories/$get_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_mempost_list/cat.txt")) {
- continue;
- }
- if ($entry_mempost_list != "." && $entry_mempost_list != ".." && fnmatch("*", $entry_mempost_list)) {
- $entry_mempost_list = substr("$entry_mempost_list",0,6);
- $show_mempost_list[] = $entry_mempost_list;
- }
- }
- closedir($dh_mempost_list);
- }
- rsort($show_mempost_list);
- $count_mempost_list = count($show_mempost_list);
- echo "<br>Total Posts: $count_mempost_list";
- unset($show_mempost_list);
- }
- if (file_exists("data/bb-new.txt")) {
- $bb_new = file_get_contents("data/bb-new.txt");
- echo "<br>Newest User: <a href=member.php?id=$bb_new>$bb_new</a>";
- }
- if (file_exists("data/bb-last.txt")) {
- $bb_last = file_get_contents("data/bb-last.txt");
- echo "<br>Latest Login: <a href=member.php?id=$bb_last>$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>';
- }
- }
- ?>
- <form enctype="multipart/form-data" action="dig.php" method="post">
- <?php
- 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 id=panel_title>';
- }
- ?>
- Search</div>
- <input type=text class=search name=search autocomplete=off maxlength=55>
- </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>';
- }
- ?>
- </form>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $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 id=panel_title>';
- }
- echo "Find Entries</div><div id=panel_body>";
- echo "<a href=index.php?find=private>Private</a>";
- if (file_exists("data/bb.txt")) {
- echo "<br><a href=index.php?find=member>Members-Only</a>";
- }
- echo "<br><a href=index.php?find=passwd>Password Protected</a>";
- echo "<br><a href=index.php?find=filedrop>With Attached Files</a>";
- echo "<br><a 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>';
- }
- }
- ?>
- <?php
- if (file_exists("data/categories")) {
- if ($dh_categories = opendir("data/categories")) {
- while (($entry_categories = readdir($dh_categories)) !== false) {
- if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
- $show_categories[] = $entry_categories;
- }
- }
- closedir($dh_categories);
- }
- sort($show_categories);
- reset($show_categories);
- $count_categories = count($show_categories);
- if ($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 id=panel_title>';
- }
- echo 'Categories</div><div id=panel_body>';
- foreach ($show_categories as $category) {
- echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
- if (file_exists("data/categories/$category/title.txt")) {
- $category_title = file_get_contents("data/categories/$category/title.txt");
- }
- else {
- $category_title = ucfirst(str_replace("_"," ",$category));
- }
- echo $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'] == $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 id=panel_title>';
- }
- echo 'Statistics</div><div id=panel_body>';
- echo "Total Entries: $count_latest_items";
- 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>';
- }
- }
- }
- ?>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
- if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
- $show_pending_comment_flags[] = $entry_pending_comment_flags;
- }
- }
- closedir($dh_pending_comment_flags);
- }
- rsort($show_pending_comment_flags);
- reset($show_pending_comment_flags);
- $count_pending_comment_flags = count($show_pending_comment_flags);
- if (($count_latest_items > 0) and ($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 id=panel_title>';
- }
- echo 'Pending Comments</div>';
- echo '<div id=panel_body>';
- if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
- if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' .$entry_list_pending_comment_flags . '&show=comments>';
- readfile("data/items/$entry_list_pending_comment_flags/title.txt");
- echo '</a><br><font style="font-size: 10px; color: #999999;">';
- $fp_comment_count_txt = fopen("data/comments/pending/$entry_list_pending_comment_flags/count.txt","r");
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$entry_list_pending_comment_flags/count.txt"));
- if ($comment_count_value == 1) {
- echo ' ( ' . $comment_count_value . ' comment ) ';
- }
- elseif ($comment_count_value > 1) {
- echo ' ( ' . $comment_count_value . ' comments ) ';
- }
- else {
- echo '';
- }
- echo '</font><br>';
- }
- }
- closedir($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>';
- }
- }
- }
- ?>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $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 ($dh_pending_list = opendir("data/members/confirmed")) {
- while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
- if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*", $entry_pending_list)) {
- $show_pending_list[] = $entry_pending_list;
- }
- }
- closedir($dh_pending_list);
- }
- sort($show_pending_list);
- reset($show_pending_list);
- $count_pending_list = count($show_pending_list);
- if ($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 id=panel_title>';
- }
- echo "Pending Member";
- if ($count_pending_list > 1) {
- echo "s";
- }
- echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
- if ($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 ($show_pending_list as $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 id=panel_title>';
- }
- echo "$pending_list_entry";
- echo '<a href=reg.php?username=';
- echo $pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$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 $pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$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 id=panel_body>";
- if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
- echo "<a href=\"";
- readfile("data/members/confirmed/$pending_list_entry/url.txt");
- echo "\" target=_pending>";
- }
- readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
- echo " ";
- readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
- if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
- echo "</a>";
- }
- echo "<br>";
- $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
- $pending_email = wordwrap($pending_email,30);
- echo $pending_email;
- if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
- $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
- $confirmed_year = substr($confirmed,0,4);
- $confirmed_month = substr($confirmed,4,2);
- $confirmed_day = substr($confirmed,6,2);
- $confirmed_hh = substr($confirmed,8,2);
- $confirmed_mm = substr($confirmed,10,2);
- $email_confirmed = date("d M Y H:i", mktime($confirmed_hh, $confirmed_mm, 0, $confirmed_month, $confirmed_day, $confirmed_year));
- echo "<br>$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>';
- }
- }
- }
- }
- ?>
- <?php
- if (file_exists("data/albums")) {
- if ($dh_album_list = opendir("data/albums")) {
- while (($entry_album_list = readdir($dh_album_list)) !== false) {
- if (file_exists("data/items/$entry_album_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$entry_album_list/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $pull_cat_dir = file_get_contents("data/items/$entry_album_list/category.txt");
- if (file_exists("data/categories/$pull_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_album_list/cat.txt")) {
- continue;
- }
- if ($entry_album_list != "." && $entry_album_list != ".." && fnmatch("*", $entry_album_list)) {
- $show_album_list[] = $entry_album_list;
- }
- }
- closedir($dh_album_list);
- }
- rsort($show_album_list);
- reset($show_album_list);
- $count_album_list = count($show_album_list);
- if ($count_album_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 id=panel_title>';
- }
- echo 'Albums</div>';
- echo '<div id=panel_body>';
- foreach ($show_album_list as $album_list_entry) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=';
- echo $album_list_entry;
- echo '&show=album>';
- readfile("data/items/$album_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>';
- }
- }
- }
- ?>
- <?php
- if (!file_exists("data/xrand.txt")) {
- if ($dh_random_post_items = opendir($dir)) {
- while (($entry_random_post_items = readdir($dh_random_post_items)) !== false) {
- if (file_exists("data/items/$entry_random_post_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $cat_dir = file_get_contents("data/items/$entry_random_post_items/category.txt");
- if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_random_post_items/cat.txt")) {
- continue;
- }
- if ($entry_random_post_items != "." && $entry_random_post_items != ".." && fnmatch("*", $entry_random_post_items)) {
- $show_random_post_items[] = $entry_random_post_items;
- }
- }
- closedir($dh_random_post_items);
- }
- shuffle($show_random_post_items);
- reset($show_random_post_items);
- $count_random_post_items = count($show_random_post_items);
- if (file_exists("data/increase.txt")) {
- $limit_random_post_entries = file_get_contents("data/increase.txt");
- }
- else {
- $limit_random_post_entries = 5;
- }
- if ($count_random_post_items > $limit_random_post_entries) {
- 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 id=panel_title>';
- }
- echo "Random Entries</div><div id=panel_body>";
- $increment_random_post_entries = 0;
- if ($count_random_post_items <= $limit_random_post_entries * 2) {
- $show_random_post_entries = $count_random_post_items - 1;
- }
- else {
- $show_random_post_entries = $limit_random_post_entries * 2 - 1;
- }
- while ($increment_random_post_entries <= $show_random_post_entries) {
- echo "<a href=index.php?entry={$show_random_post_items[$increment_random_post_entries]}>";
- readfile("$dir/$show_random_post_items[$increment_random_post_entries]/title.txt");
- echo "</a><br>";
- $increment_random_post_entries = $increment_random_post_entries + 1;
- }
- }
- if ($count_random_post_items > 0) {
- 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 (file_exists("data/items")) {
- if ($dh_archive_list = opendir("data/items")) {
- while (($entry_archive_list = readdir($dh_archive_list)) !== false) {
- if (file_exists("data/xarc.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$entry_archive_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- // hide member
- //if (file_exists("data/items/$entry_archive_list/member.txt") and (!isset($_SESSION['logged_in']))) {
- // continue;
- //}
- $get_cat_dir = file_get_contents("data/items/$entry_archive_list/category.txt");
- if (file_exists("data/categories/$get_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_archive_list/cat.txt")) {
- continue;
- }
- if ($entry_archive_list != "." && $entry_archive_list != ".." && fnmatch("*", $entry_archive_list)) {
- $entry_archive_list = substr("$entry_archive_list",0,6);
- $show_archive_list[] = $entry_archive_list;
- }
- }
- closedir($dh_archive_list);
- }
- rsort($show_archive_list);
- reset($show_archive_list);
- $count_archive_list = count($show_archive_list);
- if ($count_archive_list > 0) {
- $archive_entries = implode(" ",$show_archive_list);
- $unique_archive_list = array_unique($show_archive_list);
- 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 id=panel_title>';
- }
- echo "Archives ($count_archive_list)</div>";
- echo "<div id=panel_body>";
- foreach ($unique_archive_list as $archive_list_entry) {
- $archive_list_value = substr($archive_list_entry,0,6);
- $archive_list_year = substr($archive_list_entry,0,4);
- $archive_list_month = substr($archive_list_entry,4,2);
- echo "<a href=\"index.php?archive=$archive_list_value\">$archive_list_month $archive_list_year</a> (";
- echo substr_count($archive_entries,$archive_list_entry);
- echo ")<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>';
- }
- }
- }
- ?>
- <?php
- if (file_exists("data/clustrmaps.php")) {
- 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 id=panel_title>';
- }
- echo 'ClustrMaps</div>';
- echo '<div id=panel_body><center>';
- include("data/clustrmaps.php");
- echo '</center></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 (file_exists("data/adsense.php")) {
- 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 id=panel_title>';
- }
- echo 'AdSense</div>';
- echo '<div id=panel_body><center>';
- include("data/adsense.php");
- echo '</center></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 (file_exists("data/panels")) {
- if ($dh_right_panel_list = opendir("data/panels")) {
- while (($entry_right_panel_list = readdir($dh_right_panel_list)) !== false) {
- if (file_exists("data/panels/$entry_right_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (!file_exists("data/panels/$entry_right_panel_list/right.txt")) {
- continue;
- }
- if ($entry_right_panel_list != "." && $entry_right_panel_list != ".." && fnmatch("*", $entry_right_panel_list)) {
- $show_right_panel_list[] = $entry_right_panel_list;
- }
- }
- closedir($dh_right_panel_list);
- }
- sort($show_right_panel_list);
- reset($show_right_panel_list);
- $count_right_panel_list = count($show_right_panel_list);
- if ($count_right_panel_list > 0) {
- foreach ($show_right_panel_list as $right_panel_list_entry) {
- if (!file_exists("data/panels/$right_panel_list_entry/free.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 id=panel_title>';
- }
- readfile("data/panels/$right_panel_list_entry/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo "<a href=panels.php#{$right_panel_list_entry}>";
- echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
- }
- echo '</div><div id=panel_body>';
- }
- if (file_exists("data/panels/$right_panel_list_entry/free.txt")) {
- echo '<div id=panel_free>';
- }
- include("data/panels/$right_panel_list_entry/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$right_panel_list_entry/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
- }
- }
- ?>
- <?php
- if ($count_latest_items > 0) {
- echo '<p><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>';
- $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $validate_uri = str_replace('//', '/', $validate_uri);
- $validate_uri = "http://" . $validate_uri;
- echo '<tr><td align=center><a target="_button" href="http://jigsaw.w3.org/css-validator/validator?uri=' . $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")) {
- echo '<tr><td align=center><a target="_button" href="http://www.spreadfirefox.com/?q=affiliates&id=' . $sfx . '&t=85"><img src=images/button.firefox.png border=0 width=80 height=15></a></td></tr>';
- }
- echo '</table></p>';
- }
- ?>
- <p></p>
- </td></tr>
- </table>
- <?php
- if (file_exists("footer.php")) {
- echo '<p></p>';
- include("footer.php");
- }
- if (file_exists("data/center.txt")) {
- echo "</center>";
- }
- ?>