A new, object-oriented, better vesion of μForum
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
500 B

  1. <?php
  2. require_once('./inc/askModel.class.php');
  3. abstract class View extends AskModel
  4. {
  5. protected $TPL = array();
  6. protected $db;
  7. function show($template)
  8. {
  9. if (file_exists('./templates/'.$template.'.tpl.php'))
  10. require_once('./templates/'.$template.'.tpl.php');
  11. else
  12. throw new Exception('Could not show selected template: '.$template);
  13. }
  14. function assign($n, $v) //osadzanie elementu skórki
  15. {
  16. $this->TPL[$n] = $v;
  17. }
  18. function __construct(&$db)
  19. {
  20. $this->db = $db;
  21. }
  22. }
  23. ?>