示例#1
0
 public function getNewsIntro()
 {
     $news_items = NewsModel::getLatestNews(NEWS_ITEMS);
     $random_shot = ScreenshotsModel::getRandomScreenshot();
     $this->addCSSFiles(array('intro.css', 'news.css', '../javascripts/slimbox/css/slimbox2.css'));
     $this->addJSFiles(array('jquery-1.3.2.min.js', 'slimbox/js/slimbox2.js', 'introduction.js'));
     return $this->renderPage(array('title' => 'Home', 'content_title' => 'Latest Developments', 'show_intro' => true, 'news_items' => $news_items, 'news_archive_link' => true, 'random_shot' => $random_shot), $this->_template);
 }
示例#2
0
 public function index()
 {
     $category = $_GET['cat'];
     $game = $_GET['game'];
     $num = $_GET['num'];
     $json = $_POST['json'];
     if (!empty($json)) {
         return $this->getAllJSON();
     } else {
         if (!empty($category)) {
             if (!empty($game) && !empty($num)) {
                 return $this->getGame($category, $game, $num);
             }
             return $this->getCategory($category, $game);
         }
     }
     $this->addCSSFiles(array('screenshots.css', '../javascripts/slimbox/css/slimbox2.css'));
     $this->addJSFiles(array('jquery-1.3.2.min.js', 'slimbox/js/slimbox2.js', 'screenshots.js'));
     $screenshot = ScreenshotsModel::getAllScreenshots();
     $random_shot = ScreenshotsModel::getRandomScreenshot();
     return $this->renderPage(array('title' => 'Screenshots', 'content_title' => 'Screenshots', 'screenshots' => $screenshot, 'random_shot' => $random_shot), $this->_template);
 }