Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 60 → Rev 72

/blog/post.php
11,12 → 11,6
$page->drawBlogCategoriesMenu();
$page->drawMiddle();
 
if ($page->isUserGM($page->getLoggedInUser()))
{
write('<p class="bold"><a href="add-post.php?id="' . $_GET['id'] . '">Add Comment</a></p>');
write('<br />');
}
 
$page->drawBlogPostTree($_GET['id']);
 
$page->drawFooter();
/blog/index.php
4,7 → 4,6
 
$page = new Taios_Page('Blog Posts', '../');
$page->drawHeader();
 
$page->drawBlogCategoriesMenu();
$page->drawMiddle();
 
14,7 → 13,15
write('<br />');
}
 
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1');
$query = 'WHERE ParentID = -1';
 
if (isset($_GET['cat']))
{
$query = $query . ' AND Category = "' . $_GET['cat'] . '"';
write('<p>Only showing blog posts from the ' . $_GET['cat'] . ' category. <a href="index.php">Reset Filtering</a></p><br />');
}
 
$ids = $page->findIDs('BlogPosts', $query);
for ($i = 0; $i < count($ids); $i++)
{
$id = $ids[$i];
/_taios.php
115,9 → 115,14
function drawBlogPostTree($id)
{
$post = $this->getBlogPost($id);
write('<h3>' . $post->title. '</h3>');
write('<a href="' . $this->url . 'blog/post.php?id=' . $id . '"><h3>' . $post->title. '</h3></a>');
write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>');
write('<p>' . $post->content . '</p>');
if ($this->isUserNormal($page->getLoggedInUser()))
{
write('<p class="bold"><a href="add-commend.php?id="' . $id . '">Add Comment</a></p>');
write('<br />');
}
 
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID=' . $id);
for ($i = 0; $i < count($ids); $i++)
132,7 → 137,7
{
$cats = array();
$ids = $this->findIDs('BlogPosts');
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID = -1');
for ($i = 0; $i < count($ids); $i++)
{
$cat = $this->getBlogPost($ids[$i])->category;
142,16 → 147,16
}
}
write('<h3>Blog Categories</h3>');
write('<h3>Categories</h3>');
for ($i = 0; $i < count($cats); $i++)
{
$this->drawMenuItem($cats[$i], $this->url . 'blog/index.php?cat=' . $cats[$i]);
$this->drawMenuItem($cats[$i], 'blog/index.php?cat=' . $cats[$i]);
}
}
 
function redirect($url)
function redirect($u)
{
header('Location: ' . $url);
header('Location: ' . $u);
die();
}
/admin/account-do.php
50,3 → 50,4
$page->redirect('account.php?id=' . $userID);
 
?>
 
/admin/account.php
57,3 → 57,4
$page->drawFooter();
 
?>
 
/admin/index.php
24,3 → 24,4
$page->drawFooter();
 
?>