コード例 #1
0
ファイル: newposterwall.php プロジェクト: EeGgSs/nZEDb
    $error = 'No categories enabled for the new poster wall. Possible choices are: ' . implode(', ', $startTypes) . '.';
}
if (!$error) {
    // Check if the user did not pass the required t parameter, set it to the first type.
    if (!isset($_REQUEST['t'])) {
        $_REQUEST['t'] = $types[0];
    }
    // Check if the user passed an invalid t parameter.
    if (!in_array($_REQUEST['t'], $types)) {
        $_REQUEST['t'] = $types[0];
    }
    $page->smarty->assign('types', $types);
    $page->smarty->assign('type', $_REQUEST['t']);
    switch ($_REQUEST['t']) {
        case 'Movies':
            $getnewestmovies = $releases->getNewestMovies();
            $page->smarty->assign('newest', $getnewestmovies);
            $user = $page->users->getById($page->users->currentUserId());
            $page->smarty->assign('cpapi', $user['cp_api']);
            $page->smarty->assign('cpurl', $user['cp_url']);
            $page->smarty->assign('goto', 'movies');
            break;
        case 'Console':
            $getnewestconsole = $releases->getNewestConsole();
            $page->smarty->assign('newest', $getnewestconsole);
            $page->smarty->assign('goto', 'console');
            break;
        case 'XXX':
            $getnewestxxx = $releases->getNewestXXX();
            $page->smarty->assign('newest', $getnewestxxx);
            $page->smarty->assign('goto', 'xxx');