| 1 | <? |
|---|
| 2 | require_once(dirname(__FILE__) . "/../ConfigUtil.class.php"); |
|---|
| 3 | $cfg = new ConfigUtil(); |
|---|
| 4 | $cfg->load("views.Servlet"); |
|---|
| 5 | |
|---|
| 6 | class 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('title','UMIT v0.1 | '); |
|---|
| 29 | $this->pageExists($active); |
|---|
| 30 | $this->loadTemplate("index"); |
|---|
| 31 | parent::processRequest(); |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | function pageExists($active){ |
|---|
| 35 | if (!file_exists($path_m.'pages/'.$active.'.php')){ |
|---|
| 36 | $this->registerGlobal('template_page', 'page_404.html'); |
|---|
| 37 | $active = '404'; |
|---|
| 38 | } |
|---|
| 39 | } |
|---|
| 40 | } |
|---|
| 41 | ?> |
|---|