/blog/index.php |
---|
26,7 → 26,7 |
{ |
$id = $ids[$i]; |
$post = $page->getBlogPost($id); |
write('<a href="post.php?id=' . $ids[$i] . '"><h3>' . $post->title. '</h3></a>'); |
write('<a href="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>'); |
} |
/blog/add-post.php |
---|
4,6 → 4,8 |
$page = new Taios_Page('Blog Posts', '../'); |
if ($this-> |
if (isset($_POST['title']) && isset($_POST['content']) && isset($_POST['catagory']) && isset($_POST['parentID'])) |
{ |
$page->query('insert into BlogPosts VALUES(0, ' . $_POST['parentID'] . ', "' . $page->getLoggedInUser()->ID . '", "' . $_POST['title'] . '", "' . $_POST['content'] . '", NOW(), "' . $_POST['catagory'] . '", 0)'); |
22,7 → 24,7 |
?> |
<form action="post-add.php" method="post"> |
<form action="add-post.php" method="post"> |
<table> |
<tr> |
<td class="bold">Title: </td> |
30,7 → 32,7 |
</tr> |
<tr> |
<td class="bold">Content: </td> |
<td><input type="text" name="content" /></td> |
<td><textarea name="content" style="width: 523px; height: 543px">Content Here</textarea></td> |
</tr> |
<tr> |
<td class="bold">Catagory: </td> |
/_taios.php |
---|
124,7 → 124,7 |
write('<br />'); |
if ($this->isUserNormal($this->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="post-add.php?id=' . $id . '">Add Comment</a></p>'); |
write('<p class="bold"><a href="add-post.php?id=' . $id . '">Add Comment</a></p>'); |
write('<br />'); |
} |
311,7 → 311,8 |
{ |
$post->parent = $this->getBlogPost($row['ParentID']); |
} |
$post->user = $this->getUserByID($row['AuthorID']); |
$post->author = $this->getUserByID($row['AuthorID']); |
$post-user = $this->getUserByID($row['AuthorID']); // For some older pages |
$post->title = $row['Title']; |
$post->content = $row['Content']; |
$post->datePosted = strtotime($row['DatePosted']); |
/admin/all-blog-posts.php |
---|
29,7 → 29,7 |
{ |
$post = $page->getBlogPost($ids[$i]); |
write('<tr>'); |
write('<td>' . $post->ID . '</td>'); |
write('<td><a href="../blog/edit-post.php?id=' . $post->ID . '">' . $post->ID . '</a></td>'); |
if ($post->parent == -1) |
{ |
write('<td>' . $post->parent . '</td>'); |
38,7 → 38,7 |
{ |
write('<td>' . $post->parent->ID . '</td>'); |
} |
write('<td>' . $post->author->ID . '</td>'); |
write('<td>' . $post->user->ID . '</td>'); |
write('<td>' . $post->title . '</td>'); |
write('<td>' . $post->content . '</td>'); |
write('<td>' . $post->datePosted . '</td>'); |
/admin/all-accounts.php |
---|
28,7 → 28,7 |
{ |
$user = $page->getUserByID($ids[$i]); |
write('<tr>'); |
write('<td>' . $user->ID . '</td>'); |
write('<td><a href="account.php?id=' . $user->ID . '">' . $user->ID . '</a></td>'); |
write('<td>' . $user->accessID . '</td>'); |
write('<td>' . $user->username . '</td>'); |
write('<td>' . $user->password . '</td>'); |