This commit has been accessed 586 times via Git panel.
commit 4f67cd77f6174c85361b3c667e76bd0668ed67d4
tree 5b443b6cc5780d29ceb7d7bc31ce06e744c900ce
parent d3333332796cf4f47e48f2b7fae161d4830ab30d
author Psylocke Antonio <psylocke@majcms.org> 1306280080 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1306280080 +0800
Add Facebook support, title and date display toggles
diff --git a/edit.php b/edit.php
index 0f3681f..8730c06 100644
--- a/edit.php
+++ b/edit.php
@@ -567,17 +567,39 @@ a:active {
}
?>
- <tr><td><input type="checkbox" name="lastmod" <?php
- $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
+ <tr><td><input type="checkbox" name="xtitle" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/xtitle.txt";
if (file_exists($lastmod_sem)) {
echo checked;
}
-?>>Display last modification date and time.</td></tr>
+?>>Do not display the entry title.</td></tr>
<?php
}
?>
+ <tr><td><input type="checkbox" name="xdate" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/xdate.txt";
+ if (file_exists($lastmod_sem)) {
+ echo checked;
+ }
+?>>Do not display the entry date.</td></tr>
+
+ <tr><td><input type="checkbox" name="lastmod" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
+ if (file_exists($lastmod_sem)) {
+ echo checked;
+ }
+?>>Display last modification date and time.</td></tr>
+
+ <tr><td><input type="checkbox" name="fb" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/fb.txt";
+ if (file_exists($lastmod_sem)) {
+ echo checked;
+ }
+?>>Enable Facebook support.</td></tr>
+
+
<?php
if (file_exists("images/{$_REQUEST['entry']}/album")) {
@@ -1184,6 +1206,49 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
}
}
+ $xtitle_sem = "data/items/{$_REQUEST['entry']}/xtitle.txt";
+
+ if (isset($_POST['xtitle']) and !empty($_POST['xtitle']) and ($_POST['xtitle'] == "on")) {
+ if (!file_exists($xtitle_sem)) {
+ touch($xtitle_sem);
+ }
+ }
+
+ if (!isset($_POST['xtitle']) or empty($_POST['xtitle'])) {
+ if (file_exists($xtitle_sem)) {
+ unlink($xtitle_sem);
+ }
+ }
+
+ $xdate_sem = "data/items/{$_REQUEST['entry']}/xdate.txt";
+
+ if (isset($_POST['xdate']) and !empty($_POST['xdate']) and ($_POST['xdate'] == "on")) {
+ if (!file_exists($xdate_sem)) {
+ touch($xdate_sem);
+ }
+ }
+
+ if (!isset($_POST['xdate']) or empty($_POST['xdate'])) {
+ if (file_exists($xdate_sem)) {
+ unlink($xdate_sem);
+ }
+ }
+
+ $fb_sem = "data/items/{$_REQUEST['entry']}/fb.txt";
+
+ if (isset($_POST['fb']) and !empty($_POST['fb']) and ($_POST['fb'] == "on")) {
+ if (!file_exists($fb_sem)) {
+ touch($fb_sem);
+ }
+ }
+
+ if (!isset($_POST['fb']) or empty($_POST['fb'])) {
+ if (file_exists($fb_sem)) {
+ unlink($fb_sem);
+ }
+ }
+
+
$lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
if (isset($_POST['lastmod']) and !empty($_POST['lastmod']) and ($_POST['lastmod'] == "on")) {
diff --git a/index.php b/index.php
index 6691ab2..d11a0d4 100644
--- a/index.php
+++ b/index.php
@@ -2024,119 +2024,126 @@ foreach ($maj_disp as $maj_d) {
}
}
- echo '<div class="panel_wrapper"><div class="panel_title"';
+ echo '<div class="panel_wrapper">';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo ' style="';
- }
+ if (!file_exists("data/items/$maj_d/xtitle.txt") or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
+
+ echo '<div class="panel_title"';
- if (isset($maj_d_bgcolor_t)) {
- echo "background-color: $maj_d_bgcolor_t;";
- }
+ if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
+ echo ' style="';
+ }
- if (isset($maj_d_text_t)) {
- echo "color: $maj_d_text_t;";
- }
+ if (isset($maj_d_bgcolor_t)) {
+ echo "background-color: $maj_d_bgcolor_t;";
+ }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
+ if (isset($maj_d_text_t)) {
+ echo "color: $maj_d_text_t;";
+ }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo '"';
- }
+ if (isset($maj_d_border)) {
+ echo "border-color: $maj_d_border;";
+ }
- echo '>';
+ if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
+ echo '"';
+ }
- readfile("data/items/$maj_d/title.txt");
+ echo '>';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $maj_login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/wiki.txt") and (file_exists("data/items/$maj_d/edit.txt") or (file_get_contents("data/items/$maj_d/author.txt") == $_SESSION['logged_in'])) and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and !file_exists("data/items/$maj_d/passwd.txt") and !file_exists("data/items/$maj_d/lock.txt")) {
+ readfile("data/items/$maj_d/title.txt");
- if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
- echo "<a href=\"wiki.php?entry=$maj_d\">";
- echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
- echo "</a>";
- }
+ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $maj_login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/wiki.txt") and (file_exists("data/items/$maj_d/edit.txt") or (file_get_contents("data/items/$maj_d/author.txt") == $_SESSION['logged_in'])) and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and !file_exists("data/items/$maj_d/passwd.txt") and !file_exists("data/items/$maj_d/lock.txt")) {
- if (!file_exists("data/items/$maj_d/lock.txt")) {
- echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
+ if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
+ echo "<a href=\"wiki.php?entry=$maj_d\">";
+ echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
+ echo "</a>";
+ }
+
+ if (!file_exists("data/items/$maj_d/lock.txt")) {
+ echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
+ }
}
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
+ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo "<a href=\"del.php?entry=$maj_d\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete entry\"></a>";
+ echo "<a href=\"del.php?entry=$maj_d\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete entry\"></a>";
- if (!file_exists("data/items/$maj_d/private.txt") and !file_exists("data/items/$maj_d/categories") and file_exists("data/bb.txt") and (count(glob("data/items/$maj_d/comments/live/*")) === 0) and (count(glob("data/items/$maj_d/comments/pending/*")) === 0)) {
- echo "<a href=\"move.php?entry=$maj_d\"><img src=\"images/widget.move.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"move to comment\"></a>";
- }
+ if (!file_exists("data/items/$maj_d/private.txt") and !file_exists("data/items/$maj_d/categories") and file_exists("data/bb.txt") and (count(glob("data/items/$maj_d/comments/live/*")) === 0) and (count(glob("data/items/$maj_d/comments/pending/*")) === 0)) {
+ echo "<a href=\"move.php?entry=$maj_d\"><img src=\"images/widget.move.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"move to comment\"></a>";
+ }
- if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
- echo "<a href=\"wiki.php?entry=$maj_d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
- }
+ if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
+ echo "<a href=\"wiki.php?entry=$maj_d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
+ }
- echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
+ echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
- if (file_exists("data/items/$maj_d/passwd.txt")) {
- echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
- }
+ if (file_exists("data/items/$maj_d/passwd.txt")) {
+ echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
+ }
- if (file_exists("data/items/$maj_d/private.txt")) {
- echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
- }
+ if (file_exists("data/items/$maj_d/private.txt")) {
+ echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
+ }
- if (file_exists("data/items/$maj_d/member.txt")) {
- echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
- }
+ if (file_exists("data/items/$maj_d/member.txt")) {
+ echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
+ }
- if (file_exists("data/items/$maj_d/cat.txt")) {
- echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
- }
+ if (file_exists("data/items/$maj_d/cat.txt")) {
+ echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
+ }
- if (file_exists("data/items/$maj_d/categories/$maj_req_category")) {
+ if (file_exists("data/items/$maj_d/categories/$maj_req_category")) {
- $maj_private_categories = "0";
- $maj_book_categories = "0";
+ $maj_private_categories = "0";
+ $maj_book_categories = "0";
- if (file_exists("data/items/$maj_d/categories")) {
+ if (file_exists("data/items/$maj_d/categories")) {
- if ($maj_dh_read_cat_dir = opendir("data/items/$maj_d/categories")) {
+ if ($maj_dh_read_cat_dir = opendir("data/items/$maj_d/categories")) {
- while (($maj_read_cat_dir = readdir($maj_dh_read_cat_dir)) !== false) {
+ while (($maj_read_cat_dir = readdir($maj_dh_read_cat_dir)) !== false) {
- if ($maj_read_cat_dir != "." && $maj_read_cat_dir != "..") {
+ if ($maj_read_cat_dir != "." && $maj_read_cat_dir != "..") {
- if (file_exists("data/categories/$maj_read_cat_dir/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
+ if (file_exists("data/categories/$maj_read_cat_dir/private.txt")) {
+ $maj_private_categories = $maj_private_categories + 1;
+ }
- if (file_exists("data/categories/$maj_read_cat_dir/book.txt")) {
- $maj_book_categories = $maj_book_categories + 1;
+ if (file_exists("data/categories/$maj_read_cat_dir/book.txt")) {
+ $maj_book_categories = $maj_book_categories + 1;
+ }
}
}
+ closedir($maj_dh_read_cat_dir);
}
- closedir($maj_dh_read_cat_dir);
}
- }
- if ($maj_private_categories > 0) {
- echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
- }
+ if ($maj_private_categories > 0) {
+ echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
+ }
- if (file_exists("data/nocat.txt")) {
- echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
- }
+ if (file_exists("data/nocat.txt")) {
+ echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
+ }
+
+ if ($maj_book_categories > 0) {
+ echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
+ }
- if ($maj_book_categories > 0) {
- echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
+ echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
}
- echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
}
- }
-
- echo "</div><div class=\"panel_entry_body\"";
+ echo "</div>";
+ }
+
+ echo "<div class=\"panel_entry_body\"";
if (isset($maj_d_border) or isset($maj_d_bgcolor_b) or isset($maj_d_text_b)) {
echo ' style="';
@@ -2497,28 +2504,33 @@ foreach ($maj_disp as $maj_d) {
$maj_crypt_passwd = crypt($maj_crypt_passwd,$maj_crypt_passwd);
}
- echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
-
- if ((file_exists("data/items/$maj_d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and !file_exists("data/avatar.txt"))))) {
- $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
- echo "$maj_xavatar_author - ";
- }
- entry2date($maj_d);
+ if (!file_exists("data/items/$maj_d/xdate.txt") or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
- if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) or file_exists("data/items/$maj_d/lastmod.txt")) {
+ echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
- if (file_exists("data/items/$maj_d/revisions.txt")) {
- echo " (Revision ";
- readfile("data/items/$maj_d/revisions.txt");
- echo " - ";
- echo date("l, M j, Y, g:i A",filemtime("data/items/$maj_d/body.txt"));
- echo ")";
+ if ((file_exists("data/items/$maj_d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and !file_exists("data/avatar.txt"))))) {
+ $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
+ echo "$maj_xavatar_author - ";
}
- }
- echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
+ entry2date($maj_d);
+
+ if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) or file_exists("data/items/$maj_d/lastmod.txt")) {
+
+ if (file_exists("data/items/$maj_d/revisions.txt")) {
+ echo " (Revision ";
+ readfile("data/items/$maj_d/revisions.txt");
+ echo " - ";
+ echo date("l, M j, Y, g:i A",filemtime("data/items/$maj_d/body.txt"));
+ echo ")";
+ }
+ }
+ echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
+ }
+
+
if (isset($maj_d_text_b)) {
echo "<font style=\"color: $maj_d_text_b;\">";
}
tree 5b443b6cc5780d29ceb7d7bc31ce06e744c900ce
parent d3333332796cf4f47e48f2b7fae161d4830ab30d
author Psylocke Antonio <psylocke@majcms.org> 1306280080 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1306280080 +0800
Add Facebook support, title and date display toggles
diff --git a/edit.php b/edit.php
index 0f3681f..8730c06 100644
--- a/edit.php
+++ b/edit.php
@@ -567,17 +567,39 @@ a:active {
}
?>
- <tr><td><input type="checkbox" name="lastmod" <?php
- $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
+ <tr><td><input type="checkbox" name="xtitle" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/xtitle.txt";
if (file_exists($lastmod_sem)) {
echo checked;
}
-?>>Display last modification date and time.</td></tr>
+?>>Do not display the entry title.</td></tr>
<?php
}
?>
+ <tr><td><input type="checkbox" name="xdate" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/xdate.txt";
+ if (file_exists($lastmod_sem)) {
+ echo checked;
+ }
+?>>Do not display the entry date.</td></tr>
+
+ <tr><td><input type="checkbox" name="lastmod" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
+ if (file_exists($lastmod_sem)) {
+ echo checked;
+ }
+?>>Display last modification date and time.</td></tr>
+
+ <tr><td><input type="checkbox" name="fb" <?php
+ $lastmod_sem = "data/items/{$_REQUEST['entry']}/fb.txt";
+ if (file_exists($lastmod_sem)) {
+ echo checked;
+ }
+?>>Enable Facebook support.</td></tr>
+
+
<?php
if (file_exists("images/{$_REQUEST['entry']}/album")) {
@@ -1184,6 +1206,49 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
}
}
+ $xtitle_sem = "data/items/{$_REQUEST['entry']}/xtitle.txt";
+
+ if (isset($_POST['xtitle']) and !empty($_POST['xtitle']) and ($_POST['xtitle'] == "on")) {
+ if (!file_exists($xtitle_sem)) {
+ touch($xtitle_sem);
+ }
+ }
+
+ if (!isset($_POST['xtitle']) or empty($_POST['xtitle'])) {
+ if (file_exists($xtitle_sem)) {
+ unlink($xtitle_sem);
+ }
+ }
+
+ $xdate_sem = "data/items/{$_REQUEST['entry']}/xdate.txt";
+
+ if (isset($_POST['xdate']) and !empty($_POST['xdate']) and ($_POST['xdate'] == "on")) {
+ if (!file_exists($xdate_sem)) {
+ touch($xdate_sem);
+ }
+ }
+
+ if (!isset($_POST['xdate']) or empty($_POST['xdate'])) {
+ if (file_exists($xdate_sem)) {
+ unlink($xdate_sem);
+ }
+ }
+
+ $fb_sem = "data/items/{$_REQUEST['entry']}/fb.txt";
+
+ if (isset($_POST['fb']) and !empty($_POST['fb']) and ($_POST['fb'] == "on")) {
+ if (!file_exists($fb_sem)) {
+ touch($fb_sem);
+ }
+ }
+
+ if (!isset($_POST['fb']) or empty($_POST['fb'])) {
+ if (file_exists($fb_sem)) {
+ unlink($fb_sem);
+ }
+ }
+
+
$lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
if (isset($_POST['lastmod']) and !empty($_POST['lastmod']) and ($_POST['lastmod'] == "on")) {
diff --git a/index.php b/index.php
index 6691ab2..d11a0d4 100644
--- a/index.php
+++ b/index.php
@@ -2024,119 +2024,126 @@ foreach ($maj_disp as $maj_d) {
}
}
- echo '<div class="panel_wrapper"><div class="panel_title"';
+ echo '<div class="panel_wrapper">';
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo ' style="';
- }
+ if (!file_exists("data/items/$maj_d/xtitle.txt") or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
+
+ echo '<div class="panel_title"';
- if (isset($maj_d_bgcolor_t)) {
- echo "background-color: $maj_d_bgcolor_t;";
- }
+ if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
+ echo ' style="';
+ }
- if (isset($maj_d_text_t)) {
- echo "color: $maj_d_text_t;";
- }
+ if (isset($maj_d_bgcolor_t)) {
+ echo "background-color: $maj_d_bgcolor_t;";
+ }
- if (isset($maj_d_border)) {
- echo "border-color: $maj_d_border;";
- }
+ if (isset($maj_d_text_t)) {
+ echo "color: $maj_d_text_t;";
+ }
- if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
- echo '"';
- }
+ if (isset($maj_d_border)) {
+ echo "border-color: $maj_d_border;";
+ }
- echo '>';
+ if (isset($maj_d_border) or isset($maj_d_bgcolor_t) or isset($maj_d_text_t)) {
+ echo '"';
+ }
- readfile("data/items/$maj_d/title.txt");
+ echo '>';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $maj_login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/wiki.txt") and (file_exists("data/items/$maj_d/edit.txt") or (file_get_contents("data/items/$maj_d/author.txt") == $_SESSION['logged_in'])) and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and !file_exists("data/items/$maj_d/passwd.txt") and !file_exists("data/items/$maj_d/lock.txt")) {
+ readfile("data/items/$maj_d/title.txt");
- if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
- echo "<a href=\"wiki.php?entry=$maj_d\">";
- echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
- echo "</a>";
- }
+ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $maj_login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/wiki.txt") and (file_exists("data/items/$maj_d/edit.txt") or (file_get_contents("data/items/$maj_d/author.txt") == $_SESSION['logged_in'])) and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and !file_exists("data/items/$maj_d/passwd.txt") and !file_exists("data/items/$maj_d/lock.txt")) {
- if (!file_exists("data/items/$maj_d/lock.txt")) {
- echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
+ if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
+ echo "<a href=\"wiki.php?entry=$maj_d\">";
+ echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
+ echo "</a>";
+ }
+
+ if (!file_exists("data/items/$maj_d/lock.txt")) {
+ echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
+ }
}
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
+ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) {
- echo "<a href=\"del.php?entry=$maj_d\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete entry\"></a>";
+ echo "<a href=\"del.php?entry=$maj_d\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete entry\"></a>";
- if (!file_exists("data/items/$maj_d/private.txt") and !file_exists("data/items/$maj_d/categories") and file_exists("data/bb.txt") and (count(glob("data/items/$maj_d/comments/live/*")) === 0) and (count(glob("data/items/$maj_d/comments/pending/*")) === 0)) {
- echo "<a href=\"move.php?entry=$maj_d\"><img src=\"images/widget.move.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"move to comment\"></a>";
- }
+ if (!file_exists("data/items/$maj_d/private.txt") and !file_exists("data/items/$maj_d/categories") and file_exists("data/bb.txt") and (count(glob("data/items/$maj_d/comments/live/*")) === 0) and (count(glob("data/items/$maj_d/comments/pending/*")) === 0)) {
+ echo "<a href=\"move.php?entry=$maj_d\"><img src=\"images/widget.move.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"move to comment\"></a>";
+ }
- if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
- echo "<a href=\"wiki.php?entry=$maj_d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
- }
+ if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
+ echo "<a href=\"wiki.php?entry=$maj_d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
+ }
- echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
+ echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
- if (file_exists("data/items/$maj_d/passwd.txt")) {
- echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
- }
+ if (file_exists("data/items/$maj_d/passwd.txt")) {
+ echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
+ }
- if (file_exists("data/items/$maj_d/private.txt")) {
- echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
- }
+ if (file_exists("data/items/$maj_d/private.txt")) {
+ echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
+ }
- if (file_exists("data/items/$maj_d/member.txt")) {
- echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
- }
+ if (file_exists("data/items/$maj_d/member.txt")) {
+ echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
+ }
- if (file_exists("data/items/$maj_d/cat.txt")) {
- echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
- }
+ if (file_exists("data/items/$maj_d/cat.txt")) {
+ echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
+ }
- if (file_exists("data/items/$maj_d/categories/$maj_req_category")) {
+ if (file_exists("data/items/$maj_d/categories/$maj_req_category")) {
- $maj_private_categories = "0";
- $maj_book_categories = "0";
+ $maj_private_categories = "0";
+ $maj_book_categories = "0";
- if (file_exists("data/items/$maj_d/categories")) {
+ if (file_exists("data/items/$maj_d/categories")) {
- if ($maj_dh_read_cat_dir = opendir("data/items/$maj_d/categories")) {
+ if ($maj_dh_read_cat_dir = opendir("data/items/$maj_d/categories")) {
- while (($maj_read_cat_dir = readdir($maj_dh_read_cat_dir)) !== false) {
+ while (($maj_read_cat_dir = readdir($maj_dh_read_cat_dir)) !== false) {
- if ($maj_read_cat_dir != "." && $maj_read_cat_dir != "..") {
+ if ($maj_read_cat_dir != "." && $maj_read_cat_dir != "..") {
- if (file_exists("data/categories/$maj_read_cat_dir/private.txt")) {
- $maj_private_categories = $maj_private_categories + 1;
- }
+ if (file_exists("data/categories/$maj_read_cat_dir/private.txt")) {
+ $maj_private_categories = $maj_private_categories + 1;
+ }
- if (file_exists("data/categories/$maj_read_cat_dir/book.txt")) {
- $maj_book_categories = $maj_book_categories + 1;
+ if (file_exists("data/categories/$maj_read_cat_dir/book.txt")) {
+ $maj_book_categories = $maj_book_categories + 1;
+ }
}
}
+ closedir($maj_dh_read_cat_dir);
}
- closedir($maj_dh_read_cat_dir);
}
- }
- if ($maj_private_categories > 0) {
- echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
- }
+ if ($maj_private_categories > 0) {
+ echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
+ }
- if (file_exists("data/nocat.txt")) {
- echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
- }
+ if (file_exists("data/nocat.txt")) {
+ echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
+ }
+
+ if ($maj_book_categories > 0) {
+ echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
+ }
- if ($maj_book_categories > 0) {
- echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
+ echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
}
- echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
}
- }
-
- echo "</div><div class=\"panel_entry_body\"";
+ echo "</div>";
+ }
+
+ echo "<div class=\"panel_entry_body\"";
if (isset($maj_d_border) or isset($maj_d_bgcolor_b) or isset($maj_d_text_b)) {
echo ' style="';
@@ -2497,28 +2504,33 @@ foreach ($maj_disp as $maj_d) {
$maj_crypt_passwd = crypt($maj_crypt_passwd,$maj_crypt_passwd);
}
- echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
-
- if ((file_exists("data/items/$maj_d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and !file_exists("data/avatar.txt"))))) {
- $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
- echo "$maj_xavatar_author - ";
- }
- entry2date($maj_d);
+ if (!file_exists("data/items/$maj_d/xdate.txt") or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
- if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) or file_exists("data/items/$maj_d/lastmod.txt")) {
+ echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
- if (file_exists("data/items/$maj_d/revisions.txt")) {
- echo " (Revision ";
- readfile("data/items/$maj_d/revisions.txt");
- echo " - ";
- echo date("l, M j, Y, g:i A",filemtime("data/items/$maj_d/body.txt"));
- echo ")";
+ if ((file_exists("data/items/$maj_d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and !file_exists("data/avatar.txt"))))) {
+ $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
+ echo "$maj_xavatar_author - ";
}
- }
- echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
+ entry2date($maj_d);
+
+ if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username)) or file_exists("data/items/$maj_d/lastmod.txt")) {
+
+ if (file_exists("data/items/$maj_d/revisions.txt")) {
+ echo " (Revision ";
+ readfile("data/items/$maj_d/revisions.txt");
+ echo " - ";
+ echo date("l, M j, Y, g:i A",filemtime("data/items/$maj_d/body.txt"));
+ echo ")";
+ }
+ }
+ echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
+ }
+
+
if (isset($maj_d_text_b)) {
echo "<font style=\"color: $maj_d_text_b;\">";
}