Exemplo n.º 1
0
            } else {
                $page = new SpotPage_index($db, $settings, $currentSession, array('search' => $req->getDef('search', $spotUserSystem->getIndexFilter($currentSession['user']['userid'])), 'pagenr' => $req->getDef('pagenr', 0), 'sortby' => $req->getDef('sortby', ''), 'sortdir' => $req->getDef('sortdir', ''), 'messageid' => $req->getDef('messageid', ''), 'action' => $req->getDef('action', ''), 'data' => $req->getDef('data', array())));
            }
            # if
            SpotTiming::stop('renderpage->case-default');
            $page->render();
            break;
            # default
    }
    # switch
    SpotTiming::stop('renderpage');
    # timing
    SpotTiming::stop('total');
    # enable of disable de timer
    if ($settings->get('enable_timing') && !in_array($req->getDef('page', ''), array('catsjson', 'statics', 'getnzb', 'getnzbmobile', 'markallasread', 'rss', 'newznabapi'))) {
        SpotTiming::display();
    }
    # if
} catch (PermissionDeniedException $x) {
    /*
     * We try to render a permission denied error using the already created
     * renderer first. We do this, so pages which are supposed to output 
     * XML, can also output their errors using XML.
     *
     * If no page is initiated just yet, we create an basic renderer object
     * to render an error page
     */
    if (!$page instanceof SpotPage_Abs) {
        $page = new SpotPage_render($db, $settings, $currentSession, '', array());
    }
    # if