/blog/post.php |
---|
14,7 → 14,7 |
if ($page->isUserGM($page->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="add-post.php">Add Post</a></p>'); |
write('<p class="bold"><a href="add-post.php?id="' . $_GET['id'] . '">Add Comment</a></p>'); |
write('<br />'); |
} |
/blog/index.php |
---|
10,7 → 10,7 |
if ($page->isUserGM($page->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="add-post.php">Add Post</a></p>'); |
write('<p class="bold"><a href="add-post.php?id=-1">Add Post</a></p>'); |
write('<br />'); |
} |
19,7 → 19,7 |
{ |
$id = $ids[$i]; |
$post = $page->getBlogPost($id); |
write('<a href="post.php?id=' . $i . '"><h3>' . $post->title. '</h3></a>'); |
write('<a href="post.php?id=' . $ids[$i] . '"><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/post-add.php |
---|
6,7 → 6,7 |
if (isset($_POST['title']) && isset($_POST['content']) && isset($_POST['catagory']) && isset($_POST['parentID'])) |
{ |
$page->query('insert into BlogPosts VALUES(0, "' . $page->getLoggedInUser. '", "' . $_POST['title'] . '", "' . $_POST['content'] . '", NOW(), "' . $_POST['catagory'] . '", ' . $_POST['parentID'] . ', 0)'); |
$page->query('insert into BlogPosts VALUES(0, ' . $_POST['parentID'] . ', "' . $page->getLoggedInUser. '", "' . $_POST['title'] . '", "' . $_POST['content'] . '", NOW(), "' . $_POST['catagory'] . '", 0)'); |
$page->redirect("index.php"); |
} |
/admin/account-do.php |
---|
1,8 → 1,8 |
<?php |
require '_taios.php'; |
require '../_taios.php'; |
$page = new Taios_Page('Update Account'); |
$page = new Taios_Page('Update Account', '../'); |
$userID = $page->getPostID(); |
$page->checkLoggedIn(); |
17,13 → 17,23 |
{ |
if (isset($accessID) && $page->isUserAdmin($page->getLoggedInUser())) |
{ |
$page->query('UPDATE Users SET AccessID=' . $accessID . ' WHERE ID = ' . $userID); |
$page->query('UPDATE Users SET AccessID = "' . $accessID . '" WHERE ID = ' . $userID); |
} |
if (!empty($password)) |
{ |
$page->query('UPDATE Users SET Password=' . sha1($password) . ' WHERE ID = ' . $userID); |
$page->query('UPDATE Users SET Password = "' . sha1($password) . '" WHERE ID = ' . $userID); |
} |
if (!empty($email)) |
{ |
$page->query('UPDATE Users SET EmailAddress = "' . $email . '" WHERE ID = ' . $userID); |
} |
if (!empty($name)) |
{ |
$page->query('UPDATE Users SET Name = "' . $name . '" WHERE ID = ' . $userID); |
} |
} |
else |
{ |
37,6 → 47,6 |
} |
} |
$page->redirect('account.php?id=' . $id); |
$page->redirect('account.php?id=' . $userID); |
?> |
/_taios.php |
---|
119,11 → 119,11 |
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>'); |
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID = ' . $id); |
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID=' . $id); |
for ($i = 0; $i < count($ids); $i++) |
{ |
write('<p class="indent">'); |
$this->drawBlogPostTree($i); |
$this->drawBlogPostTree($ids[$i]); |
write('</p>'); |
} |