END_OF_CONTACT;
}
public function display_close($show_contact = true) {
if ($show_contact) {
$this->display_contact();
}
echo <<
END_OF_CLOSE;
ob_flush();
}
public function init() {
switch (cms::determine_type()) {
case 'index':
$index = new index();
$index->display();
break;
case 'project':
$project = new project();
$project->display();
break;
case 'note':
$note = new note;
$note->display();
break;
case 'page':
$page = new page;
$page->display();
break;
case "rss":
$rss = new rss();
$rss->display();
break;
case 'archive':
$archive = new archive;
$archive->display();
break;
case "captcha":
$captcha = new captcha;
$captcha->display();
break;
}
}
}
class index extends cms {
public function display() {
require_once("view/index.php");
}
protected function display_exhibits() {
echo "
";
$sql = "SELECT text FROM projects ORDER BY rank";
$result = $this->db->query($sql);
while ($entry = $result->fetch_object()) {
echo $entry->text;
}
echo "
";
}
private function list_projects() {
$sql = "SELECT title FROM projects ORDER BY rank";
$result = $this->db->query($sql);
while ($entry = $result->fetch_object()) {
echo "
" . htmlspecialchars($author) . "
"; echo <<