* @copyright (cc) creative commons - attribution-shareAlike 3.0 unported * @version 1.0 * @package app * @subpackage controllers */ class gallery extends controller { /** * index function * display galleries and/or images */ public function index() { $html["title"] = 'portfolio'; $html["meta"] = ''; $html["sidebar"] = $this->view("blog/sidebar_qr", array(), true); $html["selected"] = 'gallery'; $html["script"] = $this->view('initShadowboxJS', array(), true); $html["jsfiles"] = ''; $gm = $this->model("galleryModel"); if(isset(library::catalog()->url[1])) { if(!isset(library::catalog()->url[2])) { //---display category $cat = $gm->getCat(library::catalog()->url[1]); if(!isset($cat[0])) { throw new Exception("invalid category", statusCodes::HTTP_NOT_FOUND); } else { $body = '