This commit has been accessed 585 times via Git panel.
commit 390bc7342f04cf08d1f451eac7ff9021390c20ed
tree 2622313599374e56531c4c995186fb23b2877387
parent 5a82bd7ada42d113e93a435c3aaa65c76ca56ca8
author Engels Antonio <engels@majcms.org> 1277314215 +0800
committer Engels Antonio <engels@majcms.org> 1277314215 +0800
maj-2.0-201006170704.zip
diff --git a/index.php b/index.php
index fe78c94..a6e3300 100644
--- a/index.php
+++ b/index.php
@@ -867,15 +867,18 @@ if (file_exists("data/header.txt")) {
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wtable\">";
echo "<tr><td width=\"$maj_wside\" height=\"$maj_wspace\"></td><td width=\"$maj_wspace\" height=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td><td width=\"$maj_wmain\" height=\"$maj_wspace\"></td><td width=\"$maj_wspace\" height=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td><td width=\"$maj_wside\" height=\"$maj_wspace\"></td></tr>";
-echo "<tr><td width=\"$maj_wside\" valign=\"top\">";
-if (file_exists("data/round.txt")) {
- echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
-}
-else {
- echo "<div class=\"panel_title\">";
-}
+echo "<tr><td width=\"$maj_wside\" valign=\"top\">";
+if (!file_exists("data/xprofile.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
+
+ if (file_exists("data/round.txt")) {
+ echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
+ }
+ else {
+ echo "<div class=\"panel_title\">";
+ }
+
?>
Profile</div>
@@ -939,16 +942,19 @@ include("data/profile.php");
<?php
-if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
}
-if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
-}
-else {
- echo '<div class="panel_title">';
-}
+if (!file_exists("data/xnavigation.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div class="panel_title">';
+ }
?>
@@ -1001,8 +1007,9 @@ else {
<?php
-if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
}
if (file_exists("data/sticky")) {
@@ -5461,7 +5468,7 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
}
}
-if ($maj_count_grand > 0) {
+if (($maj_count_grand > 0) and (!file_exists("data/xsearch.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -5613,7 +5620,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_user
}
}
-if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
+if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_exists("data/xrecent.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
diff --git a/rel.txt b/rel.txt
index 8bb319a..5ba4979 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201006160138
+201006170704
diff --git a/settings.php b/settings.php
index 11ac67d..230e399 100644
--- a/settings.php
+++ b/settings.php
@@ -231,6 +231,42 @@ if (!isset($_POST['nocat']) or empty($_POST['nocat'])) {
}
}
+if (isset($_POST['xprofile']) and !empty($_POST['xprofile']) and ($_POST['xprofile'] == "on") and !file_exists("data/xprofile.txt")) {
+ touch("data/xprofile.txt");
+}
+
+if (!isset($_POST['xprofile']) or empty($_POST['xprofile'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/xprofile.txt")) {
+ unlink("data/xprofile.txt");
+ }
+ }
+}
+
+if (isset($_POST['xnavigation']) and !empty($_POST['xnavigation']) and ($_POST['xnavigation'] == "on") and !file_exists("data/xnavigation.txt")) {
+ touch("data/xnavigation.txt");
+}
+
+if (!isset($_POST['xnavigation']) or empty($_POST['xnavigation'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/xnavigation.txt")) {
+ unlink("data/xnavigation.txt");
+ }
+ }
+}
+
+if (isset($_POST['xsearch']) and !empty($_POST['xsearch']) and ($_POST['xsearch'] == "on") and !file_exists("data/xsearch.txt")) {
+ touch("data/xsearch.txt");
+}
+
+if (!isset($_POST['xsearch']) or empty($_POST['xsearch'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/xsearch.txt")) {
+ unlink("data/xsearch.txt");
+ }
+ }
+}
+
if (isset($_POST['xrecent']) and !empty($_POST['xrecent']) and ($_POST['xrecent'] == "on") and !file_exists("data/xrecent.txt")) {
touch("data/xrecent.txt");
}
@@ -1117,7 +1153,7 @@ a:active {
<tr><td>ping on content change</td><td><input autocomplete="off" class="input" type="text" name="ping" value="<?php readfile("data/ping.txt"); ?>"></td></tr>
<tr><td rowspan="<?php
- $toggles_rowspan = "13";
+ $toggles_rowspan = "16";
if (file_exists("data/email.txt")) {
$toggles_rowspan = $toggles_rowspan + 1;
@@ -1144,7 +1180,10 @@ a:active {
<?php } ?>
<tr><td><input type="checkbox" name="nopdf" <?php if (file_exists("data/nopdf.txt")) { echo checked; } ?>> Do not allow PDF generation for all entries.</td></tr>
-<tr><td><input type="checkbox" name="xrecent" <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel to guests.</td></tr>
+<tr><td><input type="checkbox" name="xprofile" <?php if (file_exists("data/xprofile.txt")) { echo checked; } ?>> Do not show profile panel.</td></tr>
+<tr><td><input type="checkbox" name="xnavigation" <?php if (file_exists("data/xnavigation.txt")) { echo checked; } ?>> Do not show navigation panel.</td></tr>
+<tr><td><input type="checkbox" name="xsearch" <?php if (file_exists("data/xsearch.txt")) { echo checked; } ?>> Do not show search panel.</td></tr>
+<tr><td><input type="checkbox" name="xrecent" <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel.</td></tr>
<tr><td><input type="checkbox" name="xucomment" <?php if (file_exists("data/xucomment.txt")) { echo checked; } ?>> Do not show unread comments panel.</td></tr>
<tr><td><input type="checkbox" name="xrand" <?php if (file_exists("data/xrand.txt")) { echo checked; } ?>> Do not show random entries panel.</td></tr>
<tr><td><input type="checkbox" name="xarc" <?php if (file_exists("data/xarc.txt")) { echo checked; } ?>> Do not show archives panel.</td></tr>
tree 2622313599374e56531c4c995186fb23b2877387
parent 5a82bd7ada42d113e93a435c3aaa65c76ca56ca8
author Engels Antonio <engels@majcms.org> 1277314215 +0800
committer Engels Antonio <engels@majcms.org> 1277314215 +0800
maj-2.0-201006170704.zip
diff --git a/index.php b/index.php
index fe78c94..a6e3300 100644
--- a/index.php
+++ b/index.php
@@ -867,15 +867,18 @@ if (file_exists("data/header.txt")) {
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wtable\">";
echo "<tr><td width=\"$maj_wside\" height=\"$maj_wspace\"></td><td width=\"$maj_wspace\" height=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td><td width=\"$maj_wmain\" height=\"$maj_wspace\"></td><td width=\"$maj_wspace\" height=\"$maj_wspace\"><div style=\"width: {$maj_wspace}px;\"></div></td><td width=\"$maj_wside\" height=\"$maj_wspace\"></td></tr>";
-echo "<tr><td width=\"$maj_wside\" valign=\"top\">";
-if (file_exists("data/round.txt")) {
- echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
-}
-else {
- echo "<div class=\"panel_title\">";
-}
+echo "<tr><td width=\"$maj_wside\" valign=\"top\">";
+if (!file_exists("data/xprofile.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
+
+ if (file_exists("data/round.txt")) {
+ echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
+ }
+ else {
+ echo "<div class=\"panel_title\">";
+ }
+
?>
Profile</div>
@@ -939,16 +942,19 @@ include("data/profile.php");
<?php
-if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
}
-if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
-}
-else {
- echo '<div class="panel_title">';
-}
+if (!file_exists("data/xnavigation.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div class="panel_title">';
+ }
?>
@@ -1001,8 +1007,9 @@ else {
<?php
-if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
}
if (file_exists("data/sticky")) {
@@ -5461,7 +5468,7 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
}
}
-if ($maj_count_grand > 0) {
+if (($maj_count_grand > 0) and (!file_exists("data/xsearch.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
@@ -5613,7 +5620,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_user
}
}
-if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
+if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_exists("data/xrecent.txt") or ($_SESSION['logged_in'] == file_get_contents("data/username.txt")))) {
if (file_exists("data/round.txt")) {
echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
diff --git a/rel.txt b/rel.txt
index 8bb319a..5ba4979 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201006160138
+201006170704
diff --git a/settings.php b/settings.php
index 11ac67d..230e399 100644
--- a/settings.php
+++ b/settings.php
@@ -231,6 +231,42 @@ if (!isset($_POST['nocat']) or empty($_POST['nocat'])) {
}
}
+if (isset($_POST['xprofile']) and !empty($_POST['xprofile']) and ($_POST['xprofile'] == "on") and !file_exists("data/xprofile.txt")) {
+ touch("data/xprofile.txt");
+}
+
+if (!isset($_POST['xprofile']) or empty($_POST['xprofile'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/xprofile.txt")) {
+ unlink("data/xprofile.txt");
+ }
+ }
+}
+
+if (isset($_POST['xnavigation']) and !empty($_POST['xnavigation']) and ($_POST['xnavigation'] == "on") and !file_exists("data/xnavigation.txt")) {
+ touch("data/xnavigation.txt");
+}
+
+if (!isset($_POST['xnavigation']) or empty($_POST['xnavigation'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/xnavigation.txt")) {
+ unlink("data/xnavigation.txt");
+ }
+ }
+}
+
+if (isset($_POST['xsearch']) and !empty($_POST['xsearch']) and ($_POST['xsearch'] == "on") and !file_exists("data/xsearch.txt")) {
+ touch("data/xsearch.txt");
+}
+
+if (!isset($_POST['xsearch']) or empty($_POST['xsearch'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/xsearch.txt")) {
+ unlink("data/xsearch.txt");
+ }
+ }
+}
+
if (isset($_POST['xrecent']) and !empty($_POST['xrecent']) and ($_POST['xrecent'] == "on") and !file_exists("data/xrecent.txt")) {
touch("data/xrecent.txt");
}
@@ -1117,7 +1153,7 @@ a:active {
<tr><td>ping on content change</td><td><input autocomplete="off" class="input" type="text" name="ping" value="<?php readfile("data/ping.txt"); ?>"></td></tr>
<tr><td rowspan="<?php
- $toggles_rowspan = "13";
+ $toggles_rowspan = "16";
if (file_exists("data/email.txt")) {
$toggles_rowspan = $toggles_rowspan + 1;
@@ -1144,7 +1180,10 @@ a:active {
<?php } ?>
<tr><td><input type="checkbox" name="nopdf" <?php if (file_exists("data/nopdf.txt")) { echo checked; } ?>> Do not allow PDF generation for all entries.</td></tr>
-<tr><td><input type="checkbox" name="xrecent" <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel to guests.</td></tr>
+<tr><td><input type="checkbox" name="xprofile" <?php if (file_exists("data/xprofile.txt")) { echo checked; } ?>> Do not show profile panel.</td></tr>
+<tr><td><input type="checkbox" name="xnavigation" <?php if (file_exists("data/xnavigation.txt")) { echo checked; } ?>> Do not show navigation panel.</td></tr>
+<tr><td><input type="checkbox" name="xsearch" <?php if (file_exists("data/xsearch.txt")) { echo checked; } ?>> Do not show search panel.</td></tr>
+<tr><td><input type="checkbox" name="xrecent" <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel.</td></tr>
<tr><td><input type="checkbox" name="xucomment" <?php if (file_exists("data/xucomment.txt")) { echo checked; } ?>> Do not show unread comments panel.</td></tr>
<tr><td><input type="checkbox" name="xrand" <?php if (file_exists("data/xrand.txt")) { echo checked; } ?>> Do not show random entries panel.</td></tr>
<tr><td><input type="checkbox" name="xarc" <?php if (file_exists("data/xarc.txt")) { echo checked; } ?>> Do not show archives panel.</td></tr>