From 3b5656db543462ec1f126d0d97b1ee1ba25c782e Mon Sep 17 00:00:00 2001
From: deva
Date: Sun, 26 Oct 2008 20:53:16 +0000
Subject: Added no-cache pragma. Fixed indentation in forum code.
---
forum/htdocs/index.php | 54 ++++++++++++++++++++++++------------------------
forum/utils/contacts.php | 6 +++++-
forum/utils/forums.php | 10 ++++-----
forum/utils/posts.php | 10 ++++-----
forum/utils/threads.php | 10 ++++-----
forum/utils/view.php | 10 ++++-----
6 files changed, 52 insertions(+), 48 deletions(-)
diff --git a/forum/htdocs/index.php b/forum/htdocs/index.php
index 163537c..23b9d36 100644
--- a/forum/htdocs/index.php
+++ b/forum/htdocs/index.php
@@ -1,5 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Logged in as: " . $current_user->name . " - Logout
";
+ echo " \n";
- echo "
\n";
+ echo "
gid . "\">" . $this->name . "";
+ if(!$client_is_mobile_device)
+ echo " - ".sizeof($this->contacts)." contacts (". sprintf("%d", sizeof($this->contacts) - $ness)." hidden)";
+ echo "
\n";
echo "
\n";
@@ -184,7 +184,7 @@ class Posts {
public function show()
{
global $current_user;
- echo "
" . $this->thread->name . "
";
+ echo "
" . $this->thread->name . "
\n";
/* // Recursive
foreach($this->posts as $post) {
@@ -194,14 +194,14 @@ class Posts {
// Linear
foreach($this->posts_linear as $post) {
- $post->show("", false);
+ $post->show(" ", false);
}
$this->thread->lastseen[$current_user->uid] = time();
$this->write();
- echo "
Back to the top
";
+ echo "
Back to the top
\n";
}
private function recurser($parentpost, $element)
diff --git a/forum/utils/threads.php b/forum/utils/threads.php
index e3f0996..f65a1f8 100644
--- a/forum/utils/threads.php
+++ b/forum/utils/threads.php
@@ -20,11 +20,11 @@ class Thread {
public function show()
{
global $fid, $current_user;
- echo "
";
+ echo "
\n";
+ if($this->lastseen[$current_user->uid] < $this->lastpost) echo "
";
+ else echo "
\n";
+ echo "
tid . "\">" . $this->name . "\n";
+ echo "
\n";
}
private function loadLastSeen($lastseen)
diff --git a/forum/utils/view.php b/forum/utils/view.php
index 9ff3143..d22c8d8 100644
--- a/forum/utils/view.php
+++ b/forum/utils/view.php
@@ -1,5 +1,5 @@
";
+echo "
";
if($fid) echo "
forums";
if($tid) echo "::
threads";
if($pid) echo "::
posts";
@@ -12,15 +12,15 @@ echo "
\n";
$posts = new Posts($FORUMS_DIR . "/" . $fid . "/" . $tid . ".xml");
$posts->show();
} else if($fid) {
- echo "
Threads
";
- echo "
New thread";
+ echo "
Threads
\n";
+ echo "
New thread\n";
include_once("threads.php");
$threads = new Threads($FORUMS_DIR . "/" . $fid);
$threads->show();
} else {
- echo "
Forums
";
+ echo "
Forums
\n";
include_once("forums.php");
$forums = new Forums($FORUMS_DIR . "/forums.xml");
--
cgit v1.2.3