root/website/lib/views/StandardForm.class.php @ 1860

Revision 1860, 1.9 kB (checked in by kop-labs, 6 years ago)

Testing separete templates dir

Line 
1<?
2require_once(dirname(__FILE__) . "/../ConfigUtil.class.php");
3$cfg = new ConfigUtil();
4$cfg->load("views.Servlet");
5
6class StandardForm extends Servlet{
7    function processRequest(){
8        $this->registerGlobal('top','template_top.html');
9        $this->registerGlobal('template_menu','template_menu.html');
10        $this->registerGlobal('template_ad', 'template_ad_small.html');
11        $this->registerGlobal('template_download' , '');
12        $active =  ($_GET['active']?$_GET['active']:'home');
13        $this->registerGlobal('active',$active);
14        $this->registerGlobal('template_page',('page_'.$active.'.html'));
15        $this->registerGlobal('template_footer','template_footer.html');
16        $this->registerGlobal('ad_728x90','ad_728x90.html');
17        $this->registerGlobal('ad_200x200','ad_200x200.html');
18        $this->registerGlobal('site_name','site_name.html');
19        $this->registerGlobal('site_slogan','site_slogan.html');
20        $this->registerGlobal('site_copyright','site_copyright.html');
21        $this->registerGlobal('link_xhtml','link_xhtml.html');
22        $this->registerGlobal('link_rss','link_rss.html');
23        $this->registerGlobal('link_css','link_css.html');
24        $this->registerGlobal('link_language','link_language.html');
25        $this->registerGlobal('link_powerdby','link_powerdby.html');
26        //$this->registerGlobal('vmenu', 'template_vmenu.html');
27       
28        //$this->registerGlobal('vmenu', '');
29        $this->registerGlobal('template', 'template/default');
30        $this->registerGlobal('title','UMIT v0.1 | ');
31        $this->pageExists($active);
32        $this->_preProcess(); 
33        $this->loadTemplate("index");
34        parent::processRequest();
35    }
36   
37    function pageExists($active){
38       
39        //if (!file_exists($path_m.'pages/'.$active.'.php')){
40        //    $this->registerGlobal('template_page', 'page_404.html');
41            //$active = '404';
42        //}
43    }
44}
45?>
Note: See TracBrowser for help on using the browser.