Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 102 → Rev 104

/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
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
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>');