Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 10 → Rev 13

/blog/index.php
14,7 → 14,7
write('<br />');
}
 
$ids = $page->findIDs('BlogPosts');
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1');
for ($i = 0; $i < count($ids); $i++)
{
$id = $ids[$i];
/install.sql
18,23 → 18,12
CREATE TABLE BlogPosts
(
ID INT NOT NUll AUTO_INCREMENT,
ParentID INT,
AuthorID INT,
Title TEXT,
Content TEXT,
DatePosted DATETIME,
Category TEXT,
PRIMARY KEY(ID)
);
 
CREATE TABLE BlogComments
(
ID INT NOT NUll AUTO_INCREMENT,
ParentID INT,
AuthorID INT,
PostID INT,
Title TEXT,
Content TEXT,
DatePosted DATETIME,
Spam BOOLEAN,
PRIMARY KEY(ID)
);
/index.php
22,7 → 22,7
 
<?php
 
$ids = $page->findIDs('BlogPosts');
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1');
for ($i = 0; $i < 5 && $i < count($ids); $i++)
{
$id = $ids[$i];
/_taios.php
268,6 → 268,28
$this->drawError('Cannot find blog post, #' . $id);
}
function getGetID()
{
$id = $_GET['id'];
if (empty($id))
{
$id = 1;
}
return $id;
}
function getPostID()
{
$id = $_POSt['id'];
if (empty($id))
{
$id = 1;
}
return $id;
}
}
 
class User
/admin/index.php
11,6 → 11,16
 
write('<h3><a href="account.php?id=' . $user->ID. '">Manage Account</a></h3>');
 
if ($page->isUserAdmin($user))
{
write('<h3><a href="all-accounts.php">Manage All Accounts</a></h3>');
write('<h3><a href="all-blog-posts.php">Manage All Blog Posts</a></h3>');
write('<h3><a href="all-blog-comments.php">Manage All Blog Comments</a></h3>');
write('<h3><a href="all-forum-categories.php">Manage All Forum Categories</a></h3>');
write('<h3><a href="all-forum-topics.php">Manage All Forum Topics</a></h3>');
write('<h3><a href="all-forum-posts.php">Manage All Forum Posts</a></h3>');
}
 
$page->drawFooter();
 
?>