root/website/lib/views/IndexForm.class.php @ 1812

Revision 1812, 2.0 kB (checked in by kop-labs, 6 years ago)

Changes directory structure

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