function smarty_function_gwftable($params, $template) { $a = isset($params['action']) ? $params['action'] : ''; switch ($a) { case 'start': $cl = isset($params['class']) ? " class=\"{$params['class']}\"" : ''; $id = isset($params['id']) ? " id=\"{$params['id']}\"" : ''; return sprintf('<div class="gwf_table"><table%s%s>' . PHP_EOL, $cl, $id); case 'end': return '</table></div>' . PHP_EOL; case 'rowStart': $cl = isset($params['class']) ? $params['class'] : ''; $id = isset($params['id']) ? $params['id'] : ''; $style = isset($params['style']) ? $params['style'] : ''; return GWF_Table::rowStart(isset($params['flip']), $cl, $id, $style); case 'rowEnd': return '</tr>' . PHP_EOL; case 'column': $text = isset($params['text']) ? $params['text'] : ''; $cl = isset($params['class']) ? $params['class'] : ''; $colspan = isset($params['colspan']) ? (int) $params['colspan'] : 1; return GWF_Table::column($text, $cl, $colspan); case 'displayHeaders1': case 'displayHeaders2': $headers = isset($params['headers']) ? (array) $params['headers'] : array(); $sortURL = isset($params['sortURL']) ? $params['sortURL'] : NULL; $default = isset($params['default']) ? $params['default'] : ''; $defdir = isset($params['defdir']) ? $params['defdir'] : 'ASC'; $by = isset($params['by']) ? $params['by'] : 'by'; $dir = isset($params['dir']) ? $params['dir'] : 'dir'; $raw = isset($params['raw']) ? $params['raw'] : ''; if ($a === 'displayHeaders1') { return GWF_Table::displayHeaders1($headers, $sortURL, $default, $defdir, $by, $dir, $raw); } else { return GWF_Table::displayHeaders2($headers, $sortURL, $default, $defdir, $by, $dir, $raw); } default: return ''; } }
<div class="gwf_board_quicktree"><?php echo Module_Forum::getNavTree(); ?> </div> <?php $headers = array(array($tLang->lang('th_title'), 'thread_title'), array($tLang->lang('th_firstposter'), 'thread_firstposter'), array($tLang->lang('th_postcount'), 'thread_postcount'), array($tLang->lang('th_lastposter'), 'thread_lastposter'), array($tLang->lang('th_lastdate'), 'thread_lastdate'), array($tLang->lang('th_thread_thanks'), 'thread_thanks'), array($tLang->lang('th_thread_votes_up'), 'thread_votes_up'), array($tLang->lang('th_thread_viewcount'), 'thread_viewcount')); echo $tVars['pagemenu']; echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['threads'] as $t) { $t instanceof GWF_ForumThread; echo GWF_Table::rowStart(); echo GWF_Table::column(sprintf('<a href="%s">%s<br/>%s</a>', $t->getPageHREF(1), $t->displayBoardTitle(), $t->display('thread_title'))); echo GWF_Table::column($t->getFirstPosterLink()); echo GWF_Table::column($t->getPostCount(), 'gwf_num'); echo GWF_Table::column($t->getLastPosterLink()); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $t->getLastPageHREF(), $t->displayLastDate()), 'gwf_date'); echo GWF_Table::column($t->getVar('thread_thanks'), 'gwf_num'); echo GWF_Table::column($t->getVar('thread_votes_up'), 'gwf_num'); echo GWF_Table::column($t->getVar('thread_viewcount'), 'gwf_num'); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu'];
echo $tVars['pagemenu']; $headers = array(array($tLang->lang('th_pm_options&1'), 'options&1', 'DESC'), array($tLang->lang('th_pm_date'), 'pm_date', 'DESC'), array($tLang->lang('th_pm_from'), 'T_B.user_name', 'ASC'), array($tLang->lang('th_pm_to'), 'T_A.user_name', 'ASC'), array($tLang->lang('th_pm_title'), 'pm_title', 'ASC'), array()); $data = array(); $uid = GWF_Session::getUserID(); echo sprintf('<form id="gwf_pm_form" method="post" action="%s">', htmlspecialchars($tVars['form_action'])); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['pms'] as $pm) { $pm instanceof GWF_PM; echo GWF_Table::rowStart(); echo GWF_Table::column('<span class="' . $pm->getHTMLClass() . '" ></span>'); echo GWF_Table::column(GWF_Time::displayDate($pm->getVar('pm_date'))); echo GWF_Table::column($pm->getSender()->display('user_name')); echo GWF_Table::column($pm->getReceiver()->display('user_name')); echo GWF_Table::column(GWF_HTML::anchor($pm->getDisplayHREF(), $pm->getVar('pm_title'))); echo GWF_Table::column(sprintf('<input type="checkbox" name="pm[%s]" />', $pm->getID())); // $is_read = $pm->isOptionEnabled(GWF_PM::READ); // $is_sender = $pm->getSender()->getID() === $uid; // $is_deleted = $pm->getReceiver()-> // $class = $is_sender ? ($is_read ? 'gwf_pm_read' : 'gwf_pm_unread') : ($is_read ? 'gwf_pm_new' : 'gwf_pm_old'); // $data[] = array( // sprintf('<span class="%s" />', $pm->getHTMLClass()), // sprintf('%s', GWF_Time::displayDate($pm->getVar('pm_date'))), // sprintf('%s', $pm->getSender()->display('user_name')), // sprintf('%s', $pm->getReceiver()->display('user_name')), // sprintf('%s', GWF_HTML::anchor($pm->getDisplayHREF(), $pm->getVar('pm_title'))), // sprintf('<input type="checkbox" name="pm[%s]" />', $pm->getID()), // ); } echo GWF_Table::end(); echo sprintf('</form>');
<?php echo $tVars['pagemenu']; ?> <div><?php echo $tVars['prevpage']; ?> | <?php echo $tVars['nextpage']; ?> </div> <?php echo GWF_Table::start(); foreach ($tVars['history'] as $msg) { echo GWF_Table::rowStart(); echo GWF_Table::column($msg->displayFrom()); echo GWF_Table::column($msg->displayTo()); echo GWF_Table::column($msg->displayMessage()); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); ?> <div><?php echo $tVars['prevpage']; ?> | <?php echo $tVars['nextpage']; ?> </div>
<?php $headers = array(array('Rank'), array(''), array('Points'), array('Username'), array('Solved'), array('Last Activity')); $box = $tVars['box']; $box instanceof WC_Warbox; $site = $box->getSite(); echo $tVars['site_quickjump']; echo $tVars['pagemenu']; $vars = array($tVars['playercount'], $box->displayName(), $site->displayName()); echo GWF_Box::box($tLang->lang('info_warbox_players', $vars), $tLang->lang('title_warbox_players', $vars)); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers); $rank = $tVars['rank']; foreach ($tVars['data'] as $row) { echo GWF_Table::rowStart(); echo GWF_Table::column($rank++, 'gwf_num'); echo GWF_Table::column(GWF_Country::displayFlagS($row['country'])); echo GWF_Table::column($row['score'], 'gwf_num'); echo GWF_Table::column(GWF_User::displayProfileLinkS($row['user_name'])); echo GWF_Table::column(sprintf('%s (%.02f%%)', $row['solved'], $row['percent']), 'gwf_num'); echo GWF_Table::column(GWF_Time::displayDate($row['solvedate']), 'gwf_date'); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu'];
<?php echo $tVars['form_link']; echo $tVars['form_create']; $headers = array(array($tLang->lang('th_player_id')), array($tLang->lang('th_player_name')), array($tLang->lang('th_level'))); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['chars'] as $char) { $char = $char->getVar('ll_pid'); $char instanceof SR_Player; $user = Lamb_User::getByID($char->getVar('sr4pl_uid')); $char->setVar('sr4pl_uid', $user); echo GWF_Table::rowStart(); echo GWF_Table::column($user->getVar('lusr_sid')); echo GWF_Table::column($char->getName()); echo GWF_Table::column($char->getBase('level')); echo GWF_Table::rowEnd(); } echo GWF_Table::end();
<?php echo $tVars['site_quickjump']; $headers = array(array($tLang->lang('th_userhist_date')), array($tLang->lang('th_user_name')), array($tLang->lang('th_userhist_comment'))); echo $tVars['pagemenu']; $result = $tVars['result']; $hist = new WC_HistoryUser2(false); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, ''); while (false !== ($row = $hist->fetch($result, GDO::ARRAY_O))) { echo GWF_Table::rowStart(); echo GWF_Table::column($row->displayDate()); echo GWF_Table::column($row->displayUser()); echo GWF_Table::column($row->displayComment()); echo GWF_Table::rowEnd(); } $hist->free($result); echo GWF_Table::end(); echo $tVars['pagemenu'];
$lastdate = $t->displayLastDate(); $b2 = $t->getBoard(); $anchor_board = GWF_HTML::anchor($b2->getShowBoardHREF(), $b2->getVar('board_title')); $anchor_thread = GWF_HTML::anchor($t->getPageHREF(1), $t->getVar('thread_title')); echo GWF_Table::rowStart(); echo GWF_Table::column($anchor_board . '<br/>' . $anchor_thread); // GWF_HTML::anchor($t->getPageHREF(1), $t->displayBoardTitle().'<br/>'.$t->display('thread_title'), '', '', false)); echo GWF_Table::column($edit . $unread); echo GWF_Table::column($t->getFirstPosterLink()); echo GWF_Table::column($t->getVar('thread_postcount'), 'gwf_num'); echo GWF_Table::column($t->getLastPosterLink()); $btn_next = GWF_Button::next($hrefLastPage, $lastposttxt); echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $lastdate, '', '', false) . $btn_next, 'gwf_date'); echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $t->getVar('thread_thanks')), 'gwf_num'); echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $t->getVar('thread_votes_up')), 'gwf_num'); echo GWF_Table::column(GWF_HTML::anchor($hrefLastPage, $t->getVar('thread_viewcount')), 'gwf_num'); echo GWF_Table::rowEnd(); } echo GWF_table::end(); } ?> <!-- End Of Latest Threads --> <!-- Boards --> <?php echo $tVars['pagemenu_boards']; ?> <?php $childs = $tVars['boards']; if (count($childs) > 0) {
<h2><?php echo $tLang->lang('pi_unread'); ?> </h2> <h3><?php echo GWF_Button::generic($tLang->lang('btn_mark_read'), GWF_WEB_ROOT . 'index.php?mo=Forum&me=MarkRead'); ?> </h3> <?php echo $tVars['pagemenu']; $headers = array(array($tLang->lang('th_title'), 'thread_title', 'ASC'), array($tLang->lang('th_firstposter'), 'thread_firstposter', 'ASC'), array($tLang->lang('th_postcount'), 'thread_postcount', 'ASC'), array($tLang->lang('th_lastposter'), 'thread_lastposter', 'ASC'), array($tLang->lang('th_lastdate'), 'thread_lastdate', 'ASC'), array($tLang->lang('th_thread_thanks'), 'thread_thanks', 'DESC'), array($tLang->lang('th_thread_votes_up'), 'thread_votes_up', 'DESC')); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['threads'] as $t) { $t instanceof GWF_ForumThread; $b = $t->getBoard(); echo GWF_Table::rowStart(); $boardlink = GWF_HTML::anchor($b->getShowBoardHREF(), $b->getVar('board_title')); $threadlink = GWF_HTML::anchor($t->getPageHREF(1), $t->getVar('thread_title')); echo GWF_Table::column("{$boardlink}<br/>{$threadlink}"); echo GWF_Table::column($t->getFirstPosterLink()); echo GWF_Table::column($t->getPostCount(), 'gwf_num'); echo GWF_Table::column($t->getLastPosterLink()); echo GWF_Table::column(GWF_HTML::anchor($t->getLastPageHREF(), $t->displayLastDate())); echo GWF_Table::column($t->getVar('thread_thanks'), 'gwf_num'); echo GWF_Table::column($t->getVar('thread_votes_up'), 'gwf_num'); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu'];
<?php echo $tVars['search_form']; $headers = array(array($tLang->lang('th_userid'), 'user_id', 'ASC'), array($tLang->lang('th_user_credits'), 'user_credits', 'ASC'), array($tLang->lang('th_user_level'), 'user_level', 'ASC'), array($tLang->lang('th_country'), 'user_countryid', 'ASC'), array($tLang->lang('th_user_name'), 'user_name', 'ASC'), array($tLang->lang('th_regdate'), 'user_regdate', 'ASC'), array($tLang->lang('th_email'), 'user_email', 'ASC'), array($tLang->lang('th_birthdate'), 'user_birthdate', 'ASC'), array($tLang->lang('th_regip'), 'user_regip', 'ASC'), array($tLang->lang('th_lastactivity'), 'user_lastactivity', 'DESC')); echo $tVars['pagemenu']; echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers); foreach ($tVars['users'] as $user) { echo GWF_Table::rowStart(); $user instanceof GWF_User; $href = Module_Admin::getUserEditURL($user->getID()); echo GWF_Table::column(GWF_HTML::anchor($href, $user->getID()), 'gwf_num'); echo GWF_Table::column(GWF_HTML::anchor($href, round($user->getVar('user_credits')), 2), 'gwf_num'); echo GWF_Table::column(GWF_HTML::anchor($href, $user->getLevel()), 'gwf_num'); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, $user->displayCountryFlag())); echo GWF_Table::column(GWF_HTML::anchor($href, $user->display('user_name'))); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayDate($user->getVar('user_regdate'))), 'gwf_date'); echo GWF_Table::column(GWF_HTML::anchor($href, $user->display('user_email'))); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayDate($user->getVar('user_birthdate'))), 'gwf_date'); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_IP6::displayIP($user->getVar('user_regip'), GWF_IP_EXACT))); echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayTimestamp($user->getVar('user_lastactivity'))), 'gwf_date'); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu'];
echo GWF_Table::rowStart(); $reply = GWF_Button::reply($pm->getReplyHREF(), $tLang->lang('btn_reply')); // $fromid = $pm->getFromID(); // $toid = $pm->getToID(); // $own = $fromid===$toid ? GWF_Session::getUser()->displayProfileLink() : ''; $href = $pm->getDisplayHREF(); $html_class = $pm->getHTMLClass(); $icon = sprintf('<a href="%s" class="gwf_pm_icon %s" title="%s" ></a>', $href, $html_class, $tLang->lang($html_class)); echo GWF_Table::column(); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, GWF_Time::displayDate($pm->getVar('pm_date'))), 'gwf_date'); echo GWF_Table::column($pm->isRecipient() ? $reply . sprintf('%s', $pm->getSender()->displayProfileLink()) : ''); echo GWF_Table::column($pm->isSender() ? $reply . sprintf('%s', $pm->getReceiver()->displayProfileLink()) : ''); echo GWF_Table::column("{$icon} " . GWF_HTML::anchor($href, $pm->getVar('pm_title'))); echo GWF_Table::column(sprintf('<input type="checkbox" name="pm[%s]" />', $pm->getID()), 'ce'); echo GWF_Table::rowEnd(); } echo GWF_Table::rowStart(); echo GWF_Table::column('', '', 5); echo GWF_Table::column(sprintf('<input type="checkbox" name="toggle" onclick="gwfPMToggleAll(this.checked);" />'), 'ce'); echo GWF_Table::rowEnd(); $btns = '<input type="submit" name="delete" value="Delete" />' . $tVars['folder_select'] . '<input type="submit" name="move" value="Move" />'; $raw_body = '<tr><td colspan="5">' . $btns . '</td></tr>'; echo $raw_body; echo GWF_Table::end(); echo sprintf('</form>'); echo $tVars['pagemenu']; } ?> </div> <div class="cb"></div>
<?php $headers = array(array($tLang->lang('th_module_name')), array($tLang->lang('th_version_installed')), array($tLang->lang('th_version_on_disk')), array($tLang->lang('th_version_on_server'))); $headers = GWF_Table::getHeaders2($headers); echo GWF_Table::start(); echo GWF_Table::displayHeaders($headers); foreach ($tVars['data'] as $data) { echo GWF_Table::rowStart(); echo GWF_Table::column($data[0]); echo GWF_Table::column($data[1]); echo GWF_Table::column($data[2]); echo GWF_Table::column($data[3]); echo GWF_Table::rowEnd(); } echo GWF_Table::end();
echo GWF_Table::column($row['user_level'], 'gwf_num'); } if (isset($_GET['hasmail']) || isset($_GET['email'])) { echo GWF_Table::column($user->displayEMail()); } if (isset($_GET['haswww'])) { $a = htmlspecialchars($row['prof_website']); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $a, $a)); } if (isset($_GET['icq'])) { echo GWF_Table::column(htmlspecialchars($row['prof_icq']), 'gwf_num'); } if (isset($_GET['msn'])) { echo GWF_Table::column(htmlspecialchars($row['prof_msn']), 'gwf_num'); } if (isset($_GET['jabber'])) { echo GWF_Table::column(htmlspecialchars($row['prof_jabber']), 'gwf_num'); } if (isset($_GET['skype'])) { echo GWF_Table::column(htmlspecialchars($row['prof_skype']), 'gwf_num'); } if (isset($_GET['yahoo'])) { echo GWF_Table::column(htmlspecialchars($row['prof_yahoo']), 'gwf_num'); } if (isset($_GET['aim'])) { echo GWF_Table::column(htmlspecialchars($row['prof_aim']), 'gwf_num'); } echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu'];
$btn_update = sprintf('<input type="submit" name="update[%s]" value="%s" />', $siteid, $tLang->lang('btn_update')); echo GWF_Table::rowStart(); echo GWF_Table::column($site->displayStatus()); echo GWF_Table::column($site->displayIcon(1.0) . ' ' . $site->displayLink()); echo GWF_Table::column($regat->getVar('regat_challsolved'), 'gwf_num'); echo GWF_Table::column($site->getVar('site_challcount'), 'gwf_num'); echo GWF_Table::column($site->displayAutoUpdate()); echo GWF_Table::column($btn_update); echo GWF_Table::column($regat->getVar('regat_score'), 'gwf_num'); $perc = $regat->getPercent($site->getOnsiteScore()); $color = WC_HTML::getColorForPercent($perc); echo GWF_Table::column(sprintf('<span style="color: #%s">%.02f%%</span>', $color, $perc), 'gwf_num'); echo GWF_Table::column($regat->displayLastDate(), 'gwf_date'); echo GWF_Table::column($regat->displayOnsiteName()); if ($regat->isOnsitenameHidden()) { echo GWF_Table::column(sprintf('<input type="submit" name="showname[%s]" value="%s" />', $siteid, $txtshow)); } else { echo GWF_Table::column(sprintf('<input type="submit" name="hidename[%s]" value="%s" />', $siteid, $txthide)); } // if ($regat->isScored()) { // echo GWF_Table::column(sprintf('<input type="submit" name="scored[%s]" value="%s" />', $siteid, $txtscore)); // } else { // echo GWF_Table::column(sprintf('<input type="submit" name="unscored[%s]" value="%s" />', $siteid, $txtunscore)); // } echo sprintf('<td><input type="submit" name="unlink[%s]" value="%s" /></td>', $siteid, $tLang->lang('btn_unlink')); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo '</form>' . PHP_EOL; } echo $tVars['form_update_all'];
<?php echo $tVars['form']; $cat = $tVars['cat']; $cat instanceof GWF_Category; $trans = $cat->getTranslations(); $headers = array(array($tLang->lang('th_language')), array($tLang->lang('th_translation'))); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers); foreach ($trans as $langid => $data) { $text = $data['cl_translation']; echo GWF_Table::rowStart(); echo GWF_Table::column(GWF_Language::getByID($langid)->display('lang_name')); echo GWF_Table::column(htmlspecialchars($text, ENT_QUOTES)); echo GWF_Table::rowEnd(); } echo GWF_Table::end();
<?php GWF_Javascript::focusElementByName('term'); echo $tVars['form_quick']; #echo $tVars['form_adv']; if (count($tVars['result']) > 0) { echo $tVars['pagemenu']; $headers = array(array($tLang->lang('th_post_date'), 'post_date', 'DESC'), array($tLang->lang('th_user_name'), 'user_name', 'ASC'), array($tLang->lang('th_title')), array($tLang->lang('th_thanks'), 'post_thanks', 'DESC'), array($tLang->lang('th_votes_up'), 'post_votes_up', 'DESC')); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['result'] as $post) { echo GWF_Table::rowStart(); $post instanceof GWF_ForumPost; $hrefPost = $post->getShowHREF($tVars['term']); $hrefProfile = $post->getUser()->getProfileHREF(); echo GWF_Table::column(GWF_HTML::anchor($hrefPost, $post->displayPostDate())); echo GWF_Table::column(GWF_HTML::anchor($hrefProfile, $post->getUser()->displayUsername())); echo GWF_Table::column(GWF_HTML::anchor($hrefPost, $post->getVar('post_title'))); echo GWF_Table::column($post->getVar('post_thanks'), 'gwf_num'); echo GWF_Table::column($post->getVar('post_votes_up'), 'gwf_num'); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu']; }
<?php echo '<div class="gwf_buttons_outer">' . PHP_EOL; echo '<div class="gwf_buttons">' . PHP_EOL; echo GWF_Button::generic('ConvertDB', $tVars['href_convert']); echo GWF_Button::generic('Fix Chall Tags', $tVars['href_chall_cache']); echo GWF_Button::generic('Fix Site Tags', $tVars['href_sitetags']); echo GWF_Button::generic('Recalc Everything', $tVars['href_recalc_all']); echo GWF_Button::generic('Freeze User', $tVars['href_freeze']); echo '</div>' . PHP_EOL; echo '</div>' . PHP_EOL; $headers = array(array($tLang->lang('th_user_name'), 'user_name'), array($tLang->lang('th_site_name'), 'site_name'), array()); echo $tVars['page_menu']; echo GWF_Form::start($tVars['form_action']); echo GWF_Table::start(); echo GWF_Table::displayHeaders2($headers, $tVars['sort_url']); $unfreeze = $tLang->lang('btn_unfreeze'); foreach ($tVars['frozen'] as $row) { $row instanceof WC_Freeze; $user = $row->getUser(); $site = $row->getSite(); echo GWF_Table::rowStart(); echo GWF_Table::column($user->displayUsername()); echo GWF_Table::column($site->displayName()); echo GWF_Table::column(sprintf('<input type="submit" name="unfreeze[%s,%s]" value="%s" />', $user->getVar('user_id'), $site->getVar('site_id'), $unfreeze)); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo GWF_Form::end(); echo $tVars['page_menu']; echo $tVars['form'];
<?php echo WC_HTML::accountButtons(); $headers = array(array($tLang->lang('th_date')), array($tLang->lang('th_ua')), array($tLang->lang('th_ip')), array($tLang->lang('th_isp'))); echo $tVars['page_menu']; echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); while ($access = $tVars['table']->fetch($tVars['result'], GDO::ARRAY_O)) { $access instanceof GWF_AccountAccess; echo GWF_Table::rowStart(); echo GWF_Table::column($access->displayDate(), 'gwf_date'); echo GWF_Table::column($access->displayUAHex(), 'gwf_num'); echo GWF_Table::column($access->displayIP(), 'gwf_num'); echo GWF_Table::column($access->displayISPHex(), 'gwf_num'); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['page_menu'];
<?php echo $tVars['pagemenu']; $headers = array(array($tLang->lang('th_ssyf_id'), 'ssyf_id', 'DESC'), array($tLang->lang('th_ssyf_date'), 'ssyf_date', 'ASC'), array($tLang->lang('th_ssyf_status'), 'ssyf_status', 'ASC'), array($tLang->lang('th_ssyf_studio'), 'ssyf_studio', 'ASC'), array($tLang->lang('th_ssyf_ricavi'), 'ssyf_ricavi', 'ASC'), array($tLang->lang('th_ssyf_subricavi'), 'ssyf_subricavi', 'ASC')); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); $data = array(); foreach ($tVars['forms'] as $form) { $form instanceof SSY_Form; $fid = $form->getID(); $hrefExport = $tVars['module']->getMethodURL('Staff', '&export=' . $fid); echo GWF_Table::rowStart(); echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $fid)); echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->displayDate())); echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->displayStatus($tVars['module']))); echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->display('ssyf_studio'))); echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->display('ssyf_ricavi'))); echo GWF_Table::column(GWF_HTML::anchor($hrefExport, $form->display('ssyf_subricavi'))); echo GWF_Table::rowEnd(); } echo GWF_Table::end();
$href = $board->getShowBoardHREF(); $forum = GWF_HTML::anchor($href, $group->getVar('group_name')); } else { $forum = $group->display('group_name'); } $members = GWF_HTML::anchor(GWF_WEB_ROOT . 'users_in_group/' . $group->getID() . '/' . $group->urlencodeSEO('group_name'), $group->getVar('group_memberc')); echo GWF_Table::rowStart(); echo GWF_Table::column($edit . $forum, 'nowrap'); echo GWF_Table::column($members, 'gwf_num'); echo GWF_Table::column($founder->displayProfileLink()); if ($user->isGuest()) { echo '<td></td>' . PHP_EOL; } elseif ($in_grp) { echo GWF_Table::column(sprintf('<input type="submit" name="part[%s]" value="%s" />', $group->getVar('group_id'), $btn_part)); } elseif ($group->isOptionEnabled(GWF_Group::FREE)) { echo GWF_Table::column(sprintf('<input type="submit" name="join[%s]" value="%s" />', $group->getVar('group_id'), $btn_join)); } else { echo '<td></td>' . PHP_EOL; } echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo '</form>' . PHP_EOL; echo $tVars['page_menu']; echo '<div class="gwf_buttons_outer">' . PHP_EOL; echo '<div class="gwf_buttons">' . PHP_EOL; if ($tVars['module']->canCreateGroup($user)) { echo GWF_Button::generic($tLang->lang('btn_add_group'), $tVars['href_add_group']); } echo '</div>' . PHP_EOL; echo '</div>' . PHP_EOL;
<?php $headers = array(array('WCID'), array('TITLE'), array('CAT'), array('SOL'), array('BTN')); echo GWF_Form::start(); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers); foreach ($tVars['flags'] as $flag) { $flag instanceof WC_Warflag; $solved = $flag->getVar('wf_solved_at') !== NULL; echo GWF_Table::rowStart(); echo GWF_Table::column($flag->getID()); $class = 'wc_chall_solved_' . ($solved ? '1' : '0'); echo GWF_Table::column(GWF_HTML::anchor($flag->getURL(), $flag->getTitle()), $class); echo GWF_Table::column($flag->displayCat()); if ($flag->isWarchall()) { echo GWF_Table::column(''); echo GWF_Table::column(''); } elseif ($solved) { echo GWF_Table::column('SOLVED!'); echo GWF_Table::column(''); } else { echo GWF_Table::column(sprintf('<input type="text" name="password[%s]" value="">', $flag->getID())); echo GWF_Table::column(sprintf('<input type="submit" name="button[%s]" value="CHECK">', $flag->getID())); } echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo GWF_Form::end();
<?php echo WC_HTML::accountButtons(); echo GWF_Button::wrapStart(); echo GWF_Button::generic($tLang->lang('btn_auto_folder'), $tVars['href_auto_folder']); echo GWF_Button::wrapEnd(); echo $tVars['form']; if (count($tVars['ignores']) > 0) { $headers = array(array($tLang->lang('th_user_name')), array($tLang->lang('th_actions'))); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers); foreach ($tVars['ignores'] as $data) { echo GWF_Table::rowStart(); $uname = $data[0]; $reason = $data[1]; $del_href = GWF_WEB_ROOT . 'index.php?mo=PM&me=Options&unignore=' . urlencode($uname); echo GWF_Table::column(GWF_HTML::display($uname)); echo GWF_Table::column(GWF_Button::delete($del_href)); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); } echo $tVars['form_ignore'];
<?php #echo $tVars['form_wipe']; echo $tVars['pagemenu']; $headers = array(array($tLang->lang('th_ssyu_id'), 'ssyu_id', 'DESC'), array($tLang->lang('th_ssyu_fiscale'), 'ssyu_fiscale', 'ASC'), array($tLang->lang('th_ssyu_firstname'), 'ssyu_firstname', 'ASC'), array($tLang->lang('th_ssyu_lastname'), 'ssyu_lastname', 'ASC'), array($tLang->lang('th_ssyu_city'), 'ssyu_city', 'ASC'), array($tLang->lang('th_ssyu_businame'), 'ssyu_businame', 'ASC'), array($tLang->lang('th_ssyu_busicity'), 'ssyu_busicity', 'ASC')); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); $tVars['module'] instanceof GWF_Module; foreach ($tVars['users'] as $user) { $uid = $user->getID(); $hrefForms = $tVars['module']->getMethodURL('Staff', '&forms=' . $uid); echo GWF_Table::rowStart(); echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $uid)); echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_fiscale'))); echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_firstname'))); echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_lastname'))); echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_city'))); echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_businame'))); echo GWF_Table::column(GWF_HTML::anchor($hrefForms, $user->display('ssyu_busicity'))); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo $tVars['pagemenu'];
<?php $headers = array(array($tLang->lang('th_pmf_name'), 'pmf_name', 'ASC'), array($tLang->lang('th_pmf_count'), 'pmf_count', 'DESC'), array()); echo GWF_Form::start($tVars['folder_action']); echo GWF_CSRF::hiddenForm('PM_REM_FOLDER'); echo GWF_Table::start(); echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']); foreach ($tVars['folders'] as $row) { $foldername = $row->display('pmf_name'); $folderid = $row->getVar('pmf_id'); $href = $row->getOverviewHREF(); echo GWF_Table::rowStart(); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, $foldername), 'ri'); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, $row->getVar('pmf_count')), 'gwf_num'); echo GWF_Table::column(GWF_Form::checkbox("folder[{$folderid}]", false)); echo GWF_Table::rowEnd(); } echo GWF_Table::rowStart(); echo GWF_Table::column(GWF_Form::submit('delete_folder', $tLang->lang('btn_delete')), 'ri', 3); echo GWF_Table::rowEnd(); echo GWF_Table::end(); echo GWF_Form::end(); ?>
echo GWF_Table::column($flag->getVar('wf_order'), 'gwf_num'); echo GWF_Table::column($flag->getVar('wf_score'), 'gwf_num'); $class = $solved ? 'wc_chall_solved_1' : 'wc_chall_solved_0'; if ('' === ($url = $flag->getVar('wf_url'))) { echo GWF_Table::column($flag->display('wf_title'), $class); } else { echo GWF_Table::column(GWF_HTML::anchor($url, $flag->getVar('wf_title'), NULL, $class)); } echo GWF_Table::column(GWF_HTML::anchor($flag->hrefSolvers(), $flag->getVar('wf_solvers')), 'gwf_num'); echo GWF_Table::column($flag->displayLastSolvedBy()); echo GWF_Table::column($flag->displayLastSolvedDate(), 'gwf_date'); if ($logged_in) { if (!$flag->isWarflag()) { echo GWF_Table::column('--ssh--only--'); } elseif ($solved) { echo GWF_Table::column('Well Done'); } else { echo GWF_Table::column(solving_form($tVars, $flag)); } } // if ( ($user !== false) && () ) // { // echo GWF_Table::column(GWF_Button::bell($href_flags, 'Enter Flags')); // } // else // { // echo GWF_Table::column(); // } echo GWF_Table::rowEnd(); } echo GWF_Table::end();
$lang_hidden = $tLang->lang('th_hidden'); echo GWF_Table::start(); foreach ($tVars['news'] as $item) { $item instanceof GWF_News; $newsid = $item->getID(); $trans = $item->getTranslations(); $author = $item->displayAuthor(); $cat = $item->displayCategory(); $date = $item->displayDate(); foreach ($trans as $langid => $t) { if ($item->isHidden()) { $icon = GWF_Button::sub($lang_hidden, $item->hrefEnable()); } else { $icon = GWF_Button::add($lang_visible, $item->hrefDisable()); } echo GWF_Table::rowStart(); echo GWF_Table::column($date, 'gwf_date'); echo GWF_Table::column($author); echo GWF_Table::column($cat); echo GWF_Table::column(GWF_Language::getByID($langid)->display('lang_nativename')); $title = $t['newst_title']; $href = GWF_WEB_ROOT . sprintf('news/edit/%d-%s/langid-%d', $newsid, Common::urlencodeSEO($title), $langid); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, htmlspecialchars($title))); echo GWF_Table::column($icon); echo GWF_Table::rowEnd(); } } echo GWF_Table::end(); echo $tVars['page_menu']; $buttons = GWF_Button::add($tLang->lang('btn_add'), GWF_WEB_ROOT . 'news/add'); echo GWF_Button::wrap($buttons);
<?php $headers = array(array($tLang->lang('th_id'), 'cat_id', 'ASC'), array($tLang->lang('th_group'), 'cat_group', 'ASC'), array($tLang->lang('th_key'), 'cat_name', 'ASC'), array($tLang->lang('th_edit'))); echo GWF_Table::start(); echo GWF_Table::displayHeaders2($headers, $tVars['sort_url']); foreach ($tVars['cats'] as $id => $cat) { echo GWF_Table::rowStart(); echo GWF_Table::column($cat->getID()); echo GWF_Table::column($cat->getGroup()); echo GWF_Table::column($cat->getKey()); echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $cat->getEditHREF(), $tLang->lang('btn_edit'))); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); ?> <div><a href="<?php echo $tVars['url_new']; ?> "><?php echo $tLang->lang('btn_new'); ?> </a></div>
<?php echo GWF_Button::wrapStart(); echo GWF_Button::generic($tLang->lang('menu_sites'), $tVars['href_site']); echo GWF_Button::generic($tLang->lang('btn_edit_site_descr'), $tVars['href_descr']); echo GWF_Button::wrapEnd(); echo GWF_Table::start(); $headers = array(array('EDIT'), array('ID'), array('NAME'), array('HOST'), array('IP'), array('STATUS')); echo GWF_Table::displayHeaders1($headers); foreach ($tVars['boxes'] as $box) { $box instanceof WC_Warbox; echo GWF_Table::rowStart(); echo GWF_Table::column(GWF_Button::edit($box->hrefEdit())); echo GWF_Table::column($box->getID()); echo GWF_Table::column($box->display('wb_name')); echo GWF_Table::column($box->displayLink()); echo GWF_Table::column($box->getVar('wb_ip')); echo GWF_Table::column(WC_HTML::lang('wb_' . $box->getVar('wb_status'))); echo GWF_Table::rowEnd(); } echo GWF_Table::end(); echo GWF_Button::wrapStart(); echo GWF_Button::add('Add a new warbox', $tVars['href_add']); echo GWF_Button::wrapEnd();
<?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'];
$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&me=JoinUs&section=warbox')), $tLang->lang('title_warboxes')); echo GWF_Box::box($tLang->lang('info_warcredits', array($epoch)), $tLang->lang('title_warcredits'));