Esempio n. 1
0
 function slide()
 {
     $slide_id = $_GET['slide'];
     $slide = new Slide();
     $slide->createFromID($slide_id);
     if ($slide->description) {
         $slide->description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $slide->description);
     }
     //show error if slide does not exist
     if (!isset($slide->slide_id)) {
         header('Location: ' . BASE_PATH . 'error/404');
         die;
     }
     $usage = $slide->getUsage();
     $slide->comments = $slide->getComments();
     $this->set('usage', $usage);
     $this->set('slide', $slide);
     $this->set('page_title', $slide->getTitle() . ' - SlideWiki');
 }