source: trunk/www/Base/Controller.php

Last change on this file was 93, checked in by chronos, 11 years ago
  • Fixed: System variable as parameter to constructors of descendents of Module class.
  • Removed: End PHP mark "?>" from all files.
File size: 603 bytes
Line 
1<?php
2
3include_once(dirname(__FILE__).'/Model.php');
4
5class Controller extends Module
6{
7 function Process()
8 {
9 if(array_key_exists('Action', $_GET)) $Action = $_GET['Action'];
10 else $Action = 'Show';
11 if(method_exists($this, $Action))
12 {
13 if($this->System->Modules['Permission']->Check(substr(get_class($this), 0, -10), $Action))
14 return($this->$Action());
15 else return('Nemáte oprávnění provést akci '.$Action.' modulu '.substr(get_class($this), 0, -10));
16 } else return('Metoda '.$Action.' modulu '.get_class($this).' nenalezena.');
17 }
18}
Note: See TracBrowser for help on using the repository browser.