374,13 → 374,38 |
$this->drawError('Cannot find blog post, #' . $id); |
} |
|
function getProject($id) |
{ |
$result = $this->query('SELECT * FROM Projects WHERE ID = ' . $id); |
while ($row = mysql_fetch_array($result)) |
{ |
$project = new Project; |
|
$project->ID = $row['ID']; |
$project->author = $this->getUserByID($row['AuthorID']); |
$project->title = $row['Title']; |
$project->description = $row['Description']; |
$project->logoURL = $row['LogoURL']; |
$project->downloadURL = $row['DownloadURL']; |
$project->websiteURl = $row['WebsiteURL']; |
$project->latestVersion = $row['LatestVersion']; |
$project->lastUpdate = strtotime($row['LastUpdate']); |
|
return $project; |
} |
|
return false; |
} |
|
function delBlogPost($id) |
{ |
$ids = $this->findIDs('BlogPosts', 'WHERE ParentID=' . $id); |
for ($i = 0; $i < count($ids); $i++) |
{ |
$this->delBlogPost($ids[$i]); |
} |
|
$this->query('delete from BlogPosts where ID=' . $id); |
$this->query('DELETE FROM BlogPosts WHERE ID=' . $id); |
} |
|
function getGetID() |
430,6 → 455,19 |
public $spam; |
} |
|
class Project |
{ |
public $ID; |
public $author; |
public $title; |
public $description; |
public $logoURL; |
public $downloadURL; |
public $websiteURL; |
public $latestVersion; |
public $lastUpdate; |
} |
|
function write($str) |
{ |
echo $str; |