This commit has been accessed 555 times via Git panel.
commit e596d8416c4b1b7c514289d1c9832319914d4428
tree 87c5d5f7f1f306bb2e077c6949b22c31f6cbca11
parent 3da81473c5463d762ca6f61fda63db8e04619380
author Engels Antonio <engels@majcms.org> 1277314196 +0800
committer Engels Antonio <engels@majcms.org> 1277314196 +0800
maj-0.14-20080312-bb.zip
diff --git a/add.php b/add.php
index f83b914..e98b6a4 100644
--- a/add.php
+++ b/add.php
@@ -702,7 +702,14 @@ if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_e
if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
$ml_author = file_get_contents("data/author.txt");
- $ml_from = file_get_contents("data/email.txt");
+
+ if (file_exists("data/ml-from.txt")) {
+ $ml_from = $ml_reply2;
+ }
+ else {
+ $ml_from = file_get_contents("data/email.txt");
+ }
+
$ml_from = '"' . $ml_author . '" <' . $ml_from . '>';
}
@@ -710,7 +717,14 @@ if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_e
if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and file_exists("data/bb.txt")) {
$ml_from_firstname = file_get_contents("data/members/active/{$_SESSION['logged_in']}/firstname.txt");
$ml_from_lastname = file_get_contents("data/members/active/{$_SESSION['logged_in']}/lastname.txt");
- $ml_from = file_get_contents("data/members/active/{$_SESSION['logged_in']}/email.txt");
+
+ if (file_exists("data/ml-from.txt")) {
+ $ml_from = $ml_reply2;
+ }
+ else {
+ $ml_from = file_get_contents("data/members/active/{$_SESSION['logged_in']}/email.txt");
+ }
+
$ml_from = '"' . "$ml_from_firstname $ml_from_lastname" . '" <' . $ml_from . '>';
}
}
diff --git a/index.php b/index.php
index 208dc03..edad158 100644
--- a/index.php
+++ b/index.php
@@ -234,7 +234,13 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
$ml_reply2 = file_get_contents("data/ml-reply2.txt");
}
- $ml_from = file_get_contents("$live_dir/email.txt");
+ if (file_exists("data/ml-from.txt")) {
+ $ml_from = $ml_reply2;
+ }
+ else {
+ $ml_from = file_get_contents("$live_dir/email.txt");
+ }
+
$ml_from = str_replace(" at ","@",$ml_from);
$ml_from_firstname = file_get_contents("$live_dir/firstname.txt");
@@ -3683,6 +3689,154 @@ rsort($show_latest_items);
reset($show_latest_items);
$count_latest_items = count($show_latest_items);
+if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
+ if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
+ while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
+ if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
+ $show_pending_comment_flags[] = $entry_pending_comment_flags;
+ }
+ }
+ closedir($dh_pending_comment_flags);
+ }
+
+ rsort($show_pending_comment_flags);
+ reset($show_pending_comment_flags);
+ $count_pending_comment_flags = count($show_pending_comment_flags);
+
+ if (($count_latest_items > 0) and ($count_pending_comment_flags > 0)) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
+ }
+
+ echo 'Pending Comments</div>';
+ echo '<div id=panel_body>';
+ if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
+ while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
+ if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
+ echo '<a href=' . $_SERVER['PHP_SELF'] . '?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/$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) {
+ echo ' ( ' . $comment_count_value . ' comment ) ';
+ }
+ elseif ($comment_count_value > 1) {
+ echo ' ( ' . $comment_count_value . ' comments ) ';
+ }
+ else {
+ echo '';
+ }
+ echo '</font><br>';
+ }
+ }
+ closedir($dh_list_pending_comment_flags);
+ }
+ echo '</div>';
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
+ }
+}
+
+if (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 (($entry_pending_list = readdir($dh_pending_list)) !== false) {
+
+ if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*", $entry_pending_list)) {
+ $show_pending_list[] = $entry_pending_list;
+ }
+ }
+ closedir($dh_pending_list);
+ }
+
+ sort($show_pending_list);
+ reset($show_pending_list);
+ $count_pending_list = count($show_pending_list);
+
+ if ($count_pending_list > 0) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
+ }
+
+ echo "Pending Member";
+ if ($count_pending_list > 1) {
+ echo "s";
+ }
+ echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
+ if ($count_pending_list > 1) {
+ echo "s";
+ }
+ echo " below.</div>";
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
+
+ foreach ($show_pending_list as $pending_list_entry) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
+ }
+
+ echo "$pending_list_entry";
+ echo '<a href=reg.php?username=';
+ echo $pending_list_entry;
+ echo '&key=';
+ readfile("data/members/confirmed/$pending_list_entry/key.txt");
+ echo '&action=deny><img src=images/widget.del.png border=0 width=11 height=11 align=right alt=deny></a><a href=reg.php?username=';
+ echo $pending_list_entry;
+ echo '&key=';
+ readfile("data/members/confirmed/$pending_list_entry/key.txt");
+ echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
+ echo "<div id=panel_body>";
+ if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
+ echo "<a href=\"";
+ readfile("data/members/confirmed/$pending_list_entry/url.txt");
+ echo "\" target=_pending>";
+ }
+ readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
+ echo " ";
+ readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
+ if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
+ echo "</a>";
+ }
+ echo "<br>";
+ $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
+ $pending_email = wordwrap($pending_email,30);
+ echo $pending_email;
+ if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
+ $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
+ $confirmed_year = substr($confirmed,0,4);
+ $confirmed_month = substr($confirmed,4,2);
+ $confirmed_day = substr($confirmed,6,2);
+ $confirmed_hh = substr($confirmed,8,2);
+ $confirmed_mm = substr($confirmed,10,2);
+ $email_confirmed = date("d M Y H:i", mktime($confirmed_hh, $confirmed_mm, 0, $confirmed_month, $confirmed_day, $confirmed_year));
+ echo "<br>$email_confirmed";
+ }
+ echo "</div>";
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
+ }
+ }
+}
+
if (($count_latest_items > 0) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
if (file_exists("data/round.txt")) {
@@ -3710,14 +3864,13 @@ if (($count_latest_items > 0) and (!file_exists("data/xrecent.txt") or isset($_S
echo '</a><br>';
$increment_recent_entries = $increment_recent_entries + 1;
}
-}
-if ($count_latest_items > 0) {
echo '</div>';
if (file_exists("data/round.txt")) {
echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
}
+}
?>
<?php
@@ -3850,123 +4003,30 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
?>
<?php
- if (file_exists("data/categories")) {
- if ($dh_categories = opendir("data/categories")) {
- 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/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
-
-
- if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
- $show_categories[] = $entry_categories;
- }
- }
- closedir($dh_categories);
- }
-
- sort($show_categories);
- reset($show_categories);
- $count_categories = count($show_categories);
-
- if ($count_categories > 0) {
+if (file_exists("data/categories")) {
+ if ($dh_categories = opendir("data/categories")) {
+ while (($entry_categories = readdir($dh_categories)) !== false) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
-
- echo 'Categories</div><div id=panel_body>';
- foreach ($show_categories as $category) {
- echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
- if (file_exists("data/categories/$category/title.txt")) {
- $category_title = file_get_contents("data/categories/$category/title.txt");
- }
- else {
- $category_title = ucfirst(str_replace("_"," ",$category));
- }
- echo $category_title;
- echo "</a><br />";
+ if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ continue;
}
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ continue;
}
- }
- }
-
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
-
- echo 'Statistics</div><div id=panel_body>';
- echo "Total Entries: $count_latest_items";
- if (file_exists("data/hits.txt")) {
- echo '<br>Site Hits: ';
- readfile("data/hits.txt");
- }
- if (file_exists("data/google.txt")) {
- echo '<br>Google Visits: ';
- readfile("data/google.txt");
- }
- if (file_exists("data/rss-0.91.txt")) {
- echo '<br>RSS 0.91 Hits: ';
- readfile("data/rss-0.91.txt");
- }
- if (file_exists("data/rss-1.0.txt")) {
- echo '<br>RSS 1.0 Hits: ';
- readfile("data/rss-1.0.txt");
- }
- if (file_exists("data/rss-2.0.txt")) {
- echo '<br>RSS 2.0 Hits: ';
- readfile("data/rss-2.0.txt");
- }
- if (file_exists("data/sitemap.txt")) {
- echo '<br>Sitemap Requests: ';
- readfile("data/sitemap.txt");
- }
-
- echo '</div>';
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
-}
-?>
-
-
-
-<?php
-if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
- if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
- $show_pending_comment_flags[] = $entry_pending_comment_flags;
+ if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
+ $show_categories[] = $entry_categories;
}
}
- closedir($dh_pending_comment_flags);
+ closedir($dh_categories);
}
- rsort($show_pending_comment_flags);
- reset($show_pending_comment_flags);
- $count_pending_comment_flags = count($show_pending_comment_flags);
+ sort($show_categories);
+ reset($show_categories);
+ $count_categories = count($show_categories);
- if (($count_latest_items > 0) and ($count_pending_comment_flags > 0)) {
+ if ($count_categories > 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">';
@@ -3975,30 +4035,17 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
echo '<div id=panel_title>';
}
- echo 'Pending Comments</div>';
- echo '<div id=panel_body>';
- if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
- if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?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/$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) {
- echo ' ( ' . $comment_count_value . ' comment ) ';
- }
- elseif ($comment_count_value > 1) {
- echo ' ( ' . $comment_count_value . ' comments ) ';
- }
- else {
- echo '';
- }
- echo '</font><br>';
- }
+ echo 'Categories</div><div id=panel_body>';
+ foreach ($show_categories as $category) {
+ echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
+ if (file_exists("data/categories/$category/title.txt")) {
+ $category_title = file_get_contents("data/categories/$category/title.txt");
}
- closedir($dh_list_pending_comment_flags);
+ else {
+ $category_title = ucfirst(str_replace("_"," ",$category));
+ }
+ echo $category_title;
+ echo "</a><br />";
}
echo '</div>';
@@ -4007,100 +4054,50 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
}
}
}
-?>
-<?php
-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 (($entry_pending_list = readdir($dh_pending_list)) !== false) {
+if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*", $entry_pending_list)) {
- $show_pending_list[] = $entry_pending_list;
- }
- }
- closedir($dh_pending_list);
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
}
- sort($show_pending_list);
- reset($show_pending_list);
- $count_pending_list = count($show_pending_list);
-
- if ($count_pending_list > 0) {
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
-
- echo "Pending Member";
- if ($count_pending_list > 1) {
- echo "s";
- }
- echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
- if ($count_pending_list > 1) {
- echo "s";
- }
- echo " below.</div>";
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
-
- foreach ($show_pending_list as $pending_list_entry) {
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
+ echo 'Statistics</div><div id=panel_body>';
+ echo "Total Entries: $count_latest_items";
+ if (file_exists("data/hits.txt")) {
+ echo '<br>Site Hits: ';
+ readfile("data/hits.txt");
+ }
+ if (file_exists("data/google.txt")) {
+ echo '<br>Google Visits: ';
+ readfile("data/google.txt");
+ }
+ if (file_exists("data/rss-0.91.txt")) {
+ echo '<br>RSS 0.91 Hits: ';
+ readfile("data/rss-0.91.txt");
+ }
+ if (file_exists("data/rss-1.0.txt")) {
+ echo '<br>RSS 1.0 Hits: ';
+ readfile("data/rss-1.0.txt");
+ }
+ if (file_exists("data/rss-2.0.txt")) {
+ echo '<br>RSS 2.0 Hits: ';
+ readfile("data/rss-2.0.txt");
+ }
+ if (file_exists("data/sitemap.txt")) {
+ echo '<br>Sitemap Requests: ';
+ readfile("data/sitemap.txt");
+ }
- echo "$pending_list_entry";
- echo '<a href=reg.php?username=';
- echo $pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$pending_list_entry/key.txt");
- echo '&action=deny><img src=images/widget.del.png border=0 width=11 height=11 align=right alt=deny></a><a href=reg.php?username=';
- echo $pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$pending_list_entry/key.txt");
- echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
- echo "<div id=panel_body>";
- if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
- echo "<a href=\"";
- readfile("data/members/confirmed/$pending_list_entry/url.txt");
- echo "\" target=_pending>";
- }
- readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
- echo " ";
- readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
- if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
- echo "</a>";
- }
- echo "<br>";
- $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
- $pending_email = wordwrap($pending_email,30);
- echo $pending_email;
- if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
- $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
- $confirmed_year = substr($confirmed,0,4);
- $confirmed_month = substr($confirmed,4,2);
- $confirmed_day = substr($confirmed,6,2);
- $confirmed_hh = substr($confirmed,8,2);
- $confirmed_mm = substr($confirmed,10,2);
- $email_confirmed = date("d M Y H:i", mktime($confirmed_hh, $confirmed_mm, 0, $confirmed_month, $confirmed_day, $confirmed_year));
- echo "<br>$email_confirmed";
- }
- echo "</div>";
+ echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
}
}
+
?>
<?php
diff --git a/settings.php b/settings.php
index 5a1cfa2..7565bc5 100644
--- a/settings.php
+++ b/settings.php
@@ -562,6 +562,18 @@ if (!isset($_POST['bb_disclaimer']) or empty($_POST['bb_disclaimer'])) {
}
}
+if (isset($_POST['ml_from']) and !empty($_POST['ml_from'])) {
+ touch("data/ml-from.txt");
+}
+
+if (!isset($_POST['ml_from']) or empty($_POST['ml_from'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/ml-from.txt")) {
+ unlink("data/ml-from.txt");
+ }
+ }
+}
+
if (isset($_POST['ml_reply2']) and !empty($_POST['ml_reply2']) and (file_get_contents("data/ml-reply2.txt") != $_POST['ml_reply2']) and (ereg("@", $_POST['ml_reply2'])) and (ereg("\.", $_POST['ml_reply2']))) {
$ml_reply2_write_content = strtolower($_POST['ml_reply2']);
$ml_reply2_write_content = trim($ml_reply2_write_content);
@@ -576,6 +588,9 @@ if (!isset($_POST['ml_reply2']) or empty($_POST['ml_reply2'])) {
if (file_exists("data/ml-reply2.txt")) {
unlink("data/ml-reply2.txt");
}
+ if (file_exists("data/ml-from.txt")) {
+ unlink("data/ml-from.txt");
+ }
}
}
@@ -998,7 +1013,7 @@ a:active {
<tr><td><p><input type=checkbox name=nak <?php if (file_exists("data/nak.txt")) { echo checked; } ?>> Do not acknowledge comment submissions via e-mail.</p></td></tr>
<?php } ?>
<tr><td><p><input type=checkbox name=nopdf <?php if (file_exists("data/nopdf.txt")) { echo checked; } ?>> Do not allow PDF generation for all entries.</p></td></tr>
-<tr><td><p><input type=checkbox name=xrecent <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel.</p></td></tr>
+<tr><td><p><input type=checkbox name=xrecent <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel to guests.</p></td></tr>
<tr><td><p><input type=checkbox name=xrand <?php if (file_exists("data/xrand.txt")) { echo checked; } ?>> Do not show random entries panel.</p></td></tr>
<tr><td><p><input type=checkbox name=xarc <?php if (file_exists("data/xarc.txt")) { echo checked; } ?>> Do not show archives panel.</p></td></tr>
<tr><td><p><input type=checkbox name=xcat <?php if (file_exists("data/xcat.txt")) { echo checked; } ?>> Do not show categories panel.</p></td></tr>
@@ -1225,7 +1240,23 @@ if (file_exists("data/bb-idle.txt")) {
<?php } ?>
-<tr><td><p>mailing list</p></td><td><p><input type=checkbox name=ml <?php if (file_exists("data/ml.txt")) { echo checked; } ?>> Enable simple mailing list.</p></td></tr>
+<tr><td<?php
+
+if (file_exists("data/ml-reply2.txt")) { echo " rowspan=2"; } ?>><p>mailing list</p></td><td><p><input type=checkbox name=ml <?php if (file_exists("data/ml.txt")) { echo checked; } ?>> Enable simple mailing list.</p></td></tr>
+
+<?php
+
+if (file_exists("data/ml-reply2.txt")) {
+ echo "<tr><td><input type=checkbox name=ml_from";
+
+ if (file_exists("data/ml-from.txt")) {
+ echo " checked";
+ }
+
+ echo ">Use reply-to as sender address.</td></tr>";
+}
+
+?>
<?php if (file_exists("data/ml.txt")) { ?>
tree 87c5d5f7f1f306bb2e077c6949b22c31f6cbca11
parent 3da81473c5463d762ca6f61fda63db8e04619380
author Engels Antonio <engels@majcms.org> 1277314196 +0800
committer Engels Antonio <engels@majcms.org> 1277314196 +0800
maj-0.14-20080312-bb.zip
diff --git a/add.php b/add.php
index f83b914..e98b6a4 100644
--- a/add.php
+++ b/add.php
@@ -702,7 +702,14 @@ if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_e
if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
$ml_author = file_get_contents("data/author.txt");
- $ml_from = file_get_contents("data/email.txt");
+
+ if (file_exists("data/ml-from.txt")) {
+ $ml_from = $ml_reply2;
+ }
+ else {
+ $ml_from = file_get_contents("data/email.txt");
+ }
+
$ml_from = '"' . $ml_author . '" <' . $ml_from . '>';
}
@@ -710,7 +717,14 @@ if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_e
if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and file_exists("data/bb.txt")) {
$ml_from_firstname = file_get_contents("data/members/active/{$_SESSION['logged_in']}/firstname.txt");
$ml_from_lastname = file_get_contents("data/members/active/{$_SESSION['logged_in']}/lastname.txt");
- $ml_from = file_get_contents("data/members/active/{$_SESSION['logged_in']}/email.txt");
+
+ if (file_exists("data/ml-from.txt")) {
+ $ml_from = $ml_reply2;
+ }
+ else {
+ $ml_from = file_get_contents("data/members/active/{$_SESSION['logged_in']}/email.txt");
+ }
+
$ml_from = '"' . "$ml_from_firstname $ml_from_lastname" . '" <' . $ml_from . '>';
}
}
diff --git a/index.php b/index.php
index 208dc03..edad158 100644
--- a/index.php
+++ b/index.php
@@ -234,7 +234,13 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
$ml_reply2 = file_get_contents("data/ml-reply2.txt");
}
- $ml_from = file_get_contents("$live_dir/email.txt");
+ if (file_exists("data/ml-from.txt")) {
+ $ml_from = $ml_reply2;
+ }
+ else {
+ $ml_from = file_get_contents("$live_dir/email.txt");
+ }
+
$ml_from = str_replace(" at ","@",$ml_from);
$ml_from_firstname = file_get_contents("$live_dir/firstname.txt");
@@ -3683,6 +3689,154 @@ rsort($show_latest_items);
reset($show_latest_items);
$count_latest_items = count($show_latest_items);
+if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
+ if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
+ while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
+ if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
+ $show_pending_comment_flags[] = $entry_pending_comment_flags;
+ }
+ }
+ closedir($dh_pending_comment_flags);
+ }
+
+ rsort($show_pending_comment_flags);
+ reset($show_pending_comment_flags);
+ $count_pending_comment_flags = count($show_pending_comment_flags);
+
+ if (($count_latest_items > 0) and ($count_pending_comment_flags > 0)) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
+ }
+
+ echo 'Pending Comments</div>';
+ echo '<div id=panel_body>';
+ if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
+ while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
+ if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
+ echo '<a href=' . $_SERVER['PHP_SELF'] . '?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/$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) {
+ echo ' ( ' . $comment_count_value . ' comment ) ';
+ }
+ elseif ($comment_count_value > 1) {
+ echo ' ( ' . $comment_count_value . ' comments ) ';
+ }
+ else {
+ echo '';
+ }
+ echo '</font><br>';
+ }
+ }
+ closedir($dh_list_pending_comment_flags);
+ }
+ echo '</div>';
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
+ }
+}
+
+if (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 (($entry_pending_list = readdir($dh_pending_list)) !== false) {
+
+ if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*", $entry_pending_list)) {
+ $show_pending_list[] = $entry_pending_list;
+ }
+ }
+ closedir($dh_pending_list);
+ }
+
+ sort($show_pending_list);
+ reset($show_pending_list);
+ $count_pending_list = count($show_pending_list);
+
+ if ($count_pending_list > 0) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
+ }
+
+ echo "Pending Member";
+ if ($count_pending_list > 1) {
+ echo "s";
+ }
+ echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
+ if ($count_pending_list > 1) {
+ echo "s";
+ }
+ echo " below.</div>";
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
+
+ foreach ($show_pending_list as $pending_list_entry) {
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
+ }
+
+ echo "$pending_list_entry";
+ echo '<a href=reg.php?username=';
+ echo $pending_list_entry;
+ echo '&key=';
+ readfile("data/members/confirmed/$pending_list_entry/key.txt");
+ echo '&action=deny><img src=images/widget.del.png border=0 width=11 height=11 align=right alt=deny></a><a href=reg.php?username=';
+ echo $pending_list_entry;
+ echo '&key=';
+ readfile("data/members/confirmed/$pending_list_entry/key.txt");
+ echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
+ echo "<div id=panel_body>";
+ if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
+ echo "<a href=\"";
+ readfile("data/members/confirmed/$pending_list_entry/url.txt");
+ echo "\" target=_pending>";
+ }
+ readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
+ echo " ";
+ readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
+ if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
+ echo "</a>";
+ }
+ echo "<br>";
+ $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
+ $pending_email = wordwrap($pending_email,30);
+ echo $pending_email;
+ if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
+ $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
+ $confirmed_year = substr($confirmed,0,4);
+ $confirmed_month = substr($confirmed,4,2);
+ $confirmed_day = substr($confirmed,6,2);
+ $confirmed_hh = substr($confirmed,8,2);
+ $confirmed_mm = substr($confirmed,10,2);
+ $email_confirmed = date("d M Y H:i", mktime($confirmed_hh, $confirmed_mm, 0, $confirmed_month, $confirmed_day, $confirmed_year));
+ echo "<br>$email_confirmed";
+ }
+ echo "</div>";
+
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ }
+ }
+ }
+}
+
if (($count_latest_items > 0) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
if (file_exists("data/round.txt")) {
@@ -3710,14 +3864,13 @@ if (($count_latest_items > 0) and (!file_exists("data/xrecent.txt") or isset($_S
echo '</a><br>';
$increment_recent_entries = $increment_recent_entries + 1;
}
-}
-if ($count_latest_items > 0) {
echo '</div>';
if (file_exists("data/round.txt")) {
echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
}
+}
?>
<?php
@@ -3850,123 +4003,30 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
?>
<?php
- if (file_exists("data/categories")) {
- if ($dh_categories = opendir("data/categories")) {
- 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/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
-
-
- if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
- $show_categories[] = $entry_categories;
- }
- }
- closedir($dh_categories);
- }
-
- sort($show_categories);
- reset($show_categories);
- $count_categories = count($show_categories);
-
- if ($count_categories > 0) {
+if (file_exists("data/categories")) {
+ if ($dh_categories = opendir("data/categories")) {
+ while (($entry_categories = readdir($dh_categories)) !== false) {
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
-
- echo 'Categories</div><div id=panel_body>';
- foreach ($show_categories as $category) {
- echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
- if (file_exists("data/categories/$category/title.txt")) {
- $category_title = file_get_contents("data/categories/$category/title.txt");
- }
- else {
- $category_title = ucfirst(str_replace("_"," ",$category));
- }
- echo $category_title;
- echo "</a><br />";
+ if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ continue;
}
- echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+ if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+ continue;
}
- }
- }
-
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
-
- echo 'Statistics</div><div id=panel_body>';
- echo "Total Entries: $count_latest_items";
- if (file_exists("data/hits.txt")) {
- echo '<br>Site Hits: ';
- readfile("data/hits.txt");
- }
- if (file_exists("data/google.txt")) {
- echo '<br>Google Visits: ';
- readfile("data/google.txt");
- }
- if (file_exists("data/rss-0.91.txt")) {
- echo '<br>RSS 0.91 Hits: ';
- readfile("data/rss-0.91.txt");
- }
- if (file_exists("data/rss-1.0.txt")) {
- echo '<br>RSS 1.0 Hits: ';
- readfile("data/rss-1.0.txt");
- }
- if (file_exists("data/rss-2.0.txt")) {
- echo '<br>RSS 2.0 Hits: ';
- readfile("data/rss-2.0.txt");
- }
- if (file_exists("data/sitemap.txt")) {
- echo '<br>Sitemap Requests: ';
- readfile("data/sitemap.txt");
- }
-
- echo '</div>';
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
-}
-?>
-
-
-
-<?php
-if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
- if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
- $show_pending_comment_flags[] = $entry_pending_comment_flags;
+ if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
+ $show_categories[] = $entry_categories;
}
}
- closedir($dh_pending_comment_flags);
+ closedir($dh_categories);
}
- rsort($show_pending_comment_flags);
- reset($show_pending_comment_flags);
- $count_pending_comment_flags = count($show_pending_comment_flags);
+ sort($show_categories);
+ reset($show_categories);
+ $count_categories = count($show_categories);
- if (($count_latest_items > 0) and ($count_pending_comment_flags > 0)) {
+ if ($count_categories > 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">';
@@ -3975,30 +4035,17 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
echo '<div id=panel_title>';
}
- echo 'Pending Comments</div>';
- echo '<div id=panel_body>';
- if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
- if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?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/$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) {
- echo ' ( ' . $comment_count_value . ' comment ) ';
- }
- elseif ($comment_count_value > 1) {
- echo ' ( ' . $comment_count_value . ' comments ) ';
- }
- else {
- echo '';
- }
- echo '</font><br>';
- }
+ echo 'Categories</div><div id=panel_body>';
+ foreach ($show_categories as $category) {
+ echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
+ if (file_exists("data/categories/$category/title.txt")) {
+ $category_title = file_get_contents("data/categories/$category/title.txt");
}
- closedir($dh_list_pending_comment_flags);
+ else {
+ $category_title = ucfirst(str_replace("_"," ",$category));
+ }
+ echo $category_title;
+ echo "</a><br />";
}
echo '</div>';
@@ -4007,100 +4054,50 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
}
}
}
-?>
-<?php
-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 (($entry_pending_list = readdir($dh_pending_list)) !== false) {
+if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*", $entry_pending_list)) {
- $show_pending_list[] = $entry_pending_list;
- }
- }
- closedir($dh_pending_list);
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+ }
+ else {
+ echo '<div id=panel_title>';
}
- sort($show_pending_list);
- reset($show_pending_list);
- $count_pending_list = count($show_pending_list);
-
- if ($count_pending_list > 0) {
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
-
- echo "Pending Member";
- if ($count_pending_list > 1) {
- echo "s";
- }
- echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
- if ($count_pending_list > 1) {
- echo "s";
- }
- echo " below.</div>";
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
-
- foreach ($show_pending_list as $pending_list_entry) {
-
- if (file_exists("data/round.txt")) {
- echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
- }
- else {
- echo '<div id=panel_title>';
- }
+ echo 'Statistics</div><div id=panel_body>';
+ echo "Total Entries: $count_latest_items";
+ if (file_exists("data/hits.txt")) {
+ echo '<br>Site Hits: ';
+ readfile("data/hits.txt");
+ }
+ if (file_exists("data/google.txt")) {
+ echo '<br>Google Visits: ';
+ readfile("data/google.txt");
+ }
+ if (file_exists("data/rss-0.91.txt")) {
+ echo '<br>RSS 0.91 Hits: ';
+ readfile("data/rss-0.91.txt");
+ }
+ if (file_exists("data/rss-1.0.txt")) {
+ echo '<br>RSS 1.0 Hits: ';
+ readfile("data/rss-1.0.txt");
+ }
+ if (file_exists("data/rss-2.0.txt")) {
+ echo '<br>RSS 2.0 Hits: ';
+ readfile("data/rss-2.0.txt");
+ }
+ if (file_exists("data/sitemap.txt")) {
+ echo '<br>Sitemap Requests: ';
+ readfile("data/sitemap.txt");
+ }
- echo "$pending_list_entry";
- echo '<a href=reg.php?username=';
- echo $pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$pending_list_entry/key.txt");
- echo '&action=deny><img src=images/widget.del.png border=0 width=11 height=11 align=right alt=deny></a><a href=reg.php?username=';
- echo $pending_list_entry;
- echo '&key=';
- readfile("data/members/confirmed/$pending_list_entry/key.txt");
- echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
- echo "<div id=panel_body>";
- if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
- echo "<a href=\"";
- readfile("data/members/confirmed/$pending_list_entry/url.txt");
- echo "\" target=_pending>";
- }
- readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
- echo " ";
- readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
- if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
- echo "</a>";
- }
- echo "<br>";
- $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
- $pending_email = wordwrap($pending_email,30);
- echo $pending_email;
- if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
- $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
- $confirmed_year = substr($confirmed,0,4);
- $confirmed_month = substr($confirmed,4,2);
- $confirmed_day = substr($confirmed,6,2);
- $confirmed_hh = substr($confirmed,8,2);
- $confirmed_mm = substr($confirmed,10,2);
- $email_confirmed = date("d M Y H:i", mktime($confirmed_hh, $confirmed_mm, 0, $confirmed_month, $confirmed_day, $confirmed_year));
- echo "<br>$email_confirmed";
- }
- echo "</div>";
+ echo '</div>';
- if (file_exists("data/round.txt")) {
- echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
- }
- }
+ if (file_exists("data/round.txt")) {
+ echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
}
}
+
?>
<?php
diff --git a/settings.php b/settings.php
index 5a1cfa2..7565bc5 100644
--- a/settings.php
+++ b/settings.php
@@ -562,6 +562,18 @@ if (!isset($_POST['bb_disclaimer']) or empty($_POST['bb_disclaimer'])) {
}
}
+if (isset($_POST['ml_from']) and !empty($_POST['ml_from'])) {
+ touch("data/ml-from.txt");
+}
+
+if (!isset($_POST['ml_from']) or empty($_POST['ml_from'])) {
+ if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
+ if (file_exists("data/ml-from.txt")) {
+ unlink("data/ml-from.txt");
+ }
+ }
+}
+
if (isset($_POST['ml_reply2']) and !empty($_POST['ml_reply2']) and (file_get_contents("data/ml-reply2.txt") != $_POST['ml_reply2']) and (ereg("@", $_POST['ml_reply2'])) and (ereg("\.", $_POST['ml_reply2']))) {
$ml_reply2_write_content = strtolower($_POST['ml_reply2']);
$ml_reply2_write_content = trim($ml_reply2_write_content);
@@ -576,6 +588,9 @@ if (!isset($_POST['ml_reply2']) or empty($_POST['ml_reply2'])) {
if (file_exists("data/ml-reply2.txt")) {
unlink("data/ml-reply2.txt");
}
+ if (file_exists("data/ml-from.txt")) {
+ unlink("data/ml-from.txt");
+ }
}
}
@@ -998,7 +1013,7 @@ a:active {
<tr><td><p><input type=checkbox name=nak <?php if (file_exists("data/nak.txt")) { echo checked; } ?>> Do not acknowledge comment submissions via e-mail.</p></td></tr>
<?php } ?>
<tr><td><p><input type=checkbox name=nopdf <?php if (file_exists("data/nopdf.txt")) { echo checked; } ?>> Do not allow PDF generation for all entries.</p></td></tr>
-<tr><td><p><input type=checkbox name=xrecent <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel.</p></td></tr>
+<tr><td><p><input type=checkbox name=xrecent <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel to guests.</p></td></tr>
<tr><td><p><input type=checkbox name=xrand <?php if (file_exists("data/xrand.txt")) { echo checked; } ?>> Do not show random entries panel.</p></td></tr>
<tr><td><p><input type=checkbox name=xarc <?php if (file_exists("data/xarc.txt")) { echo checked; } ?>> Do not show archives panel.</p></td></tr>
<tr><td><p><input type=checkbox name=xcat <?php if (file_exists("data/xcat.txt")) { echo checked; } ?>> Do not show categories panel.</p></td></tr>
@@ -1225,7 +1240,23 @@ if (file_exists("data/bb-idle.txt")) {
<?php } ?>
-<tr><td><p>mailing list</p></td><td><p><input type=checkbox name=ml <?php if (file_exists("data/ml.txt")) { echo checked; } ?>> Enable simple mailing list.</p></td></tr>
+<tr><td<?php
+
+if (file_exists("data/ml-reply2.txt")) { echo " rowspan=2"; } ?>><p>mailing list</p></td><td><p><input type=checkbox name=ml <?php if (file_exists("data/ml.txt")) { echo checked; } ?>> Enable simple mailing list.</p></td></tr>
+
+<?php
+
+if (file_exists("data/ml-reply2.txt")) {
+ echo "<tr><td><input type=checkbox name=ml_from";
+
+ if (file_exists("data/ml-from.txt")) {
+ echo " checked";
+ }
+
+ echo ">Use reply-to as sender address.</td></tr>";
+}
+
+?>
<?php if (file_exists("data/ml.txt")) { ?>