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; }
function mch_role_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); // Role $data = MCHFunctions::next_matches($category->id(), $champ->id(), $options[2]); $block = array(); $block['role'] = $data; $mc = RMUtilities::module_config('match'); $block['link'] = $mc['urlmode'] ? XOOPS_URL . '/' . $mc['htbase'] : XOOPS_URL . '/modules/match'; $block['lang_viewrol'] = __('View full roleplay »'); $block['category'] = $category->id(); return $block; }
// Email: i.bitcero@gmail.com // License: GPL 2.0 // -------------------------------------------------------------- include 'header.php'; $xoopsOption['template_main'] = "mch_index.html"; $xoopsOption['module_subpage'] = 'index'; include XOOPS_ROOT_PATH . '/header.php'; // Get current match $id_champ = rmc_server_var($_REQUEST, 'ch', 0); if ($id_champ <= 0) { $champ = MCHFunctions::current_championship(); } else { $champ = new MCHChampionship($id_champ); } if (!is_object($champ)) { $champ = MCHFunctions::last_championship(); } // Time Formatter $tf = new RMTimeFormatter(0, __('%M% %d%, %Y%', 'match')); $xoopsTpl->assign('champ', array('id' => $champ->id(), 'name' => $champ->getVar('name'), 'start' => $tf->format($champ->getVar('start')), 'end' => $tf->format($champ->getVar('end')))); // Get category $id_cat = rmc_server_var($_REQUEST, 'cat', 0); if ($id_cat > 0) { $category = new MCHCategory($id_cat); } else { $category = MCHFunctions::first_category(); } $xoopsTpl->assign('category', array('id' => $category->id(), 'name' => $category->getVar('name'), 'desc' => $category->getVar('description'))); // Results $data = MCHFunctions::latest_results($category->id(), $champ->id(), 20); $xoopsTpl->assign('results', $data);