Esempio n. 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);
 }
Esempio n. 2
0
 public function getAllJSON()
 {
     $sshots = array();
     foreach (ScreenshotsModel::getAllScreenshots() as $category) {
         foreach ($category['games'] as $screenshot) {
             foreach ($screenshot->getFiles() as $files) {
                 $files['filename'] = DIR_SCREENSHOTS . "/{$files['filename']}-full.png";
                 $sshots[] = array_values($files);
             }
         }
     }
     print json_encode($sshots);
     return True;
 }