Adding classes for the different views
This commit is contained in:
parent
b31e9383ff
commit
b554de47ac
23
include/view.php
Normal file
23
include/view.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
require_once('./include/db.php');
|
||||
require_once('./include/functions.php');
|
||||
|
||||
class StartPage {
|
||||
public $title = '';
|
||||
public $content = '';
|
||||
private $menu = array();
|
||||
|
||||
public function get_contents() {
|
||||
$menu_html = '';
|
||||
foreach($this->menu as $item) {
|
||||
$menu_html .= '<div class="menuitem">'.$item.'</div>';
|
||||
}
|
||||
return replace(array('¤pagetitle¤' => $this->title,
|
||||
'¤contents¤' => $this->content,
|
||||
'¤menu¤' => $menu_html),
|
||||
file_get_contents('./html/base.html'));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user