Beispiel #1
0
function wcProfileLastActivity(GWF_User $user, $ipp, $priv = false)
{
    $uid = $user->getID();
    $uh = GDO::table('WC_HistoryUser2');
    $entries = $uh->selectObjects('*', "userhist_uid={$uid}", 'userhist_date DESC', $ipp);
    //	$entries = array_reverse($entries);
    $back = '';
    $back .= '<table class="cl">';
    $href_txt_history = GWF_WEB_ROOT . 'history/for/' . $user->urlencode2('user_name');
    $anchor = GWF_HTML::anchor($href_txt_history, WC_HTML::lang('th_last_activites', array($user->displayUsername())));
    $back .= sprintf('<thead><tr><th colspan="2">%s</th></tr></thead>', $anchor);
    $unknown = GWF_HTML::lang('unknown');
    foreach ($entries as $entry) {
        $entry instanceof WC_HistoryUser2;
        $back .= GWF_Table::rowStart();
        $back .= sprintf('<td class="gwf_date">%s</td>', $priv ? $unknown : $entry->displayDate());
        $back .= sprintf('<td>%s</td>', $entry->displayComment());
        $back .= GWF_Table::rowEnd();
    }
    $back .= '</table>';
    return $back;
}
Beispiel #2
0
<?php

Module_WeChall::includeForums();
$chall = $tVars['chall'];
$chall instanceof WC_Challenge;
$headers = array(array($tLang->lang('th_length'), 'wmc_length'), array($tLang->lang('th_csolve_date'), 'wmc_date'), array($tLang->lang('th_user_name'), 'user_name'), array($tLang->lang('th_solution'), 'wmc_solution'));
$chall->showHeader(true);
echo GWF_Box::box($tVars['table_title']);
echo $tVars['page_menu'];
echo GWF_Table::start();
//echo GWF_Table::displayHeaders1($headers, $tVars['sort_url'], 'wmc_date', 'ASC', 'by', 'dir', $tVars['table_title']);
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
$guest = GWF_Guest::getGuest();
$userr = new GWF_User(false);
foreach ($tVars['data'] as $row) {
    if ($row['user_name'] === NULL) {
        $username = GWF_HTML::lang('guest');
    } else {
        $userr->setGDOData($row);
        $username = $userr->displayProfileLink();
    }
    echo GWF_Table::rowStart();
    echo GWF_Table::column($row['wmc_length'], 'gwf_num');
    echo GWF_Table::column(GWF_Time::displayDate($row['wmc_date']), 'gwf_date');
    echo GWF_Table::column($username);
    echo GWF_Table::column($row['wmc_solution']);
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo $tVars['page_menu'];
Beispiel #3
0
    $content = '';
    $content .= GWF_Table::start();
    foreach ($list1 as $plaintext) {
        $content .= GWF_Table::rowStart();
        $content .= sprintf('<td style="font-family:monospace;">%s</td>', hashgame_wc3($plaintext));
        $content .= GWF_Table::rowEnd();
    }
    $content .= GWF_Table::end();
    echo GWF_Box::box($content, $chall->lang('tt_list_wc3', array('index.php?algo=wc3&list=wc3')));
} elseif (Common::getGetString('list') === 'wc4') {
    $content = '';
    $content .= GWF_Table::start();
    foreach ($list2 as $plaintext) {
        $content .= GWF_Table::rowStart();
        $content .= sprintf('<td style="font-family:monospace;">%s</td>', hashgame_wc4($plaintext));
        $content .= GWF_Table::rowEnd();
    }
    $content .= GWF_Table::end();
    echo GWF_Box::box($content, $chall->lang('tt_list_wc4', array('index.php?algo=wc4&list=wc4')));
}
formSolutionbox($chall);
echo $chall->copyrightFooter();
require_once 'challenge/html_foot.php';
####################
### Check answer ###
####################
function sort_strlen($a, $b)
{
    return strlen($b) - strlen($a);
}
function hashgame_longest_two(array $list)
Beispiel #4
0
<?php

$box_c = '';
if (!isset($tVars['no_info'])) {
    $box_c .= sprintf('<p>%s</p>', $tLang->lang('payment_info'));
}
if (isset($tVars['paymodule_info']) && $tVars['paymodule_info'] !== '') {
    $box_c .= sprintf('<p>%s</p>', $tVars['paymodule_info']);
}
echo GWF_Box::box($box_c);
echo sprintf('<p>%s</p>', $tVars['order']);
?>
<table>
<?php 
echo sprintf('%s<td colspan="2">%s</td><td>%s</td>%s', GWF_Table::rowStart(), $tLang->lang('th_price'), $tVars['price'], GWF_Table::rowEnd());
if ($tVars['has_fee']) {
    echo sprintf('%s<td>%s</td><td>%s</td><td>%s</td>%s', GWF_Table::rowStart(), $tLang->lang('th_fee_per'), $tVars['fee_percent'], $tVars['fee'], GWF_Table::rowEnd());
    echo sprintf('%s<td colspan="2">%s</td><td>%s</td>%s', GWF_Table::rowStart(), $tLang->lang('th_price_total'), $tVars['price_total'], GWF_Table::rowEnd());
}
echo sprintf('<tr><td colspan="3">%s</td></tr>', $tVars['buttons']);
?>
</table>
Beispiel #5
0
 public static function tableRowForm($th, $td)
 {
     if ($td === '') {
         return '';
     }
     return GWF_Table::rowStart() . '<th>' . $th . '</th>' . PHP_EOL . '<td>' . $td . '</td>' . PHP_EOL . GWF_Table::rowEnd();
 }
Beispiel #6
0
function gwfProfileRow($head, $value)
{
    return GWF_Table::rowStart() . sprintf('<th>%s</th><td>%s</td>', $head, $value) . GWF_Table::rowEnd();
}
Beispiel #7
0
    echo WC_HTML::tableRowForm($tLang->lang('th_site_usercount'), $site->getUsercount());
    echo WC_HTML::tableRowForm($tLang->lang('th_site_challcount'), $site->getChallcount());
    echo WC_HTML::tableRowForm($tLang->lang('th_site_linkcount'), $site->getLinkCount());
    echo WC_HTML::tableRowForm($tLang->lang('th_site_avg'), $site->displayAvg());
} else {
    echo WC_HTML::tableRowForm($tLang->lang('btn_warboxes'), $warboxes);
}
# Diff Votes
$vdif = $site->getVotesDif();
echo GWF_Table::rowStart() . '<th>' . $tLang->lang('th_site_dif') . '</th>' . PHP_EOL . '<td><span id="gwf_vsba_' . $vdif->getID() . '">' . $vdif->displayPercent() . '</span></td>' . PHP_EOL . GWF_Table::rowEnd();
if ($tVars['can_vote']) {
    echo WC_HTML::tableRowForm($tLang->lang('th_site_vote_dif'), $site->getVotesDif()->displayButtons());
}
# Fun Votes
$vfun = $site->getVotesFun();
echo GWF_Table::rowStart() . '<th>' . $tLang->lang('th_site_fun') . '</th>' . PHP_EOL . '<td><span id="gwf_vsba_' . $vfun->getID() . '">' . $vfun->displayPercent() . '</span></td>' . PHP_EOL . GWF_Table::rowEnd();
if ($tVars['can_vote']) {
    echo WC_HTML::tableRowForm($tLang->lang('th_site_vote_fun'), $site->getVotesFun()->displayButtons());
}
echo WC_HTML::tableRowForm($tLang->lang('th_site_irc'), $site->displayIRC());
?>
</table>

<?php 
if ($tVars['jquery']) {
    return;
}
?>

<?php 
$count = count($tVars['latest_players']);
Beispiel #8
0
$boxes_out = '';
if (count($tVars['warboxes']) > 0) {
    $boxes_out .= GWF_Table::start();
    $old_id = '0';
    foreach ($tVars['warboxes'] as $box) {
        $box instanceof WC_Warbox;
        $site = $box->getSite();
        if ($old_id !== $site->getID()) {
            $old_id = $site->getID();
            $headers = array(array($site->displayLogo(16)), array($site->displayLink()), array('IP'), array('Login'), array('Password'), array('Levels'), array('Status'), array('Flags'));
            $boxes_out .= GWF_Table::displayHeaders1($headers);
        }
        $boxes_out .= GWF_Table::rowStart();
        $boxes_out .= GWF_Table::column($box->getID());
        $boxes_out .= GWF_Table::column($box->displayLink());
        $boxes_out .= GWF_Table::column($box->getVar('wb_ip'), 'gwf_num');
        $boxes_out .= GWF_Table::column($box->display('wb_user'));
        $boxes_out .= GWF_Table::column($box->display('wb_pass'));
        $boxes_out .= GWF_Table::column($box->displayLevels(), 'gwf_num');
        $boxes_out .= GWF_Table::column(WC_HTML::lang('wb_' . $box->getVar('wb_status')), 'gwf_num');
        if ($box->hasWarFlags()) {
            $boxes_out .= GWF_Table::column(GWF_Button::forward($box->hrefFlags()));
        } else {
            $boxes_out .= GWF_Table::column();
        }
        $boxes_out .= GWF_Table::rowEnd();
    }
    $boxes_out .= GWF_Table::end();
}
echo GWF_Box::box($boxes_out . $tLang->lang('info_warboxes', array($tVars['port'], $tVars['netcat_cmd'], GWF_WEB_ROOT . 'linked_sites', GWF_WEB_ROOT . 'index.php?mo=WeChall&amp;me=JoinUs&amp;section=warbox')), $tLang->lang('title_warboxes'));
echo GWF_Box::box($tLang->lang('info_warcredits', array($epoch)), $tLang->lang('title_warcredits'));