This commit has been accessed 307 times via Git panel.
commit 9b1cef1618a57db27af2c7446cb25e5209b610e2
tree 2c85f72ed7eccb1b0f8f9e50cebe8a828e4ba0d9
parent 08159fba8bbabf93c8064444c04b9278c2e59a7c
author Engels Antonio <engels@majcms.org> 1277314202 +0800
committer Engels Antonio <engels@majcms.org> 1277314202 +0800
maj-1.0-20081124-bb.zip
diff --git a/add.php b/add.php
index 01b761f..72f6765 100644
--- a/add.php
+++ b/add.php
@@ -700,7 +700,7 @@ if (isset($_POST['private']) and !empty($_POST['private']) and ($_POST['private'
}
}
-if (file_exists("data/bb.txt") and file_exists("data/member.txt") and (($_SESSION['logged_in'] != file_get_contents("data/username.txt")) or (isset($_POST['member']) and !empty($_POST['member']) and ($_POST['member'] == "on")))) {
+if (file_exists("data/bb.txt") and (($_SESSION['logged_in'] != file_get_contents("data/username.txt")) or (isset($_POST['member']) and !empty($_POST['member']) and ($_POST['member'] == "on")))) {
touch("data/items/$entry/member.txt");
}
@@ -982,10 +982,11 @@ if (isset($_POST['passwd']) and !empty($_POST['passwd'])) {
unlink("data/items/$entry/passwd.txt");
}
else {
- $fp_passwd_txt = fopen("data/items/$entry/passwd.txt","w");
$passwd_crypt = sha1($_POST['passwd']);
$passwd_crypt = md5($passwd_crypt);
$passwd_crypt = crypt($passwd_crypt, $passwd_crypt);
+
+ $fp_passwd_txt = fopen("data/items/$entry/passwd.txt","w");
fwrite($fp_passwd_txt, $passwd_crypt);
fclose($fp_passwd_txt);
}
diff --git a/index.php b/index.php
index adce78a..eeee3dd 100644
--- a/index.php
+++ b/index.php
@@ -74,10 +74,21 @@ else {
$increase = 5;
}
+if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
+ $wmain = "610";
+}
+else {
+ $wmain = "525";
+}
+
+$wside = "175";
+
+$wtable = $wside + $wmain + $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://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_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://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")) {
@@ -461,7 +472,9 @@ if (isset($req_entry) and !empty($req_entry) and isset($_REQUEST['comment']) and
$fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
$comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
fclose($fp_comment_count_txt);
+
$comment_count_value = $comment_count_value - 1;
+
$fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","w");
fwrite($fp_comment_count_txt,$comment_count_value);
fclose($fp_comment_count_txt);
@@ -475,8 +488,6 @@ if (isset($req_entry) and !empty($req_entry)) {
if (file_exists("data/items/$req_entry")) {
- $filter = $req_entry;
-
$title = file_get_contents("data/items/$req_entry/title.txt");
echo "<title>$title</title>";
@@ -662,26 +673,9 @@ if (isset($req_entry) and !empty($req_entry)) {
fclose($fp_comment_count_txt);
}
}
- else {
- echo "<title>$default_title</title>";
-
- if (isset($req_archive) and !empty($req_archive)) {
- $filter = trim($req_archive) . "*";
- }
- else {
- $filter = "*";
- }
- }
}
else {
echo "<title>$default_title</title>";
-
- if (isset($req_archive) and !empty($req_archive)) {
- $filter = trim($req_archive) . "*";
- }
- else {
- $filter = "*";
- }
}
if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
@@ -1435,18 +1429,13 @@ if (file_exists("data/header.txt")) {
}
-?>
-
-<table border=0 cellspacing=10 cellpadding=0>
-<tr><td width=175 valign=top>
-
-<?php
+echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" width=\"$wtable\"><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">';
+ 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 "<div id=\"panel_title\">";
}
?>
@@ -1777,7 +1766,7 @@ if (file_exists("data/panels")) {
</td>
-<td valign=top width=<?php if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) { echo "610"; } else { echo "525"; } ?>>
+<td valign="top" width="<?php echo $wmain; ?>">
<?php
@@ -2068,15 +2057,15 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_
if ($count_latest > 0) {
if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ 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 "<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>topic</td><td bgcolor=#eeeeee align=center>author</td><td bgcolor=#eeeeee align=center>views</td><td bgcolor=#eeeeee align=center>comments</td><td bgcolor=#eeeeee align=center>last post</td></tr>";
+ 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\">topic</td><td bgcolor=\"#eeeeee\" align=\"center\">author</td><td bgcolor=\"#eeeeee\" align=\"center\">views</td><td bgcolor=\"#eeeeee\" align=\"center\">comments</td><td bgcolor=\"#eeeeee\" align=\"center\">last post</td></tr>";
$increment_latest = 0;
@@ -2086,10 +2075,10 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_
if ($dh_summary_comments = opendir("data/items/$latest[$increment_latest]/comments/live")) {
- while (($change_me_summary_comments = readdir($dh_summary_comments)) !== false) {
+ while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
- if ($change_me_summary_comments != "." && $change_me_summary_comments != "..") {
- $items_summary_comments[] = $change_me_summary_comments;
+ if ($entry_summary_comments != "." && $entry_summary_comments != "..") {
+ $items_summary_comments[] = $entry_summary_comments;
}
}
closedir($dh_summary_comments);
@@ -2215,14 +2204,7 @@ if (isset($req_category) and !empty($req_category)) {
if ($count_items == 0) {
- 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 '>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -2267,15 +2249,7 @@ $disp = array_slice($items,$start,$increase);
foreach ($disp as $d) {
- 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 "\">";
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
if (file_exists("data/round.txt")) {
echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
@@ -2328,23 +2302,43 @@ foreach ($disp as $d) {
if (file_exists("data/items/$d/categories/$req_category")) {
- $read_cat_dir = file_get_contents("data/items/$d/categories/$req_category");
+ $private_categories = "0";
+ $book_categories = "0";
+
+ if (file_exists("data/items/$d/categories")) {
+
+ if ($dh_read_cat_dir = opendir("data/items/$d/categories")) {
+
+ while (($read_cat_dir = readdir($dh_read_cat_dir)) !== false) {
+
+ if ($read_cat_dir != "." && $read_cat_dir != "..") {
+
+ if (file_exists("data/categories/$read_cat_dir/private.txt")) {
+ $private_categories = $private_categories + 1;
+ }
+
+ if (file_exists("data/categories/$read_cat_dir/book.txt")) {
+ $book_categories = $book_categories + 1;
+ }
+ }
+ }
+ closedir($dh_read_cat_dir);
+ }
+ }
- 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 ($private_categories > 0) {
+ echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
}
if (file_exists("data/nocat.txt")) {
- echo '<img src=images/widget.isolated.png border=0 width=11 height=11 align=right alt="category isolated">';
+ echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
}
- 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">';
+ if ($book_categories > 0) {
+ echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
}
- echo '<img src=images/widget.filed.png border=0 width=11 height=11 align=right alt="filed under ';
- readfile("data/items/$d/categories/$req_category");
- echo '">';
+ echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
}
}
@@ -2581,7 +2575,7 @@ foreach ($disp as $d) {
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 {
- $change_me_body = file_get_contents("data/items/$d/body.txt");
+ $entry_body = file_get_contents("data/items/$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"))))) {
@@ -2593,9 +2587,9 @@ foreach ($disp as $d) {
else {
$censor = "[expletive]";
}
- $change_me_body = preg_replace("/\b($badwords)\b/i",$censor,$change_me_body);
+ $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
}
- echo $change_me_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")) {
@@ -2619,34 +2613,34 @@ foreach ($disp as $d) {
if ($dh_entry_categories = opendir("data/items/$d/categories")) {
- while (($change_me_category = readdir($dh_entry_categories)) !== false) {
+ while (($entry_category = readdir($dh_entry_categories)) !== false) {
- if ($change_me_category != "." && $change_me_category != "..") {
- $change_me_categories[] = $change_me_category;
+ if ($entry_category != "." && $entry_category != "..") {
+ $entry_categories[] = $entry_category;
}
}
closedir($dh_entry_categories);
}
- sort($change_me_categories);
- reset($change_me_categories);
+ sort($entry_categories);
+ reset($entry_categories);
- if (count($change_me_categories) > 0) {
+ if (count($entry_categories) > 0) {
- if (count($change_me_categories) > 1) {
+ if (count($entry_categories) > 1) {
$category_list = "categories";
}
else {
$category_list = "category";
}
- foreach ($change_me_categories as $filed_under) {
+ foreach ($entry_categories as $filed_under) {
$category_list = $category_list . " | <a href=\"index.php?category=$filed_under\">$filed_under</a>";
}
echo "<div id=\"panel_category\">$category_list</div>";
}
- unset($change_me_categories);
+ unset($entry_categories);
}
echo "<div id=\"panel_footer\">";
@@ -2711,10 +2705,10 @@ foreach ($disp as $d) {
else {
if ($dh_album = opendir("images/$d/album")) {
- while (($change_me_album = readdir($dh_album)) !== false) {
+ while (($entry_album = readdir($dh_album)) !== false) {
- if ($change_me_album != "." && $change_me_album != "..") {
- $items_album[] = $change_me_album;
+ if ($entry_album != "." && $entry_album != "..") {
+ $items_album[] = $entry_album;
}
}
closedir($dh_album);
@@ -2913,16 +2907,8 @@ foreach ($disp as $d) {
}
if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -2975,9 +2961,9 @@ foreach ($disp as $d) {
if (file_exists("images/$d/album")) {
if ($dh_album = opendir("images/$d/album")) {
- while (($change_me_album = readdir($dh_album)) !== false) {
- if ($change_me_album != "." && $change_me_album != "..") {
- $sort_album[] = $change_me_album;
+ while (($entry_album = readdir($dh_album)) !== false) {
+ if ($entry_album != "." && $entry_album != "..") {
+ $sort_album[] = $entry_album;
}
}
closedir($dh_album);
@@ -3077,16 +3063,8 @@ foreach ($disp as $d) {
}
if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == filedrop) and file_exists("data/items/$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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -3168,16 +3146,8 @@ foreach ($disp as $d) {
}
if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -3245,16 +3215,8 @@ foreach ($disp as $d) {
if (file_exists("data/items/$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 "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
- echo '><tr><td>';
if ($dh_comments = opendir("data/items/$d/comments/live")) {
while (($live_comment = readdir($dh_comments)) !== false) {
if ($live_comment != "." && $live_comment != "..") {
@@ -3445,15 +3407,15 @@ foreach ($disp as $d) {
$private_categories = "0";
- if (file_exists("data/items/$change_me_c_entry_posts/categories")) {
+ if (file_exists("data/items/$entry_c_entry_posts/categories")) {
- if ($dh_cat2_c_entry_posts = opendir("data/items/$change_me_c_entry_posts/categories")) {
+ if ($dh_cat2_c_entry_posts = opendir("data/items/$entry_c_entry_posts/categories")) {
- while (($change_me_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
+ while (($entry_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
- if ($change_me_cat2_c_entry_posts != "." && $change_me_cat2_c_entry_posts != "..") {
+ if ($entry_cat2_c_entry_posts != "." && $entry_cat2_c_entry_posts != "..") {
- if (file_exists("data/categories/$change_me_cat2_c_entry_posts/private.txt")) {
+ if (file_exists("data/categories/$entry_cat2_c_entry_posts/private.txt")) {
$private_categories = $private_categories + 1;
}
}
@@ -3510,7 +3472,7 @@ foreach ($disp as $d) {
}
}
echo '</font><font style="font-size: 5px;"><br><br></font>';
- $change_me_comment = file_get_contents("data/items/$d/comments/live/$comment/comment.txt");
+ $entry_comment = file_get_contents("data/items/$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")) {
@@ -3519,9 +3481,9 @@ foreach ($disp as $d) {
else {
$censor = "[expletive]";
}
- $change_me_comment = preg_replace("/\b($badwords)\b/i",$censor,$change_me_comment);
+ $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
}
- echo $change_me_comment;
+ echo $entry_comment;
echo '</p></tr></table></div>';
if (file_exists("data/round.txt")) {
@@ -3534,16 +3496,7 @@ foreach ($disp as $d) {
if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=';
-
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
-
- echo '><tr><td>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}")))) {
@@ -3707,10 +3660,10 @@ foreach ($disp as $d) {
if ($dh_pending_comments = opendir("data/items/$d/comments/pending")) {
- while (($change_me_pending_comments = readdir($dh_pending_comments)) !== false) {
+ while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
- if ($change_me_pending_comments != "." && $change_me_pending_comments != "..") {
- $show_pending_comments[] = $change_me_pending_comments;
+ if ($entry_pending_comments != "." && $entry_pending_comments != "..") {
+ $show_pending_comments[] = $entry_pending_comments;
}
}
closedir($dh_pending_comments);
@@ -3732,16 +3685,7 @@ foreach ($disp as $d) {
foreach ($show_pending_comments as $pending_comment) {
- 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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -3938,15 +3882,15 @@ foreach ($disp as $d) {
$private_categories = "0";
- if (file_exists("data/items/$change_me_pc_entry_posts/categories")) {
+ if (file_exists("data/items/$entry_pc_entry_posts/categories")) {
- if ($dh_cat2_pc_entry_posts = opendir("data/items/$change_me_pc_entry_posts/categories")) {
+ if ($dh_cat2_pc_entry_posts = opendir("data/items/$entry_pc_entry_posts/categories")) {
- while (($change_me_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
+ while (($entry_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
- if ($change_me_cat2_pc_entry_posts != "." && $change_me_cat2_pc_entry_posts != "..") {
+ if ($entry_cat2_pc_entry_posts != "." && $entry_cat2_pc_entry_posts != "..") {
- if (file_exists("data/categories/$change_me_cat2_pc_entry_posts/private.txt")) {
+ if (file_exists("data/categories/$entry_cat2_pc_entry_posts/private.txt")) {
$private_categories = $private_categories + 1;
}
}
@@ -4114,21 +4058,16 @@ if ($end < sizeof($items)) {
}
echo "&start=" . ($start+$increase) . "\">next</a></td>";
}
-?>
-
-</tr></table></p>
-</td>
+// right side
-<td width="175" valign="top">
-
-<?php
+echo "</tr></table></td><td width=\"$wside\" valign=\"top\">";
if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
- while (($change_me_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
- if ($change_me_pending_comment_flags != "." && $change_me_pending_comment_flags != "..") {
- $show_pending_comment_flags[] = $change_me_pending_comment_flags;
+ while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
+ if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != "..") {
+ $show_pending_comment_flags[] = $entry_pending_comment_flags;
}
}
closedir($dh_pending_comment_flags);
@@ -4152,15 +4091,15 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
- while (($change_me_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
+ while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
- if ($change_me_list_pending_comment_flags != "." && $change_me_list_pending_comment_flags != "..") {
+ if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != "..") {
- echo "<a href=\"index.php?entry=$change_me_list_pending_comment_flags&show=comments\">";
- readfile("data/items/$change_me_list_pending_comment_flags/title.txt");
+ echo "<a href=\"index.php?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/$change_me_list_pending_comment_flags/count.txt","r");
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$change_me_list_pending_comment_flags/count.txt"));
+ $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"));
fclose($fp_comment_count_txt);
if ($comment_count_value == 1) {
@@ -4187,10 +4126,10 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
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 (($change_me_pending_list = readdir($dh_pending_list)) !== false) {
+ while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
- if ($change_me_pending_list != "." && $change_me_pending_list != "..") {
- $show_pending_list[] = $change_me_pending_list;
+ if ($entry_pending_list != "." && $entry_pending_list != "..") {
+ $show_pending_list[] = $entry_pending_list;
}
}
closedir($dh_pending_list);
@@ -4292,9 +4231,9 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
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 (($change_me_active_list = readdir($dh_active_list)) !== false) {
- if ($change_me_active_list != "." && $change_me_active_list != "..") {
- $show_active_list[] = $change_me_active_list;
+ while (($entry_active_list = readdir($dh_active_list)) !== false) {
+ if ($entry_active_list != "." && $entry_active_list != "..") {
+ $show_active_list[] = $entry_active_list;
}
}
closedir($dh_active_list);
@@ -4311,17 +4250,17 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
if (file_exists("data/items")) {
if ($dh_mempost_list = opendir("data/items")) {
- while (($change_me_mempost_list = readdir($dh_mempost_list)) !== false) {
+ while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
- if (file_exists("data/items/$change_me_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
}
$private_categories = "0";
- if (file_exists("data/items/$change_me_mempost_list/categories")) {
+ if (file_exists("data/items/$entry_mempost_list/categories")) {
- if ($dh_entry_categories_mempost_list = opendir("data/items/$change_me_mempost_list/categories")) {
+ if ($dh_entry_categories_mempost_list = opendir("data/items/$entry_mempost_list/categories")) {
while (($entry_category_mempost_list = readdir($dh_entry_categories_mempost_list)) !== false) {
@@ -4336,13 +4275,13 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
}
}
- if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$change_me_mempost_list/cat.txt")) {
+ if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_mempost_list/cat.txt")) {
continue;
}
- if ($change_me_mempost_list != "." && $change_me_mempost_list != "..") {
- $change_me_mempost_list = substr("$change_me_mempost_list",0,6);
- $show_mempost_list[] = $change_me_mempost_list;
+ if ($entry_mempost_list != "." && $entry_mempost_list != "..") {
+ $entry_mempost_list = substr("$entry_mempost_list",0,6);
+ $show_mempost_list[] = $entry_mempost_list;
}
}
closedir($dh_mempost_list);
@@ -4426,18 +4365,18 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
<?php
if (file_exists("data/categories")) {
if ($dh_categories = opendir("data/categories")) {
- while (($change_me_categories = readdir($dh_categories)) !== false) {
+ 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/$change_me_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
}
- if ($change_me_categories != "." && $change_me_categories != "..") {
- $show_categories[] = $change_me_categories;
+ if ($entry_categories != "." && $entry_categories != "..") {
+ $show_categories[] = $entry_categories;
}
}
closedir($dh_categories);
@@ -4583,16 +4522,16 @@ if (!file_exists("data/comments/latest")) {
if (file_exists("data/comments/latest/$cmonth")) {
if ($dh_latest_comments = opendir("data/comments/latest/$cmonth")) {
- while (($change_me_latest_comments = readdir($dh_latest_comments)) !== false) {
+ while (($entry_latest_comments = readdir($dh_latest_comments)) !== false) {
$today = date("YmdHis",time() + $offset);
- if (($change_me_latest_comments > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ if (($entry_latest_comments > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
}
- if ($change_me_latest_comments != "." && $change_me_latest_comments != "..") {
- $show_latest_comments[] = $change_me_latest_comments;
+ if ($entry_latest_comments != "." && $entry_latest_comments != "..") {
+ $show_latest_comments[] = $entry_latest_comments;
}
}
closedir($dh_latest_comments);
diff --git a/rel.txt b/rel.txt
index 692f135..8048ae6 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20081123
\ No newline at end of file
+20081124
\ No newline at end of file
tree 2c85f72ed7eccb1b0f8f9e50cebe8a828e4ba0d9
parent 08159fba8bbabf93c8064444c04b9278c2e59a7c
author Engels Antonio <engels@majcms.org> 1277314202 +0800
committer Engels Antonio <engels@majcms.org> 1277314202 +0800
maj-1.0-20081124-bb.zip
diff --git a/add.php b/add.php
index 01b761f..72f6765 100644
--- a/add.php
+++ b/add.php
@@ -700,7 +700,7 @@ if (isset($_POST['private']) and !empty($_POST['private']) and ($_POST['private'
}
}
-if (file_exists("data/bb.txt") and file_exists("data/member.txt") and (($_SESSION['logged_in'] != file_get_contents("data/username.txt")) or (isset($_POST['member']) and !empty($_POST['member']) and ($_POST['member'] == "on")))) {
+if (file_exists("data/bb.txt") and (($_SESSION['logged_in'] != file_get_contents("data/username.txt")) or (isset($_POST['member']) and !empty($_POST['member']) and ($_POST['member'] == "on")))) {
touch("data/items/$entry/member.txt");
}
@@ -982,10 +982,11 @@ if (isset($_POST['passwd']) and !empty($_POST['passwd'])) {
unlink("data/items/$entry/passwd.txt");
}
else {
- $fp_passwd_txt = fopen("data/items/$entry/passwd.txt","w");
$passwd_crypt = sha1($_POST['passwd']);
$passwd_crypt = md5($passwd_crypt);
$passwd_crypt = crypt($passwd_crypt, $passwd_crypt);
+
+ $fp_passwd_txt = fopen("data/items/$entry/passwd.txt","w");
fwrite($fp_passwd_txt, $passwd_crypt);
fclose($fp_passwd_txt);
}
diff --git a/index.php b/index.php
index adce78a..eeee3dd 100644
--- a/index.php
+++ b/index.php
@@ -74,10 +74,21 @@ else {
$increase = 5;
}
+if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
+ $wmain = "610";
+}
+else {
+ $wmain = "525";
+}
+
+$wside = "175";
+
+$wtable = $wside + $wmain + $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://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_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://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")) {
@@ -461,7 +472,9 @@ if (isset($req_entry) and !empty($req_entry) and isset($_REQUEST['comment']) and
$fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
$comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
fclose($fp_comment_count_txt);
+
$comment_count_value = $comment_count_value - 1;
+
$fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","w");
fwrite($fp_comment_count_txt,$comment_count_value);
fclose($fp_comment_count_txt);
@@ -475,8 +488,6 @@ if (isset($req_entry) and !empty($req_entry)) {
if (file_exists("data/items/$req_entry")) {
- $filter = $req_entry;
-
$title = file_get_contents("data/items/$req_entry/title.txt");
echo "<title>$title</title>";
@@ -662,26 +673,9 @@ if (isset($req_entry) and !empty($req_entry)) {
fclose($fp_comment_count_txt);
}
}
- else {
- echo "<title>$default_title</title>";
-
- if (isset($req_archive) and !empty($req_archive)) {
- $filter = trim($req_archive) . "*";
- }
- else {
- $filter = "*";
- }
- }
}
else {
echo "<title>$default_title</title>";
-
- if (isset($req_archive) and !empty($req_archive)) {
- $filter = trim($req_archive) . "*";
- }
- else {
- $filter = "*";
- }
}
if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
@@ -1435,18 +1429,13 @@ if (file_exists("data/header.txt")) {
}
-?>
-
-<table border=0 cellspacing=10 cellpadding=0>
-<tr><td width=175 valign=top>
-
-<?php
+echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" width=\"$wtable\"><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">';
+ 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 "<div id=\"panel_title\">";
}
?>
@@ -1777,7 +1766,7 @@ if (file_exists("data/panels")) {
</td>
-<td valign=top width=<?php if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) { echo "610"; } else { echo "525"; } ?>>
+<td valign="top" width="<?php echo $wmain; ?>">
<?php
@@ -2068,15 +2057,15 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_
if ($count_latest > 0) {
if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ 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 "<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>topic</td><td bgcolor=#eeeeee align=center>author</td><td bgcolor=#eeeeee align=center>views</td><td bgcolor=#eeeeee align=center>comments</td><td bgcolor=#eeeeee align=center>last post</td></tr>";
+ 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\">topic</td><td bgcolor=\"#eeeeee\" align=\"center\">author</td><td bgcolor=\"#eeeeee\" align=\"center\">views</td><td bgcolor=\"#eeeeee\" align=\"center\">comments</td><td bgcolor=\"#eeeeee\" align=\"center\">last post</td></tr>";
$increment_latest = 0;
@@ -2086,10 +2075,10 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_
if ($dh_summary_comments = opendir("data/items/$latest[$increment_latest]/comments/live")) {
- while (($change_me_summary_comments = readdir($dh_summary_comments)) !== false) {
+ while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
- if ($change_me_summary_comments != "." && $change_me_summary_comments != "..") {
- $items_summary_comments[] = $change_me_summary_comments;
+ if ($entry_summary_comments != "." && $entry_summary_comments != "..") {
+ $items_summary_comments[] = $entry_summary_comments;
}
}
closedir($dh_summary_comments);
@@ -2215,14 +2204,7 @@ if (isset($req_category) and !empty($req_category)) {
if ($count_items == 0) {
- 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 '>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -2267,15 +2249,7 @@ $disp = array_slice($items,$start,$increase);
foreach ($disp as $d) {
- 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 "\">";
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
if (file_exists("data/round.txt")) {
echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
@@ -2328,23 +2302,43 @@ foreach ($disp as $d) {
if (file_exists("data/items/$d/categories/$req_category")) {
- $read_cat_dir = file_get_contents("data/items/$d/categories/$req_category");
+ $private_categories = "0";
+ $book_categories = "0";
+
+ if (file_exists("data/items/$d/categories")) {
+
+ if ($dh_read_cat_dir = opendir("data/items/$d/categories")) {
+
+ while (($read_cat_dir = readdir($dh_read_cat_dir)) !== false) {
+
+ if ($read_cat_dir != "." && $read_cat_dir != "..") {
+
+ if (file_exists("data/categories/$read_cat_dir/private.txt")) {
+ $private_categories = $private_categories + 1;
+ }
+
+ if (file_exists("data/categories/$read_cat_dir/book.txt")) {
+ $book_categories = $book_categories + 1;
+ }
+ }
+ }
+ closedir($dh_read_cat_dir);
+ }
+ }
- 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 ($private_categories > 0) {
+ echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
}
if (file_exists("data/nocat.txt")) {
- echo '<img src=images/widget.isolated.png border=0 width=11 height=11 align=right alt="category isolated">';
+ echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
}
- 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">';
+ if ($book_categories > 0) {
+ echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
}
- echo '<img src=images/widget.filed.png border=0 width=11 height=11 align=right alt="filed under ';
- readfile("data/items/$d/categories/$req_category");
- echo '">';
+ echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
}
}
@@ -2581,7 +2575,7 @@ foreach ($disp as $d) {
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 {
- $change_me_body = file_get_contents("data/items/$d/body.txt");
+ $entry_body = file_get_contents("data/items/$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"))))) {
@@ -2593,9 +2587,9 @@ foreach ($disp as $d) {
else {
$censor = "[expletive]";
}
- $change_me_body = preg_replace("/\b($badwords)\b/i",$censor,$change_me_body);
+ $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
}
- echo $change_me_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")) {
@@ -2619,34 +2613,34 @@ foreach ($disp as $d) {
if ($dh_entry_categories = opendir("data/items/$d/categories")) {
- while (($change_me_category = readdir($dh_entry_categories)) !== false) {
+ while (($entry_category = readdir($dh_entry_categories)) !== false) {
- if ($change_me_category != "." && $change_me_category != "..") {
- $change_me_categories[] = $change_me_category;
+ if ($entry_category != "." && $entry_category != "..") {
+ $entry_categories[] = $entry_category;
}
}
closedir($dh_entry_categories);
}
- sort($change_me_categories);
- reset($change_me_categories);
+ sort($entry_categories);
+ reset($entry_categories);
- if (count($change_me_categories) > 0) {
+ if (count($entry_categories) > 0) {
- if (count($change_me_categories) > 1) {
+ if (count($entry_categories) > 1) {
$category_list = "categories";
}
else {
$category_list = "category";
}
- foreach ($change_me_categories as $filed_under) {
+ foreach ($entry_categories as $filed_under) {
$category_list = $category_list . " | <a href=\"index.php?category=$filed_under\">$filed_under</a>";
}
echo "<div id=\"panel_category\">$category_list</div>";
}
- unset($change_me_categories);
+ unset($entry_categories);
}
echo "<div id=\"panel_footer\">";
@@ -2711,10 +2705,10 @@ foreach ($disp as $d) {
else {
if ($dh_album = opendir("images/$d/album")) {
- while (($change_me_album = readdir($dh_album)) !== false) {
+ while (($entry_album = readdir($dh_album)) !== false) {
- if ($change_me_album != "." && $change_me_album != "..") {
- $items_album[] = $change_me_album;
+ if ($entry_album != "." && $entry_album != "..") {
+ $items_album[] = $entry_album;
}
}
closedir($dh_album);
@@ -2913,16 +2907,8 @@ foreach ($disp as $d) {
}
if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -2975,9 +2961,9 @@ foreach ($disp as $d) {
if (file_exists("images/$d/album")) {
if ($dh_album = opendir("images/$d/album")) {
- while (($change_me_album = readdir($dh_album)) !== false) {
- if ($change_me_album != "." && $change_me_album != "..") {
- $sort_album[] = $change_me_album;
+ while (($entry_album = readdir($dh_album)) !== false) {
+ if ($entry_album != "." && $entry_album != "..") {
+ $sort_album[] = $entry_album;
}
}
closedir($dh_album);
@@ -3077,16 +3063,8 @@ foreach ($disp as $d) {
}
if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == filedrop) and file_exists("data/items/$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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -3168,16 +3146,8 @@ foreach ($disp as $d) {
}
if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -3245,16 +3215,8 @@ foreach ($disp as $d) {
if (file_exists("data/items/$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 "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
- echo '><tr><td>';
if ($dh_comments = opendir("data/items/$d/comments/live")) {
while (($live_comment = readdir($dh_comments)) !== false) {
if ($live_comment != "." && $live_comment != "..") {
@@ -3445,15 +3407,15 @@ foreach ($disp as $d) {
$private_categories = "0";
- if (file_exists("data/items/$change_me_c_entry_posts/categories")) {
+ if (file_exists("data/items/$entry_c_entry_posts/categories")) {
- if ($dh_cat2_c_entry_posts = opendir("data/items/$change_me_c_entry_posts/categories")) {
+ if ($dh_cat2_c_entry_posts = opendir("data/items/$entry_c_entry_posts/categories")) {
- while (($change_me_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
+ while (($entry_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
- if ($change_me_cat2_c_entry_posts != "." && $change_me_cat2_c_entry_posts != "..") {
+ if ($entry_cat2_c_entry_posts != "." && $entry_cat2_c_entry_posts != "..") {
- if (file_exists("data/categories/$change_me_cat2_c_entry_posts/private.txt")) {
+ if (file_exists("data/categories/$entry_cat2_c_entry_posts/private.txt")) {
$private_categories = $private_categories + 1;
}
}
@@ -3510,7 +3472,7 @@ foreach ($disp as $d) {
}
}
echo '</font><font style="font-size: 5px;"><br><br></font>';
- $change_me_comment = file_get_contents("data/items/$d/comments/live/$comment/comment.txt");
+ $entry_comment = file_get_contents("data/items/$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")) {
@@ -3519,9 +3481,9 @@ foreach ($disp as $d) {
else {
$censor = "[expletive]";
}
- $change_me_comment = preg_replace("/\b($badwords)\b/i",$censor,$change_me_comment);
+ $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
}
- echo $change_me_comment;
+ echo $entry_comment;
echo '</p></tr></table></div>';
if (file_exists("data/round.txt")) {
@@ -3534,16 +3496,7 @@ foreach ($disp as $d) {
if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=';
-
- if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
- echo "610";
- }
- else {
- echo "525";
- }
-
- echo '><tr><td>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}")))) {
@@ -3707,10 +3660,10 @@ foreach ($disp as $d) {
if ($dh_pending_comments = opendir("data/items/$d/comments/pending")) {
- while (($change_me_pending_comments = readdir($dh_pending_comments)) !== false) {
+ while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
- if ($change_me_pending_comments != "." && $change_me_pending_comments != "..") {
- $show_pending_comments[] = $change_me_pending_comments;
+ if ($entry_pending_comments != "." && $entry_pending_comments != "..") {
+ $show_pending_comments[] = $entry_pending_comments;
}
}
closedir($dh_pending_comments);
@@ -3732,16 +3685,7 @@ foreach ($disp as $d) {
foreach ($show_pending_comments as $pending_comment) {
- 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>';
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -3938,15 +3882,15 @@ foreach ($disp as $d) {
$private_categories = "0";
- if (file_exists("data/items/$change_me_pc_entry_posts/categories")) {
+ if (file_exists("data/items/$entry_pc_entry_posts/categories")) {
- if ($dh_cat2_pc_entry_posts = opendir("data/items/$change_me_pc_entry_posts/categories")) {
+ if ($dh_cat2_pc_entry_posts = opendir("data/items/$entry_pc_entry_posts/categories")) {
- while (($change_me_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
+ while (($entry_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
- if ($change_me_cat2_pc_entry_posts != "." && $change_me_cat2_pc_entry_posts != "..") {
+ if ($entry_cat2_pc_entry_posts != "." && $entry_cat2_pc_entry_posts != "..") {
- if (file_exists("data/categories/$change_me_cat2_pc_entry_posts/private.txt")) {
+ if (file_exists("data/categories/$entry_cat2_pc_entry_posts/private.txt")) {
$private_categories = $private_categories + 1;
}
}
@@ -4114,21 +4058,16 @@ if ($end < sizeof($items)) {
}
echo "&start=" . ($start+$increase) . "\">next</a></td>";
}
-?>
-
-</tr></table></p>
-</td>
+// right side
-<td width="175" valign="top">
-
-<?php
+echo "</tr></table></td><td width=\"$wside\" valign=\"top\">";
if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
- while (($change_me_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
- if ($change_me_pending_comment_flags != "." && $change_me_pending_comment_flags != "..") {
- $show_pending_comment_flags[] = $change_me_pending_comment_flags;
+ while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
+ if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != "..") {
+ $show_pending_comment_flags[] = $entry_pending_comment_flags;
}
}
closedir($dh_pending_comment_flags);
@@ -4152,15 +4091,15 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
- while (($change_me_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
+ while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
- if ($change_me_list_pending_comment_flags != "." && $change_me_list_pending_comment_flags != "..") {
+ if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != "..") {
- echo "<a href=\"index.php?entry=$change_me_list_pending_comment_flags&show=comments\">";
- readfile("data/items/$change_me_list_pending_comment_flags/title.txt");
+ echo "<a href=\"index.php?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/$change_me_list_pending_comment_flags/count.txt","r");
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$change_me_list_pending_comment_flags/count.txt"));
+ $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"));
fclose($fp_comment_count_txt);
if ($comment_count_value == 1) {
@@ -4187,10 +4126,10 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
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 (($change_me_pending_list = readdir($dh_pending_list)) !== false) {
+ while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
- if ($change_me_pending_list != "." && $change_me_pending_list != "..") {
- $show_pending_list[] = $change_me_pending_list;
+ if ($entry_pending_list != "." && $entry_pending_list != "..") {
+ $show_pending_list[] = $entry_pending_list;
}
}
closedir($dh_pending_list);
@@ -4292,9 +4231,9 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
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 (($change_me_active_list = readdir($dh_active_list)) !== false) {
- if ($change_me_active_list != "." && $change_me_active_list != "..") {
- $show_active_list[] = $change_me_active_list;
+ while (($entry_active_list = readdir($dh_active_list)) !== false) {
+ if ($entry_active_list != "." && $entry_active_list != "..") {
+ $show_active_list[] = $entry_active_list;
}
}
closedir($dh_active_list);
@@ -4311,17 +4250,17 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
if (file_exists("data/items")) {
if ($dh_mempost_list = opendir("data/items")) {
- while (($change_me_mempost_list = readdir($dh_mempost_list)) !== false) {
+ while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
- if (file_exists("data/items/$change_me_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
}
$private_categories = "0";
- if (file_exists("data/items/$change_me_mempost_list/categories")) {
+ if (file_exists("data/items/$entry_mempost_list/categories")) {
- if ($dh_entry_categories_mempost_list = opendir("data/items/$change_me_mempost_list/categories")) {
+ if ($dh_entry_categories_mempost_list = opendir("data/items/$entry_mempost_list/categories")) {
while (($entry_category_mempost_list = readdir($dh_entry_categories_mempost_list)) !== false) {
@@ -4336,13 +4275,13 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
}
}
- if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$change_me_mempost_list/cat.txt")) {
+ if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_mempost_list/cat.txt")) {
continue;
}
- if ($change_me_mempost_list != "." && $change_me_mempost_list != "..") {
- $change_me_mempost_list = substr("$change_me_mempost_list",0,6);
- $show_mempost_list[] = $change_me_mempost_list;
+ if ($entry_mempost_list != "." && $entry_mempost_list != "..") {
+ $entry_mempost_list = substr("$entry_mempost_list",0,6);
+ $show_mempost_list[] = $entry_mempost_list;
}
}
closedir($dh_mempost_list);
@@ -4426,18 +4365,18 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
<?php
if (file_exists("data/categories")) {
if ($dh_categories = opendir("data/categories")) {
- while (($change_me_categories = readdir($dh_categories)) !== false) {
+ 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/$change_me_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
}
- if ($change_me_categories != "." && $change_me_categories != "..") {
- $show_categories[] = $change_me_categories;
+ if ($entry_categories != "." && $entry_categories != "..") {
+ $show_categories[] = $entry_categories;
}
}
closedir($dh_categories);
@@ -4583,16 +4522,16 @@ if (!file_exists("data/comments/latest")) {
if (file_exists("data/comments/latest/$cmonth")) {
if ($dh_latest_comments = opendir("data/comments/latest/$cmonth")) {
- while (($change_me_latest_comments = readdir($dh_latest_comments)) !== false) {
+ while (($entry_latest_comments = readdir($dh_latest_comments)) !== false) {
$today = date("YmdHis",time() + $offset);
- if (($change_me_latest_comments > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ if (($entry_latest_comments > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
}
- if ($change_me_latest_comments != "." && $change_me_latest_comments != "..") {
- $show_latest_comments[] = $change_me_latest_comments;
+ if ($entry_latest_comments != "." && $entry_latest_comments != "..") {
+ $show_latest_comments[] = $entry_latest_comments;
}
}
closedir($dh_latest_comments);
diff --git a/rel.txt b/rel.txt
index 692f135..8048ae6 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20081123
\ No newline at end of file
+20081124
\ No newline at end of file