This blob has been accessed 526 times via Git panel.
- <?php
- ini_set("session.use_trans_sid","0");
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
- header("Location: login.php");
- }
- if (get_magic_quotes_gpc()) {
- function stripslashes_array($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);
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
- $req_entry = trim($_REQUEST['entry']);
- }
- if (isset($_REQUEST['show']) and !empty($_REQUEST['show'])) {
- $req_show = trim($_REQUEST['show']);
- }
- if (isset($_REQUEST['find']) and !empty($_REQUEST['find'])) {
- $req_find = trim($_REQUEST['find']);
- $req_find = str_replace(" ","-",$req_find);
- $req_find = strtolower($req_find);
- $req_find = strip_tags($req_find);
- }
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
- $req_category = trim($_REQUEST['category']);
- $req_category = str_replace(" ","-",$req_category);
- $req_category = strtolower($req_category);
- $req_category = strip_tags($req_category);
- }
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- $req_archive = trim($_REQUEST['archive']);
- }
- if (isset($_REQUEST['author']) and !empty($_REQUEST['author'])) {
- $req_author = trim($_REQUEST['author']);
- $req_author = str_replace(" ","-",$req_author);
- $req_author = strtolower($req_author);
- $req_author = strip_tags($req_author);
- }
- 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;
- }
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- $wmain = "610";
- }
- else {
- $wmain = "525";
- }
- $wside = "175";
- $wspace = "10";
- $wtable = $wside + $wspace + $wmain + $wspace + $wside;
- $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">Open Source</a> blog written from scratch as a spare time family project by <a href="http://psylocke.org/" target="_maj">Psylocke</a>, <a href="http://gaffud.com/" target="_maj">Magie</a>, and <a href="http://engels.mortega.net/" target="_maj">Engels</a> Antonio.';
- $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")) {
- }
- $default_title = file_get_contents("data/title.txt");
- $login_username = file_get_contents("data/username.txt");
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
- if (file_exists("data/hits.txt")) {
- $global_hits_count = file_get_contents("data/hits.txt");
- }
- else {
- $global_hits_count = "0";
- }
- $global_hits_count = $global_hits_count + 1;
- }
- if (@ereg("Google",$_SERVER['HTTP_USER_AGENT'])) {
- if (file_exists("data/google.txt")) {
- $google_hits_count = file_get_contents("data/google.txt");
- }
- else {
- $google_hits_count = "0";
- }
- $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");
- $dl_file = str_replace("../","",@$_REQUEST['download']);
- go_download($dl_file);
- die();
- }
- function go_download($dl_file) {
- $req_entry = trim($_REQUEST['entry']);
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "pdf")) {
- $dl_path = "data/items/$req_entry/pdf/file";
- $count_path = "data/items/$req_entry/pdf/count";
- $count_file = "dl.txt";
- }
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "filedrop")) {
- $dl_path = "data/items/$req_entry/filedrop/files";
- $count_path = "data/items/$req_entry/filedrop/count";
- $count_file = "{$dl_file}.txt";
- }
- $dl_file_size = filesize("$dl_path/$dl_file");
- header("Cache-Control: ");
- header("Pragma: ");
- header("Content-type: application/octet-stream");
- header("Content-Disposition: attachment; filename=$dl_file");
- header("Content-length: $dl_file_size");
- echo $buf;
- }
- if ($bytes_sent == $dl_file_size) {
- if (!file_exists($count_path)) {
- mkdir($count_path);
- }
- $unique_downloads = "$count_path/$count_file";
- if (file_exists($unique_downloads)) {
- $count_unique_downloads = file_get_contents($unique_downloads);
- }
- else {
- $count_unique_downloads = "0";
- }
- $count_unique_downloads = $count_unique_downloads + 1;
- }
- }
- function entry2date($f_entry) {
- $f_entry_year = substr($f_entry,0,4);
- $f_entry_month = substr($f_entry,4,2);
- $f_entry_day = substr($f_entry,6,2);
- $f_entry_hour = substr($f_entry,8,2);
- $f_entry_min = substr($f_entry,10,2);
- $f_entry_sec = substr($f_entry,12,2);
- echo date("l, M j, Y, g:i A",mktime($f_entry_hour,$f_entry_min,$f_entry_sec,$f_entry_month,$f_entry_day,$f_entry_year));
- }
- if (isset($req_entry) and !empty($req_entry) and isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['key']) and !empty($_REQUEST['key']) and isset($_REQUEST['action']) and !empty($_REQUEST['action'])) {
- $comment_dir = "data/items/$req_entry/comments/pending/{$_REQUEST['comment']}";
- $login_key = file_get_contents("$comment_dir/key.txt");
- if ($_REQUEST['key'] == $login_key) {
- if ($_REQUEST['action'] == "approve") {
- $live_dir = "data/items/$req_entry/comments/live/{$_REQUEST['comment']}";
- if (!file_exists("data/items/$req_entry/comments/live")) {
- mkdir("data/items/$req_entry/comments/live");
- }
- if (!file_exists("data/items/$req_entry/comments/live/{$_REQUEST['comment']}")) {
- mkdir("data/items/$req_entry/comments/live/{$_REQUEST['comment']}");
- }
- unlink("$live_dir/key.txt");
- if (!file_exists("data/comments/latest")) {
- mkdir("data/comments/latest");
- }
- if (!file_exists("data/comments/latest/$cmonth")) {
- mkdir("data/comments/latest/$cmonth");
- }
- if (!file_exists("data/comments/latest/$cmonth/$req_entry")) {
- mkdir("data/comments/latest/$cmonth/$req_entry");
- }
- if (!file_exists("data/comments/latest/$cmonth/$req_entry/{$_REQUEST['comment']}")) {
- mkdir("data/comments/latest/$cmonth/$req_entry/{$_REQUEST['comment']}");
- }
- if (file_exists("data/members/active") and !file_exists("data/xucomment.txt")) {
- if (!file_exists("data/comments/unread")) {
- mkdir("data/comments/unread");
- }
- if (!file_exists("data/comments/unread/$req_entry")) {
- mkdir("data/comments/unread/$req_entry");
- }
- if ($dh_unread_active_members = opendir("data/members/active")) {
- while (($unread_active_member = readdir($dh_unread_active_members)) !== false) {
- if ($unread_active_member != "." && $unread_active_member != "..") {
- if (!file_exists("data/members/active/$unread_active_member/comments")) {
- mkdir("data/members/active/$unread_active_member/comments");
- }
- if (!file_exists("data/members/active/$unread_active_member/comments/unread")) {
- mkdir("data/members/active/$unread_active_member/comments/unread");
- }
- if (!file_exists("data/members/active/$unread_active_member/comments/unread/$req_entry")) {
- mkdir("data/members/active/$unread_active_member/comments/unread/$req_entry");
- }
- }
- }
- closedir($dh_unread_active_members);
- }
- }
- $private_categories = "0";
- if (file_exists("data/items/$req_entry/categories")) {
- if ($dh_entry_categories = opendir("data/items/$req_entry/categories")) {
- while (($entry_category = readdir($dh_entry_categories)) !== false) {
- if ($entry_category != "." && $entry_category != "..") {
- if (file_exists("data/categories/$entry_category/private.txt")) {
- $private_categories = $private_categories + 1;
- }
- }
- }
- closedir($dh_entry_categories);
- }
- }
- if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_exists("data/email.txt") and !file_exists("data/items/$req_entry/private.txt") and ($private_categories == "0")) {
- if (file_exists("data/ml-reply2.txt")) {
- $ml_reply2 = file_get_contents("data/ml-reply2.txt");
- }
- if (file_exists("data/ml-from.txt")) {
- $ml_from = $ml_reply2;
- }
- else {
- $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/$req_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=$req_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/$req_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 != "..") {
- 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: $req_entry\r\n" .
- "X-Mailer: $ml_mailer");
- }
- else {
- mail($ml_to,$ml_subject,$ml_body,
- "From: $ml_from\r\n" .
- "References: $req_entry\r\n" .
- "X-Mailer: $ml_mailer");
- }
- }
- }
- closedir($dh_ml_member);
- }
- }
- }
- if ($_REQUEST['action'] == "delete") {
- rmdirr($comment_dir);
- }
- $pending_comment_flag_dir = $req_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: index.php?entry=$req_entry&show=comments");
- }
- }
- if (isset($req_entry) and !empty($req_entry)) {
- if (file_exists("data/items/$req_entry")) {
- $title = file_get_contents("data/items/$req_entry/title.txt");
- echo "<title>$title</title>";
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- if (file_exists("data/items/$req_entry/views.txt")) {
- $count_views = file_get_contents("data/items/$req_entry/views.txt");
- }
- else {
- $count_views = "0";
- }
- $count_views = $count_views + 1;
- }
- if (isset($req_show) and !empty($req_show) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == $_POST['captcha_put']) and (ereg("@",$_POST['email'])) and (ereg("\.",$_POST['email']))) {
- if (!file_exists("data/items/$req_entry/comments")) {
- mkdir("data/items/$req_entry/comments");
- }
- if (!file_exists("data/items/$req_entry/comments/pending")) {
- mkdir("data/items/$req_entry/comments/pending");
- }
- if (!file_exists("data/items/$req_entry/comments/live")) {
- mkdir("data/items/$req_entry/comments/live");
- }
- mkdir("data/items/$req_entry/comments/pending/$comment_entry_dir");
- $body_content = ucfirst($_POST['new_comment']);
- $body_content = htmlentities($body_content,ENT_NOQUOTES);
- $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);
- $fp_timestamp_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/timestamp.txt","w");
- $fp_firstname_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/firstname.txt","w");
- $firstname = strtolower($_POST['firstname']);
- $firstname = ucwords($firstname);
- $firstname = trim($firstname);
- $firstname = htmlentities($firstname,ENT_NOQUOTES);
- $fp_lastname_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/lastname.txt","w");
- $lastname = strtolower($_POST['lastname']);
- $lastname = ucwords($lastname);
- $lastname = trim($lastname);
- $lastname = htmlentities($lastname,ENT_NOQUOTES);
- $email = strtolower($_POST['email']);
- $email = trim($email);
- $email = htmlentities($email,ENT_NOQUOTES);
- if (isset($_POST['url']) and !empty($_POST['url']) and (ereg("\.",$_POST['url']))) {
- $url = str_replace("http://","",$_POST['url']);
- $url = strtolower($url);
- $url = trim($url);
- $url = "http://" . $url;
- $url = htmlentities($url,ENT_NOQUOTES);
- }
- if (isset($_POST['cauthor']) and !empty($_POST['cauthor'])) {
- $fp_cauthor_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/author.txt","w");
- }
- $key_rand = str_rand(14);
- $comment_quote = ucfirst($_POST['new_comment']);
- $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($_POST['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/$req_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=$req_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") and !file_exists("data/xscreen.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=$req_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=$req_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 = $req_entry;
- if (!file_exists("data/comments/pending/$pending_comment_flag")) {
- mkdir("data/comments/pending/$pending_comment_flag");
- }
- if (file_exists("data/comments/pending/$pending_comment_flag/count.txt")) {
- $comment_count_value = file_get_contents("data/comments/pending/$pending_comment_flag/count.txt");
- }
- else {
- $comment_count_value = "0";
- }
- $comment_count_value = $comment_count_value + 1;
- }
- }
- }
- else {
- echo "<title>$default_title</title>";
- }
- if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
- if ($dh_xscreen_comments = opendir("data/comments/pending")) {
- while (($xscreen_comment = readdir($dh_xscreen_comments)) !== false) {
- if ($xscreen_comment != "." && $xscreen_comment != "..") {
- $xscreen_comments[] = $xscreen_comment;
- }
- }
- closedir($dh_xscreen_comments);
- }
- rsort($xscreen_comments);
- reset($xscreen_comments);
- if (count($xscreen_comments) > 0) {
- foreach ($xscreen_comments as $xscreen_dir) {
- if ($dh_xscreen_pending = opendir("data/items/$xscreen_dir/comments/pending")) {
- while (($xscreen_entry = readdir($dh_xscreen_pending)) !== false) {
- if ($xscreen_entry != "." && $xscreen_entry != "..") {
- $xscreen_key = file_get_contents("data/items/$xscreen_dir/comments/pending/$xscreen_entry/key.txt");
- header("Location: index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve");
- }
- }
- }
- }
- }
- }
- if (isset($req_entry) and !empty($req_entry) and file_exists("data/items/$req_entry")) {
- $private_categories = "0";
- if (file_exists("data/items/$req_entry/categories")) {
- if ($dh_entry_categories = opendir("data/items/$req_entry/categories")) {
- while (($entry_category = readdir($dh_entry_categories)) !== false) {
- if ($entry_category != "." && $entry_category != "..") {
- if (file_exists("data/categories/$entry_category/private.txt")) {
- $private_categories = $private_categories + 1;
- }
- }
- }
- closedir($dh_entry_categories);
- }
- }
- if ($private_categories == "0") {
- if (!file_exists("data/items/$req_entry/passwd.txt")) {
- if (!file_exists("data/items/$req_entry/private.txt")) {
- $description = file_get_contents("data/items/$req_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";
- }
- ?>;
- }
- a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
- font-weight: normal;
- text-decoration: none;
- }
- #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: 0px 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";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'margin: 0px 0px 0px 0px;';
- }
- else {
- echo 'margin: 0px 0px 10px 0px;';
- }
- ?>
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $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: 10px;
- 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 "#999999";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'padding: 5px 5px 2px 5px;';
- }
- else {
- echo 'padding: 5px 5px 5px 5px;';
- }
- ?>
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $panel_footer_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'margin: 0px 0px 0px 0px;';
- }
- else {
- echo 'margin: 0px 0px 10px 0px;';
- }
- ?>
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $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 0px 0px 0px;
- margin: 0px 0px 10px 0px;
- }
- .rbtop {
- display: block;
- background: transparent;
- font-size: 1px;
- margin: 0px 0px 0px 0px;
- }
- .rbbottom {
- display: block;
- background: transparent;
- font-size: 1px;
- margin: 0px 0px 10px 0px;
- }
- .rb1t,.rb2t,.rb3t,.rb4t,.rb1b,.rb2b,.rb3b,.rb4b,.rb1e,.rb2e,.rb3e,.rb4e {
- display: block;
- overflow: hidden;
- }
- .rb1t,.rb2t,.rb3t,.rb1b,.rb2b,.rb3b,.rb1e,.rb2e,.rb3e {
- height: 1px;
- }
- .rb2t,.rb3t,.rb4t {
- 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;
- }
- #panel_entry_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 0px 0px 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_category {
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $font_panel_category = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$font_panel_category},";
- }
- ?> arial,helvetica,sans-serif;
- font-size: 10px;
- color: <?php
- if (file_exists("data/colors/pf-font.txt")) {
- $panel_category_font_color = file_get_contents("data/colors/pf-font.txt");
- echo $panel_category_font_color;
- }
- else {
- echo "#999999";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- $panel_category_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $panel_category_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px 0px 0px 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_category_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_category_border_color;
- }
- else {
- echo "#cccccc";
- }
- ?>;
- <?php
- if (file_exists("data/round.txt")) {
- echo 'border-width: 1px 1px 0px 1px;';
- echo 'border-style: solid solid none solid;';
- }
- else {
- echo 'border-width: 0px 1px 1px 1px;';
- echo 'border-style: none solid solid solid;';
- }
- ?>
- text-align: left;
- }
- <?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
- </style>
- <link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
- <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="rss.php?ver=1.0">
- <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss.php?ver=2.0">
- <?php
- if (file_exists("data/center.txt")) {
- echo "<center>";
- }
- if (file_exists("data/header.txt")) {
- $header_panel = file_get_contents("data/header.txt");
- if (file_exists("data/panels/$header_panel") and (!file_exists("data/panels/$header_panel/private.txt") or isset($_SESSION['logged_in']))) {
- include("data/panels/$header_panel/panel.php");
- }
- }
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wtable\">";
- echo "<tr><td width=\"$wside\" height=\"$wspace\"></td><td width=\"$wspace\" height=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wmain\" height=\"$wspace\"></td><td width=\"$wspace\" height=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wside\" height=\"$wspace\"></td></tr>";
- echo "<tr><td width=\"$wside\" valign=\"top\">";
- if (file_exists("data/round.txt")) {
- echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
- }
- else {
- echo "<div 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=\"$profile_gif_image_width\" height=\"$profile_gif_image_height\" 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=\"$profile_jpg_image_width\" height=\"$profile_jpg_image_height\" 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=\"$profile_png_image_width\" height=\"$profile_png_image_height\" align=\"left\">";
- }
- include("data/profile.php");
- ?>
- </div>
- <?php
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id="panel_title">';
- }
- ?>
- Navigation</div>
- <a class="navlink" href="index.php">Home</a><br>
- <?php
- if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
- echo '<a class="navlink" href="member.php?id=all">Members</a><br>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a class="navlink" href="add.php">Add Entry</a><br>';
- echo '<a class="navlink" href="settings.php">Settings</a><br>';
- echo '<a class="navlink" href="panels.php">Panels</a><br>';
- echo '<a class="navlink" href="cat.php">Categories</a><br>';
- echo '<a class="navlink" href="colors.php">Colors</a><br>';
- echo '<a class="navlink" href="fonts.php">Fonts</a><br>';
- echo '<a class="navlink" href="login.php">Logout</a>';
- }
- elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$req_category")) {
- if (!file_exists("data/categories/$req_category")) {
- rmdirr("data/members/active/{$_SESSION['logged_in']}/categories/$req_category");
- }
- }
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") or file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$req_category")) {
- echo '<a class="navlink" href="add.php">Add Entry</a><br>';
- }
- echo '<a class="navlink" href="options.php">Options</a><br>';
- echo '<a class="navlink" href="login.php">Logout</a>';
- }
- else {
- if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
- echo '<a class="navlink" href="reg.php">Register</a><br>';
- }
- echo '<a class="navlink" href="login.php">Login</a>';
- }
- ?>
- </div>
- <?php
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- if (file_exists("data/sticky")) {
- if ($dh_sticky = opendir("data/sticky")) {
- while (($sticky_entry = readdir($dh_sticky)) !== false) {
- if (file_exists("data/items/$sticky_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$sticky_entry/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
- $private_categories = "0";
- if (file_exists("data/items/$sticky_entry/categories")) {
- if ($dh_sticky_categories = opendir("data/items/$sticky_entry/categories")) {
- while (($sticky_category = readdir($dh_sticky_categories)) !== false) {
- if ($sticky_category != "." && $sticky_category != "..") {
- if (file_exists("data/categories/$sticky_category/private.txt")) {
- $private_categories = $private_categories + 1;
- }
- }
- }
- closedir($dh_sticky_categories);
- }
- }
- if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$sticky_entry/cat.txt")) {
- continue;
- }
- if ($sticky_entry != "." && $sticky_entry != "..") {
- $sticky_entries[] = $sticky_entry;
- }
- }
- closedir($dh_sticky);
- }
- sort($sticky_entries);
- reset($sticky_entries);
- $count_sticky_list = count($sticky_entries);
- 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 ($sticky_entries as $sticky_list_entry) {
- echo "<a class=\"navlink\" href=\"index.php?entry=$sticky_list_entry\">";
- 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>';
- }
- }
- }
- if (file_exists("data/panels")) {
- if ($dh_panels = opendir("data/panels")) {
- while (($panel = readdir($dh_panels)) !== false) {
- if ($panel != "." && $panel != "..") {
- if (file_exists("data/panels/$panel/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/panels/$panel/top.txt")) {
- $top_panels[] = $panel;
- continue;
- }
- if (file_exists("data/panels/$panel/center.txt")) {
- $center_panels[] = $panel;
- continue;
- }
- if (file_exists("data/panels/$panel/entry.txt")) {
- $entry_panels[] = $panel;
- continue;
- }
- if (file_exists("data/panels/$panel/right.txt")) {
- $right_panels[] = $panel;
- continue;
- }
- if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $panel)) {
- continue;
- }
- if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $panel)) {
- continue;
- }
- $left_panels[] = $panel;
- }
- }
- closedir($dh_panels);
- }
- sort($left_panels);
- reset($left_panels);
- $count_left_panels = count($left_panels);
- sort($top_panels);
- reset($top_panels);
- $count_top_panels = count($top_panels);
- sort($center_panels);
- reset($center_panels);
- $count_center_panels = count($center_panels);
- sort($entry_panels);
- reset($entry_panels);
- $count_entry_panels = count($entry_panels);
- sort($right_panels);
- reset($right_panels);
- $count_right_panels = count($right_panels);
- if ($count_left_panels > 0) {
- foreach ($left_panels as $left_panel) {
- if (!file_exists("data/panels/$left_panel/free.txt")) {
- if (file_exists("data/panels/$left_panel/border.txt")) {
- $left_panel_border = file_get_contents("data/panels/$left_panel/border.txt");
- }
- else {
- if (isset($left_panel_border)) {
- unset($left_panel_border);
- }
- }
- if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
- $left_panel_bgcolor_t = file_get_contents("data/panels/$left_panel/bgcolor-t.txt");
- }
- else {
- if (isset($left_panel_bgcolor_t)) {
- unset($left_panel_bgcolor_t);
- }
- }
- if (file_exists("data/panels/$left_panel/bgcolor-c.txt")) {
- $left_panel_bgcolor_c = file_get_contents("data/panels/$left_panel/bgcolor-c.txt");
- }
- else {
- if (isset($left_panel_bgcolor_c)) {
- unset($left_panel_bgcolor_c);
- }
- }
- if (file_exists("data/panels/$left_panel/text-t.txt")) {
- $left_panel_text_t = file_get_contents("data/panels/$left_panel/text-t.txt");
- }
- else {
- if (isset($left_panel_text_t)) {
- unset($left_panel_text_t);
- }
- }
- if (file_exists("data/panels/$left_panel/text-c.txt")) {
- $left_panel_text_c = file_get_contents("data/panels/$left_panel/text-c.txt");
- }
- else {
- if (isset($left_panel_text_c)) {
- unset($left_panel_text_c);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($left_panel_border)) {
- echo " style=\"background-color: $left_panel_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_t)) {
- echo "background-color: $left_panel_bgcolor_t;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_t)) {
- echo "background-color: $left_panel_bgcolor_t;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_t)) {
- echo "background-color: $left_panel_bgcolor_t;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_t)) {
- echo "background-color: $left_panel_bgcolor_t;";
- }
- if (isset($left_panel_text_t)) {
- echo "color: $left_panel_text_t;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div id="panel_title"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_t)) {
- echo "background-color: $left_panel_bgcolor_t;";
- }
- if (isset($left_panel_text_t)) {
- echo "color: $left_panel_text_t;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/panels/$left_panel/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo "<a href=\"panels.php#{$left_panel}\">";
- echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
- }
- if (file_exists("data/panels/$left_panel/private.txt")) {
- echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
- }
- echo '</div>';
- echo '<div id="panel_body"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c) or isset($left_panel_text_c)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_c)) {
- echo "background-color: $left_panel_bgcolor_c;";
- }
- if (isset($left_panel_text_c)) {
- echo "color: $left_panel_text_c;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c) or isset($left_panel_text_c)) {
- echo '"';
- }
- echo '>';
- }
- if (file_exists("data/panels/$left_panel/free.txt")) {
- echo '<div id=panel_free>';
- }
- include("data/panels/$left_panel/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$left_panel/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_c)) {
- echo "background-color: $left_panel_bgcolor_c;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb3b"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_c)) {
- echo "background-color: $left_panel_bgcolor_c;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb2b"';
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($left_panel_bgcolor_c)) {
- echo "background-color: $left_panel_bgcolor_c;";
- }
- if (isset($left_panel_border)) {
- echo "border-color: $left_panel_border;";
- }
- if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb1b"';
- if (isset($left_panel_border)) {
- echo " style=\"background-color: $left_panel_border;\"";
- }
- echo '></b></b>';
- }
- }
- }
- }
- echo "</td><td width=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td>";
- // main
- echo "<td valign=\"top\" width=\"$wmain\">";
- if ($count_top_panels > 0) {
- foreach ($top_panels as $top_panel) {
- if (!file_exists("data/panels/$top_panel/free.txt")) {
- if (file_exists("data/panels/$top_panel/border.txt")) {
- $top_panel_border = file_get_contents("data/panels/$top_panel/border.txt");
- }
- else {
- if (isset($top_panel_border)) {
- unset($top_panel_border);
- }
- }
- if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
- $top_panel_bgcolor_t = file_get_contents("data/panels/$top_panel/bgcolor-t.txt");
- }
- else {
- if (isset($top_panel_bgcolor_t)) {
- unset($top_panel_bgcolor_t);
- }
- }
- if (file_exists("data/panels/$top_panel/bgcolor-c.txt")) {
- $top_panel_bgcolor_c = file_get_contents("data/panels/$top_panel/bgcolor-c.txt");
- }
- else {
- if (isset($top_panel_bgcolor_c)) {
- unset($top_panel_bgcolor_c);
- }
- }
- if (file_exists("data/panels/$top_panel/text-t.txt")) {
- $top_panel_text_t = file_get_contents("data/panels/$top_panel/text-t.txt");
- }
- else {
- if (isset($top_panel_text_t)) {
- unset($top_panel_text_t);
- }
- }
- if (file_exists("data/panels/$top_panel/text-c.txt")) {
- $top_panel_text_c = file_get_contents("data/panels/$top_panel/text-c.txt");
- }
- else {
- if (isset($top_panel_text_c)) {
- unset($top_panel_text_c);
- }
- }
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"';
- if (isset($top_panel_border)) {
- echo " style=\"background-color: $top_panel_border;\"";
- }
- echo '></b><b class="rb2t"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_t)) {
- echo "background-color: $top_panel_bgcolor_t;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb3t"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_t)) {
- echo "background-color: $top_panel_bgcolor_t;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b><b class="rb4t"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_t)) {
- echo "background-color: $top_panel_bgcolor_t;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
- echo '"';
- }
- echo '></b></b><div class="xtitle"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_t)) {
- echo "background-color: $top_panel_bgcolor_t;";
- }
- if (isset($top_panel_text_t)) {
- echo "color: $top_panel_text_t;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- else {
- echo '<div id="panel_title"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_t)) {
- echo "background-color: $top_panel_bgcolor_t;";
- }
- if (isset($top_panel_text_t)) {
- echo "color: $top_panel_text_t;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
- echo '"';
- }
- echo '>';
- }
- readfile("data/panels/$top_panel/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo "<a href=\"panels.php#{$top_panel}\">";
- echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
- }
- if (file_exists("data/panels/$top_panel/private.txt")) {
- echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
- }
- echo '</div>';
- echo '<div id="panel_body"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c) or isset($top_panel_text_c)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_c)) {
- echo "background-color: $top_panel_bgcolor_c;";
- }
- if (isset($top_panel_text_c)) {
- echo "color: $top_panel_text_c;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c) or isset($top_panel_text_c)) {
- echo '"';
- }
- echo '>';
- }
- if (file_exists("data/panels/$top_panel/free.txt")) {
- echo '<div id=panel_free>';
- }
- include("data/panels/$top_panel/panel.php");
- echo '</div>';
- if (file_exists("data/round.txt") and !file_exists("data/panels/$top_panel/free.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_c)) {
- echo "background-color: $top_panel_bgcolor_c;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb3b"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_c)) {
- echo "background-color: $top_panel_bgcolor_c;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb2b"';
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
- echo ' style="';
- }
- if (isset($top_panel_bgcolor_c)) {
- echo "background-color: $top_panel_bgcolor_c;";
- }
- if (isset($top_panel_border)) {
- echo "border-color: $top_panel_border;";
- }
- if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
- echo '"';
- }
- echo '></b><b class="rb1b"';
- if (isset($top_panel_border)) {
- echo " style=\"background-color: $top_panel_border;\"";
- }
- echo '></b></b>';
- }
- }
- }
- // clean-up (start)
- if (file_exists("data/albums")) {
- rmdirr("data/albums");
- }
- // clean-up (end)
- // global entry items (start)
- if ($dh_items = opendir("data/items")) {
- while (($item = readdir($dh_items)) !== false) {
- if ($item != "." && $item != "..") {
- if (file_exists("data/items/$item/comments/live") and (count(glob("data/items/$item/comments/live/*")) < 1)) {
- rmdirr("data/items/$item/comments/live");
- }
- if (file_exists("data/items/$item/comments/pending") and (count(glob("data/items/$item/comments/pending/*")) < 1)) {
- rmdirr("data/items/$item/comments/pending");
- }
- if (file_exists("data/items/$item/comments") and (count(glob("data/items/$item/comments/*")) < 1)) {
- rmdirr("data/items/$item/comments");
- }
- if (file_exists("data/items/$item/filedrop/files") and (count(glob("data/items/$item/filedrop/files/*")) < 1)) {
- rmdirr("data/items/$item/filedrop/files");
- }
- if (file_exists("data/items/$item/filedrop/count") and (count(glob("data/items/$item/filedrop/count/*")) < 1)) {
- rmdirr("data/items/$item/filedrop/count");
- }
- if (file_exists("data/items/$item/filedrop") and (count(glob("data/items/$item/filedrop/*")) < 1)) {
- rmdirr("data/items/$item/filedrop");
- }
- if ((!file_exists("images/$item/album") or (count(glob("images/$item/album/*")) < 1)) and file_exists("data/items/$item/album/captions") and (count(glob("data/items/$item/album/captions/*")) < 1)) {
- rmdirr("data/items/$item/album/captions");
- }
- if ((!file_exists("images/$item/album") or (count(glob("images/$item/album/*")) < 1)) and file_exists("data/items/$item/album/count") and (count(glob("data/items/$item/album/count/*")) < 1)) {
- rmdirr("data/items/$item/album/count");
- }
- if ((!file_exists("images/$item/album") or (count(glob("images/$item/album/*")) < 1)) and file_exists("data/items/$item/album") and (count(glob("data/items/$item/album/*")) < 1)) {
- rmdirr("data/items/$item/album");
- }
- if (file_exists("images/$item/album") and (count(glob("images/$item/album/*")) < 1)) {
- rmdirr("images/$item/album");
- }
- if (file_exists("images/$item") and (count(glob("images/$item/*")) < 1)) {
- rmdirr("images/$item");
- }
- if (file_exists("images/$item/categories") and (count(glob("images/$item/categories/*")) < 1)) {
- rmdirr("images/$item/categories");
- }
- $grand[] = $item;
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if (isset($req_entry) or isset($req_category) or isset($req_archive) or isset($req_find) or isset($req_author)) {
- if (isset($req_entry) and file_exists("data/items/$req_entry")) {
- $items[] = $req_entry;
- }
- if (isset($req_category) and file_exists("data/categories/$req_category") and file_exists("data/items/$item/categories/$req_category")) {
- $items[] = $item;
- }
- if (isset($req_archive) and fnmatch("$req_archive*",$item)) {
- $items[] = $item;
- }
- if (isset($req_author) and (file_exists("data/members/active/$req_author") or (file_get_contents("data/username.txt") == $req_author)) and (file_get_contents("data/items/$item/author.txt") == $req_author)) {
- $items[] = $item;
- }
- if (isset($req_find)) {
- if ((($req_find == "private") or ($req_find == "member") or ($req_find == "passwd")) and file_exists("data/items/$item/{$req_find}.txt")) {
- $items[] = $item;
- }
- if ((($req_find == "comments") or ($req_find == "filedrop") or ($req_find == "album")) and file_exists("data/items/$item/$req_find")) {
- $items[] = $item;
- }
- if (($req_find == "unfiled") and !file_exists("data/items/$item/categories")) {
- $items[] = $item;
- }
- }
- }
- else {
- $items[] = $item;
- }
- $latest[] = $item;
- if (file_exists("data/items/$item/album")) {
- $albums[] = $item;
- }
- $random[] = $item;
- $archives[] = substr($item,0,6);
- }
- else {
- // non-admin stuff (start)
- if ($item > $today) {
- continue;
- }
- if (file_exists("data/items/$item/private.txt")) {
- continue;
- }
- $private_categories = "0";
- if (file_exists("data/items/$item/categories")) {
- if ($dh_entry_categories = opendir("data/items/$item/categories")) {
- while (($item_category = readdir($dh_entry_categories)) !== false) {
- if ($item_category != "." && $item_category != "..") {
- if (file_exists("data/categories/$item_category/private.txt")) {
- $private_categories = $private_categories + 1;
- }
- }
- }
- closedir($dh_entry_categories);
- }
- }
- if (($private_categories > 0) and !file_exists("data/items/$item/cat.txt")) {
- continue;
- }
- $latest[] = $item;
- if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }