コード例 #1
0
ファイル: channels.php プロジェクト: yukisky/clipbucket
        assign('sort', $vsort);
    } else {
        $sort = false;
    }
    if ($vsort == 'most_recent') {
        $sort = false;
    }
}
$counter = get_counter('channel', $count_query);
if (!$counter) {
    //Collecting Data for Pagination
    $ucount = $u_cond;
    $ucount['count_only'] = true;
    $total_rows = get_users($ucount);
    $counter = $total_rows;
    update_counter('channel', $count_query, $counter);
}
$total_pages = count_pages($counter, CLISTPP);
//Pagination
$pages->paginate($total_pages, $page);
$subtitle = lang('Channels');
if ($category) {
    $subtitle .= " › " . $category;
}
if ($sort) {
    $subtitle .= " • " . $sort;
}
subtitle($subtitle);
template_files('channels.html');
display_it();
コード例 #2
0
ファイル: functions.php プロジェクト: yukisky/clipbucket
/**
 * Function isSectionEnabled
 * This function used to check weather INPUT section is enabled or not
 */
function isSectionEnabled($input, $restrict = false)
{
    global $Cbucket;
    $section = $Cbucket->configs[$input . 'Section'];
    if (!$restrict) {
        if ($section == 'yes') {
            return true;
        } else {
            return false;
        }
    } else {
        if ($section == 'yes' || THIS_PAGE == 'cb_install') {
            return true;
        } else {
            template_files('blocked.html');
            display_it();
            exit;
        }
    }
}