示例#1
0
<?php

echo GWF_Box::box($tLang->lang('pi_csrank'), $tLang->lang('pt_csrank'));
WC_HTML::rankingPageButtons();
$headers = array(array('#', null, null, 2), array('', null, null, 1), array($tLang->lang('th_user_countryid'), 'countryname', 'ASC', 3), array($tLang->lang('th_players'), 'users', 'DESC', 6), array($tLang->lang('th_score'), 'totalscore', 'DESC', 4), array($tLang->lang('th_spc'), 'spc', 'DESC', 7), array($tLang->lang('th_avg'), 'avg', 'DESC', 8), array($tLang->lang('th_sumtop3'), 'top3', 'DESC', 9), array($tLang->lang('th_top_player'), 'topuser', 'ASC', 5));
$rank = 1;
$hlc = $tVars['highlight_country'];
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
$sl = WC_HTML::styleSelected();
foreach ($tVars['data'] as $row) {
    $cid = $row['country_id'];
    $topuser = $row['topuser'];
    $style = $hlc == $cid ? $sl : '';
    $href = GWF_WEB_ROOT . 'country_ranking/for/' . $cid . '/' . Common::urlencodeSEO($row['countryname']);
    echo GWF_Table::rowStart(true, '', '', $style);
    echo sprintf('<td class="gwf_num">%d</td>', $rank++);
    echo sprintf('<td>%s</td>', GWF_Country::displayFlagS2($cid, $row['countryname']));
    echo sprintf('<td><a href="%s">%s</a></td>', $href, GWF_HTML::display($row['countryname']));
    echo sprintf('<td class="gwf_num">%d</td>', $row['users']);
    echo sprintf('<td class="gwf_num">%d</td>', $row['totalscore']);
    echo sprintf('<td class="gwf_num">%s</td>', $row['spc']);
    echo sprintf('<td class="gwf_num">%d</td>', $row['avg']);
    echo sprintf('<td class="gwf_num">%d</td>', $row['top3']);
    echo sprintf('<td><a href="%s" title="%s">%s</a></td>', GWF_WEB_ROOT . 'profile/' . urlencode($topuser), $tLang->lang('a_title', array($row['topscore'])), GWF_HTML::display($topuser));
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo GWF_Box::box($tLang->lang('scorefaq_box', GWF_WEB_ROOT . 'scoring_faq'));
示例#2
0
echo $tVars['form_settings']->templateX($tVars['module']->lang('ft_settings'));
echo '</div>' . PHP_EOL;
echo '<div class="fl">';
echo $tVars['form_add']->templateX($tLang->lang('ft_add_whitelist'));
echo '</div>' . PHP_EOL;
echo '<div class="fl">';
echo $tVars['form_clear']->templateX($tLang->lang('ft_clear_pois'));
echo '</div>' . PHP_EOL;
echo '<div class="cb"></div>' . PHP_EOL;
echo $tVars['page_menu'];
echo '<form method="post" action="' . htmlspecialchars($tVars['form_action']) . '">' . PHP_EOL;
echo sprintf('<div>%s</div>', GWF_CSRF::hiddenForm('poi_whitelisting'));
echo GWF_Table::start('gwf_mass_toggle');
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
$table = $tVars['table'];
$result = $table->select('user_id, user_countryid, country_name, user_name, user_level, pw_date', $tVars['where'], "{$tVars['by']} {$tVars['dir']}", array('userb', 'country'), $tVars['ipp'], $tVars['from']);
while (false !== ($row = $table->fetch($result, GDO::ARRAY_N))) {
    echo GWF_Table::rowStart();
    echo GWF_Table::column('<input type="checkbox" name="user[' . $row[0] . ']" />');
    echo GWF_Table::column(GWF_Country::displayFlagS2($row[1], $row[2]));
    echo GWF_Table::column(sprintf('<a href="%2$sprofile/%1$s">%1$s</a>', htmlspecialchars($row[3]), GWF_WEB_ROOT));
    echo GWF_Table::column($row[4], 'gwf_num');
    echo GWF_Table::column(GWF_Time::displayDate($row[5]), 'gwf_date');
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo GWF_Button::wrapStart();
printf('<input type="submit" name="delete" value="%s" />', $tLang->lang('btn_rem_whitelist'));
echo GWF_Button::wrapEnd();
echo GWF_Form::end();
echo $tVars['page_menu'];