initial commit with snapshot 20140213
This commit is contained in:
29
inc/view.class.php
Normal file
29
inc/view.class.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
require_once('./inc/askModel.class.php');
|
||||
|
||||
abstract class View extends AskModel
|
||||
{
|
||||
protected $TPL = array();
|
||||
protected $db;
|
||||
|
||||
function show($template)
|
||||
{
|
||||
if (file_exists('./templates/'.$template.'.tpl.php'))
|
||||
require_once('./templates/'.$template.'.tpl.php');
|
||||
else
|
||||
throw new Exception('Could not show selected template: '.$template);
|
||||
}
|
||||
|
||||
function assign($n, $v) //osadzanie elementu skórki
|
||||
{
|
||||
$this->TPL[$n] = $v;
|
||||
}
|
||||
|
||||
function __construct(&$db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user