Beispiel #1
0
    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)
{
    usort($list, 'sort_strlen');
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
$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'));