This commit has been accessed 577 times via Git panel.
commit f5cd6cfe5f21bfa500d85718b65fa27ba6ffc72b
tree d96784f45de1106869d89d62fe10048e778c00e2
parent 1e1fc96dc01690f1251519ed7d74c2767e7d6d95
author Engels Antonio <engels@majcms.org> 1277314194 +0800
committer Engels Antonio <engels@majcms.org> 1277314194 +0800
maj-0.14-20071231-bb.zip
diff --git a/member.php b/member.php
index 862295c..faccc0a 100644
--- a/member.php
+++ b/member.php
@@ -747,7 +747,9 @@ elseif (file_exists("data/members/active/$id") and file_exists("data/members/act
if ($dh_posts = opendir("data/items")) {
while (($member_posts = readdir($dh_posts)) !== false) {
- $total_posts[] = $member_posts;
+ if ($member_posts != "." && $member_posts != "..") {
+ $total_posts[] = $member_posts;
+ }
if (file_exists("data/items/$member_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
@@ -782,7 +784,7 @@ if ($dh_posts = opendir("data/items")) {
$posts = count($items_posts);
$all_posts = count($total_posts);
-$ratio_posts = (($posts/$all_posts) * 90);
+$ratio_posts = (($posts/$all_posts) * 100);
$ratio_posts = number_format($ratio_posts,2);
echo "<tr><td width=90><p>total posts</p></td><td><p><code>$posts</code></p></td></tr>";
echo "<tr><td width=90><p> </p></td><td><p><code>{$ratio_posts}% of total</code></p></td></tr>";
tree d96784f45de1106869d89d62fe10048e778c00e2
parent 1e1fc96dc01690f1251519ed7d74c2767e7d6d95
author Engels Antonio <engels@majcms.org> 1277314194 +0800
committer Engels Antonio <engels@majcms.org> 1277314194 +0800
maj-0.14-20071231-bb.zip
diff --git a/member.php b/member.php
index 862295c..faccc0a 100644
--- a/member.php
+++ b/member.php
@@ -747,7 +747,9 @@ elseif (file_exists("data/members/active/$id") and file_exists("data/members/act
if ($dh_posts = opendir("data/items")) {
while (($member_posts = readdir($dh_posts)) !== false) {
- $total_posts[] = $member_posts;
+ if ($member_posts != "." && $member_posts != "..") {
+ $total_posts[] = $member_posts;
+ }
if (file_exists("data/items/$member_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
continue;
@@ -782,7 +784,7 @@ if ($dh_posts = opendir("data/items")) {
$posts = count($items_posts);
$all_posts = count($total_posts);
-$ratio_posts = (($posts/$all_posts) * 90);
+$ratio_posts = (($posts/$all_posts) * 100);
$ratio_posts = number_format($ratio_posts,2);
echo "<tr><td width=90><p>total posts</p></td><td><p><code>$posts</code></p></td></tr>";
echo "<tr><td width=90><p> </p></td><td><p><code>{$ratio_posts}% of total</code></p></td></tr>";