/_taios.php |
---|
116,17 → 116,24 |
{ |
$post = $this->getBlogPost($id); |
if ($first) |
{ |
write('<h3><a href="post.php?id=' . $id . '">' . $post->title. '</a> <a href="post.php?id=' . $post->parent->ID . '">^</a></h3>'); |
} |
else |
{ |
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>'); |
write('<p>' . $this->replaceBBCode($post->content) . '</p>'); |
write('<br />'); |
if ($this->isUserNormal($this->getLoggedInUser())) |
{ |
echo '<p class="bold"><a href="add-post.php?id=' . $id . '">Add Comment</a>'; |
if ($this->isUserAdmin($this->getLoggedInUser()) || $this->getLoggedInUser() == $post->author->ID) |
echo ' · <a href="del-post.php?id=' . $id . '">Delete Post</a>'; |
{ |
echo ' · <a href="edit-post.php?id=' . $id . '">Edit Post</a>'; |
echo ' · <a href="del-post.php?id=' . $id . '">Delete Post</a>'; |
} |
write('</p><br />'); |
} |
356,7 → 363,7 |
$post->author = $this->getUserByID($row['AuthorID']); |
$post->user = $this->getUserByID($row['AuthorID']); // For some older pages |
$post->title = $row['Title']; |
$post->content = $this->replaceBBCode($row['Content']); |
$post->content = $row['Content']; |
$post->datePosted = strtotime($row['DatePosted']); |
$post->category = $row['Category']; |
$post->spam = $row['Spam']; |
/blog/add-post.php |
---|
14,7 → 14,7 |
require '../_taios.php'; |
$page = new Taios_Page('Blog Posts', '../'); |
$page = new Taios_Page('Add Post', '../'); |
$page->checkLoggedIn(); |
$error = ''; |
/blog/edit-post.php |
---|
2,7 → 2,7 |
require '../_taios.php'; |
$page = new Taios_Page('Blog Posts', '../'); |
$page = new Taios_Page('Edit Post', '../'); |
if (isset($_GET['id'])) |
{ |
44,7 → 44,7 |
else |
{ |
$page->query('UPDATE BlogPosts SET Content = "' . $content . '", Title = "' . $title . '", Category = "' . $category . '" WHERE ID = ' . $id); |
$page->redirect('index.php'); |
$page->redirect('post.php?id=' . $id); |
} |
} |
63,7 → 63,7 |
<table> |
<tr> |
<td class="bold">Title: </td> |
<td><input type="text" name="title" value="<?php echo $post->title; ?>/></td> |
<td><input type="text" name="title" value="<?php echo $post->title; ?>"/></td> |
</tr> |
<tr> |
<td class="bold">Content: </td> |
71,7 → 71,7 |
</tr> |
<tr> |
<td class="bold">Catagory: </td> |
<td><input type="text" name="category" /><?php echo $post->category; ?></td> |
<td><input type="text" name="category" value="<?php echo $post->category; ?>" /></td> |
</tr> |
<?php |
80,7 → 80,7 |
<tr> |
<td class="bold"></td> |
<td><input type="submit" value="Post" /></td> |
<td><input type="submit" value="Edit" /></td> |
</tr> |
</table> |
</form> |
/blog/index.php |
---|
31,7 → 31,7 |
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>'); |
write('<p>' . $page->replaceBBCode($post->content) . '</p>'); |
write('<br />'); |
} |
/index.php |
---|
30,7 → 30,7 |
write('<h4>' . $post->title. '</h4>'); |
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>'); |
write('<p>' . $page->replaceBBCode($post->content) . '</p>'); |
write('<br />'); |
} |
/data/sidebar-gradient.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |