<?php Class Index extends text{ Public $email; Public $temat; Public $tresc; Public function Contact($email,$temat,$tresc){ } Public function Home_page(){ return $this->text_home_page(); } Public function Services(){ return $this->text_services(); } Public function About_us(){ return $this->text_about_us(); } } class text{ private function read_file($file){ //Metoda zwróci nam zawartość pliku } Public function text_contact($email,$temat,$tresc){ } Public function text_home_page(){ } Public function text_services(){ } Public function text_about_us(){ } public function ContactForm($EMAIL,$TEMAT,$TRESC){ } } ?>
i w pliku index.php
mam
<?php switch($_GET['p']){ case'contact': { $smarty->assign('show_page',$index->Contact($_GET['email'],$_GET['temat'] ,$_GET['tresc'])); } break; case'services': { $smarty->assign('show_page' ,$index->Services()); } break; case'about_us': { $smarty->assign('show_page' , $index->About_us()); } break; default: { $smarty->assign('show_page' ,$index->Home_page()); } } ?>
i w index.tpl w odpowiednim miejscu mam {$show_page}
Ale wszytko wyświetla się na górze ;/
Prosiłbym o pomoc