display(); ?> page = $page; $this->smarty = new Smarty_init(); if ( $this->smarty->template_exists( "$page.tpl" ) ) { $this->setKeys( "location", $page ); } else { $this->setKeys( "location", "404" ); } } function setKeys( $key, $value ) { $this->smarty->assign( $key, $value ); } function display() { $this->smarty->display( "index.tpl" ); } } ?>