Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 17 → Rev 20

/_taios.php
257,11 → 257,20
{
$post = new BlogPost;
$post->ID = $row['ID'];
if ($row['ParentID'] == -1)
{
$post->parent = -1;
}
else
{
$post->parent = $this->getBlogPost($row['ParentID']);
}
$post->user = $this->getUserByID($row['AuthorID']);
$post->title = $row['Title'];
$post->content = $row['Content'];
$post->datePosted = strtotime($row['DatePosted']);
$post->category = $row['Category'];
$post->spam = $row['Spam'];
return $post;
}
306,11 → 315,13
class BlogPost
{
public $ID;
public $parent;
public $author;
public $title;
public $content;
public $datePosted;
public $category;
public $spam;
}
 
function write($str)
/admin/account.php
0,0 → 1,43
<?php
 
require '../_taios.php';
 
$page = new Taios_Page('Administration', '../');
$page->drawHeader();
$page->drawMiddle();
 
$page->checkLoggedIn();
 
$userID = $page->getGetID();
$user = $page->getUserByID($userID);
 
if (($page->getLoggedInUser()->ID == $userID || $page->isUserAdmin($page->getLoggedInUser())) && $user)
{
?>
 
<table>
<tr><td class="bold">ID: </td><td><?php echo $user->ID; ?></td></tr>
<tr><td class="bold">AccessID: </td><td><?php echo $user->accessID; ?></td></tr>
<tr><td class="bold">Username: </td><td><?php echo $user->username; ?></td></tr>
<tr><td class="bold">Password: </td><td><?php echo $user->password; ?></td></tr>
<tr><td class="bold">Email Address: </td><td><?php echo $user->emailAddress; ?></td></tr>
<tr><td class="bold">Name: </td><td><?php echo $user->name; ?></td></tr>
</table>
 
<?php
}
else
{
if (!$user)
{
drawError('No such user, #' . $userID);
}
else
{
drawError('You do not have permission to access this page.');
}
}
 
$page->drawFooter();
 
?>
/blog/index.php
20,7 → 20,7
}
else
{
$ids = $page->findIDs('BlogPosts' 'WHERE ParentID = -1');
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1');
for ($i = 0; $i < count($ids); $i++)
{
$id = $ids[$i];