Пример #1
0
function mch_ranking_bkshow($options)
{
    include_once XOOPS_ROOT_PATH . '/modules/match/class/mchfunctions.php';
    RMTemplate::get()->add_xoops_style('blocks.css', 'match');
    $ch = rmc_server_var($_GET, 'champ', $options[0]);
    $champ = $ch <= 0 ? MCHFunctions::current_championship() : new MCHChampionship($ch);
    if (!is_object($champ)) {
        $champ = MCHFunctions::last_championship();
    }
    $ch = rmc_server_var($_GET, 'cat', $options[1]);
    $category = $ch <= 0 ? MCHFunctions::first_category() : new MCHCategory($ch);
    // Ranking
    $ranking = MCHFunctions::get_ranking($champ->id(), $category->id());
    $block = array();
    $block['ranking'] = $ranking;
    $block['limit'] = $options[2] <= 0 ? 6 : $options[2];
    $block['lang_wons'] = __('Wons:', 'match');
    return $block;
}
Пример #2
0
function m_show_ranking()
{
    global $xoopsModule;
    $champ = rmc_server_var($_REQUEST, 'champ', 0);
    $category = rmc_server_var($_REQUEST, 'category', 0);
    $champs = MCHFunctions::all_championships();
    $categories = array();
    MCHFunctions::categories_tree($categories);
    if ($champ > 0 && $category > 0) {
        $ranking = MCHFunctions::get_ranking($champ, $category);
    }
    MCHFunctions::toolbar();
    xoops_cp_location('<a href="./">' . $xoopsModule->name() . "</a> &raquo; " . __('Coaches', 'match'));
    RMTemplate::get()->assign('xoops_pagetitle', __('Coaches', 'match'));
    RMTemplate::get()->add_style('admin.css', 'match');
    RMTemplate::get()->add_script(RMCURL . '/include/js/jquery.checkboxes.js');
    RMTemplate::get()->add_local_script('admin_match.js', 'match');
    RMTemplate::get()->add_head("<script type='text/javascript'>\nvar mch_message='" . __('Do you really want to delete selected coaches?', 'match') . "';\n\n        var mch_select_message = '" . __('You must select some coach before to execute this action!', 'match') . "';</script>");
    xoops_cp_header();
    $match_extra_options = RMEvents::get()->run_event('match.more.options');
    include RMTemplate::get()->get_template("admin/mch_ranking.php", 'module', 'match');
    xoops_cp_footer();
}