This commit has been accessed 556 times via Git panel.
commit 9b48a4ab9c39f749881c3cb5ab6f525d3144f57d
tree 69d6fd36ba78a5b732712682db583d2eeb4345ff
parent 9b1cef1618a57db27af2c7446cb25e5209b610e2
author Engels Antonio <engels@majcms.org> 1277314203 +0800
committer Engels Antonio <engels@majcms.org> 1277314203 +0800
maj-1.0-20081125-bb.zip
diff --git a/index.php b/index.php
index eeee3dd..2a0836e 100644
--- a/index.php
+++ b/index.php
@@ -82,8 +82,9 @@ else {
}
$wside = "175";
+$wspace = "10";
-$wtable = $wside + $wmain + $wside;
+$wtable = $wside + $wspace + $wmain + $wspace + $wside;
$default_blog_title = "My Activity Journal";
$default_username = "maj";
@@ -1429,7 +1430,9 @@ if (file_exists("data/header.txt")) {
}
-echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" width=\"$wtable\"><tr><td width=\"$wside\" valign=\"top\">";
+echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wtable\">";
+echo "<tr><td width=\"$wside\" height=\"10\"></td><td width=\"$wspace\" height=\"10\"></td><td width=\"$wmain\" height=\"10\"></td><td width=\"$wspace\" height=\"10\"></td><td width=\"$wside\" height=\"10\"></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\">";
@@ -1762,14 +1765,13 @@ if (file_exists("data/panels")) {
}
}
}
-?>
-</td>
+echo "</td><td width=\"$wspace\"></td>";
-<td valign="top" width="<?php echo $wmain; ?>">
+// main
+
+echo "<td valign=\"top\" width=\"$wmain\">";
-<?php
-
if ($count_top_panels > 0) {
foreach ($top_panels as $top_panel) {
@@ -1940,10 +1942,6 @@ if ($dh_items = opendir("data/items")) {
continue;
}
- if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
-
$private_categories = "0";
if (file_exists("data/items/$item/categories")) {
@@ -1969,10 +1967,6 @@ if ($dh_items = opendir("data/items")) {
$latest[] = $item;
- if (file_exists("data/nocat.txt") and file_exists("data/items/$item/categories") and !file_exists("data/items/$item/cat.txt") and (!isset($req_category) or empty($req_category)) and (!isset($req_entry) or empty($req_entry)) and (!isset($req_author) or empty($req_author))) {
- continue;
- }
-
if (file_exists("data/items/$item/album")) {
$albums[] = $item;
}
@@ -1980,6 +1974,14 @@ if ($dh_items = opendir("data/items")) {
$random[] = $item;
$archives[] = substr($item,0,6);
+ if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
+ continue;
+ }
+
+ if (file_exists("data/nocat.txt") and file_exists("data/items/$item/categories") and !file_exists("data/items/$item/cat.txt") and (!isset($req_category) or empty($req_category)) and (!isset($req_entry) or empty($req_entry)) and (!isset($req_author) or empty($req_author))) {
+ continue;
+ }
+
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")) {
@@ -2014,6 +2016,17 @@ reset($grand);
$count_grand = count($grand);
+if (isset($req_entry) and file_exists("data/items/$req_entry")) {
+
+ if (file_exists("data/items/$req_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ unset($items);
+ }
+
+ if (file_exists("data/items/$req_entry/member.txt") and !isset($_SESSION['logged_in'])) {
+ unset($items);
+ }
+}
+
$items = array_unique($items);
$items = array_values($items);
@@ -4061,7 +4074,7 @@ if ($end < sizeof($items)) {
// right side
-echo "</tr></table></td><td width=\"$wside\" valign=\"top\">";
+echo "</tr></table></td><td width=\"$wspace\"></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")) {
@@ -4654,7 +4667,7 @@ if (!file_exists("data/xrand.txt")) {
<?php
-if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0)) {
+if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0) and (!file_exists("data/xarc.txt") or isset($_SESSION['logged_in']))) {
$archive_entries = implode(" ",$archives);
diff --git a/move.php b/move.php
index 05c47b2..b997755 100644
--- a/move.php
+++ b/move.php
@@ -175,6 +175,20 @@ if (isset($_POST['target']) and !empty($_POST['target'])) {
exit();
}
+if ($dh_items = opendir("data/items")) {
+
+ while (($entry_item = readdir($dh_items)) !== false) {
+
+ if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
+ $target_items[] = $entry_item;
+ }
+ }
+ closedir($dh_items);
+}
+
+rsort($target_items);
+reset($target_items);
+
?>
<title>Move</title>
@@ -259,20 +273,6 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
<?php
-if ($dh_items = opendir("data/items")) {
-
- while (($entry_item = readdir($dh_items)) !== false) {
-
- if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
- $target_items[] = $entry_item;
- }
- }
- closedir($dh_items);
-}
-
-rsort($target_items);
-reset($target_items);
-
foreach ($target_items as $target_entry) {
echo "<option value=\"$target_entry\">";
diff --git a/rel.txt b/rel.txt
index 8048ae6..9383d12 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20081124
\ No newline at end of file
+20081125
\ No newline at end of file
tree 69d6fd36ba78a5b732712682db583d2eeb4345ff
parent 9b1cef1618a57db27af2c7446cb25e5209b610e2
author Engels Antonio <engels@majcms.org> 1277314203 +0800
committer Engels Antonio <engels@majcms.org> 1277314203 +0800
maj-1.0-20081125-bb.zip
diff --git a/index.php b/index.php
index eeee3dd..2a0836e 100644
--- a/index.php
+++ b/index.php
@@ -82,8 +82,9 @@ else {
}
$wside = "175";
+$wspace = "10";
-$wtable = $wside + $wmain + $wside;
+$wtable = $wside + $wspace + $wmain + $wspace + $wside;
$default_blog_title = "My Activity Journal";
$default_username = "maj";
@@ -1429,7 +1430,9 @@ if (file_exists("data/header.txt")) {
}
-echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" width=\"$wtable\"><tr><td width=\"$wside\" valign=\"top\">";
+echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wtable\">";
+echo "<tr><td width=\"$wside\" height=\"10\"></td><td width=\"$wspace\" height=\"10\"></td><td width=\"$wmain\" height=\"10\"></td><td width=\"$wspace\" height=\"10\"></td><td width=\"$wside\" height=\"10\"></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\">";
@@ -1762,14 +1765,13 @@ if (file_exists("data/panels")) {
}
}
}
-?>
-</td>
+echo "</td><td width=\"$wspace\"></td>";
-<td valign="top" width="<?php echo $wmain; ?>">
+// main
+
+echo "<td valign=\"top\" width=\"$wmain\">";
-<?php
-
if ($count_top_panels > 0) {
foreach ($top_panels as $top_panel) {
@@ -1940,10 +1942,6 @@ if ($dh_items = opendir("data/items")) {
continue;
}
- if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
- continue;
- }
-
$private_categories = "0";
if (file_exists("data/items/$item/categories")) {
@@ -1969,10 +1967,6 @@ if ($dh_items = opendir("data/items")) {
$latest[] = $item;
- if (file_exists("data/nocat.txt") and file_exists("data/items/$item/categories") and !file_exists("data/items/$item/cat.txt") and (!isset($req_category) or empty($req_category)) and (!isset($req_entry) or empty($req_entry)) and (!isset($req_author) or empty($req_author))) {
- continue;
- }
-
if (file_exists("data/items/$item/album")) {
$albums[] = $item;
}
@@ -1980,6 +1974,14 @@ if ($dh_items = opendir("data/items")) {
$random[] = $item;
$archives[] = substr($item,0,6);
+ if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
+ continue;
+ }
+
+ if (file_exists("data/nocat.txt") and file_exists("data/items/$item/categories") and !file_exists("data/items/$item/cat.txt") and (!isset($req_category) or empty($req_category)) and (!isset($req_entry) or empty($req_entry)) and (!isset($req_author) or empty($req_author))) {
+ continue;
+ }
+
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")) {
@@ -2014,6 +2016,17 @@ reset($grand);
$count_grand = count($grand);
+if (isset($req_entry) and file_exists("data/items/$req_entry")) {
+
+ if (file_exists("data/items/$req_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ unset($items);
+ }
+
+ if (file_exists("data/items/$req_entry/member.txt") and !isset($_SESSION['logged_in'])) {
+ unset($items);
+ }
+}
+
$items = array_unique($items);
$items = array_values($items);
@@ -4061,7 +4074,7 @@ if ($end < sizeof($items)) {
// right side
-echo "</tr></table></td><td width=\"$wside\" valign=\"top\">";
+echo "</tr></table></td><td width=\"$wspace\"></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")) {
@@ -4654,7 +4667,7 @@ if (!file_exists("data/xrand.txt")) {
<?php
-if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0)) {
+if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0) and (!file_exists("data/xarc.txt") or isset($_SESSION['logged_in']))) {
$archive_entries = implode(" ",$archives);
diff --git a/move.php b/move.php
index 05c47b2..b997755 100644
--- a/move.php
+++ b/move.php
@@ -175,6 +175,20 @@ if (isset($_POST['target']) and !empty($_POST['target'])) {
exit();
}
+if ($dh_items = opendir("data/items")) {
+
+ while (($entry_item = readdir($dh_items)) !== false) {
+
+ if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
+ $target_items[] = $entry_item;
+ }
+ }
+ closedir($dh_items);
+}
+
+rsort($target_items);
+reset($target_items);
+
?>
<title>Move</title>
@@ -259,20 +273,6 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
<?php
-if ($dh_items = opendir("data/items")) {
-
- while (($entry_item = readdir($dh_items)) !== false) {
-
- if ($entry_item != "." && $entry_item != ".." && ($_REQUEST['entry'] != $entry_item)) {
- $target_items[] = $entry_item;
- }
- }
- closedir($dh_items);
-}
-
-rsort($target_items);
-reset($target_items);
-
foreach ($target_items as $target_entry) {
echo "<option value=\"$target_entry\">";
diff --git a/rel.txt b/rel.txt
index 8048ae6..9383d12 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20081124
\ No newline at end of file
+20081125
\ No newline at end of file