private function getButtons(GWF_PM $pm) { $transid = 'pm_trans_' . $pm->getID(); $u = GWF_Session::getUser(); $buttons = ''; if (false !== ($prevs = $pm->getReplyToPrev())) { foreach ($prevs as $prev) { $buttons .= GWF_Button::prev($prev->getDisplayHREF(), $this->module->lang('btn_prev')); } } if (!$pm->hasDeleted($u)) { $buttons .= GWF_Button::delete($pm->getDeleteHREF($u->getID()), $this->module->lang('btn_delete')); } else { $buttons .= GWF_Button::restore($pm->getRestoreHREF(), $this->module->lang('btn_restore')); } if ($pm->canEdit($u)) { $buttons .= GWF_Button::edit($pm->getEditHREF(), $this->module->lang('btn_edit')); } $buttons .= GWF_Button::options($pm->getAutoFolderHREF(), $this->module->lang('btn_autofolder')); if (!$pm->isGuestPM()) { $buttons .= GWF_Button::reply($pm->getReplyHREF(), $this->module->lang('btn_reply')) . PHP_EOL . GWF_Button::quote($pm->getQuoteHREF(), $this->module->lang('btn_quote')); } $u2 = $pm->getOtherUser($u); $buttons .= GWF_Button::ignore($pm->getIgnoreHREF($pm->getOtherUser($u)), $this->module->lang('btn_ignore', array($u2->display('user_name')))); $buttons .= GWF_Button::translate($pm->getTranslateHREF(), $this->module->lang('btn_translate'), '', 'gwfGoogleTrans(\'' . $transid . '\'); return false;'); if (false !== ($nexts = $pm->getReplyToNext())) { foreach ($nexts as $next) { $buttons .= GWF_Button::next($next->getDisplayHREF(), $this->module->lang('btn_next')); } } return $buttons; }
private function leftPanelTop10() { $hideBTN = GWF_Button::delete($this->getMethodHref('&leftpanel=0'), $this->module->lang('btn_sidebar_on')); $users = GDO::table('GWF_User')->selectObjects('*', 'user_options&0x10000000=0', 'user_level DESC', 10); if (count($users) === 0) { return $hideBTN; } $back = sprintf('<div>%s%s</div>', $hideBTN, $this->module->lang('rp_topusers', array(10))) . PHP_EOL; $back .= '<ol>' . PHP_EOL; foreach ($users as $user) { $back .= sprintf('<li><a href="%s" title="%s">%s</a></li>', $user->getProfileHREF(), $this->module->lang('a_title', array($user->getVar('user_level'))), $user->displayUsername()) . PHP_EOL; } $back .= '</ol>' . PHP_EOL; return $back; }
<?php $site = $tVars['site']; $site instanceof WC_Site; $is_ranked = $site->isScored(); $siteid = $site->getID(); $boxes = WC_Warbox::getBoxes($site); echo '<div class="gwf_buttons_outer"><div class="gwf_buttons">' . PHP_EOL; $onclick = "wcjsHideJQuery('#wc_profile_slide'); wcjs_last_site = undefined; return false;"; echo GWF_Button::delete('#', $tLang->lang('btn_close'), '', $onclick); echo GWF_Button::forward($site->getURL(), $site->getSitename()); echo '</div></div>' . PHP_EOL; echo '<div class="gwf_buttons_outer"><div class="gwf_buttons">' . PHP_EOL; echo WC_HTML::button('btn_site_details', $site->hrefDetail()); if (count($boxes) > 0) { echo WC_HTML::button('btn_warboxes', $site->hrefWarboxes()); } echo WC_HTML::button('btn_ranking', $site->hrefRanking(true)); echo WC_HTML::button('btn_site_history', $site->hrefHistory()); echo '</div></div>' . PHP_EOL; ?> <?php if (false === ($user = GWF_User::getByName(Common::getGet('username', '')))) { } if ($user !== false) { $userid = $user->getID(); if (false !== ($regat = WC_RegAt::getRegatRow($userid, $siteid))) { $max = $site->getOnsiteScore(); echo GWF_Box::box($tLang->lang('site_detail_uinfo', array($user->displayUsername(), $regat->getOnsiteScore(), $max, $site->displayName(), round($regat->getPercent($max), 2), WC_RegAt::calcExactSiteRank($user, $siteid), $site->calcScore($regat)))); }
$u = $tVars['user']; $u instanceof GWF_User; $p = $tVars['profile']; $p instanceof GWF_Profile; $user = GWF_User::getStaticOrGuest(); $by = Common::getGet('by', 'regat_solved'); $dir = Common::getGet('dir', 'DESC'); $orderby = GDO::table('WC_Regat')->getMultiOrderby($by, $dir); $is_admin = $user->isAdmin(); $data = $u->getUserData(); $priv = isset($data['WC_PRIV_HIST']) && !$is_admin; # Head $buttons = ''; if ($tVars['jquery']) { $onclick = "wcjsHideJQueryAll(); return false;"; $buttons .= GWF_Button::delete('#', WC_HTML::lang('btn_close'), '', $onclick); $buttons .= GWF_Button::link($u->getProfileHREF(), WC_HTML::lang('btn_view_profile')); } echo '<h1>' . $buttons . $tLang->lang('pt_profile', array($u->displayUsername())) . '</h1>'; # Permission if ($p->isHidden($user)) { echo '<h2>' . $tLang->lang('err_hidden') . '</h2>'; return; } # About Me if ('' !== ($v = $p->displayAboutMe())) { echo GWF_Box::box($v, $tLang->lang('title_about_me', array($u->displayUsername()))); } # Default Profile echo '<div class="fl">' . PHP_EOL; echo '<table>' . PHP_EOL;
<?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'];
?> </div> </div> <?php if ($a) { $buttons = ''; if (false !== ($prevs = $pm->getReplyToPrev())) { foreach ($prevs as $prev) { $buttons .= GWF_Button::prev($prev->getDisplayHREF(), $tLang->lang('btn_prev')); } } else { // $buttons .= GWF_Button::prev('#', $tLang->lang('btn_prev')); } if (!$pm->hasDeleted($u)) { $buttons .= GWF_Button::delete($pm->getDeleteHREF($u->getID()), $tLang->lang('btn_delete')); } else { $buttons .= GWF_Button::restore($pm->getRestoreHREF(), $tLang->lang('btn_restore')); } if ($pm->canEdit($u)) { $buttons .= GWF_Button::edit($pm->getEditHREF(), $tLang->lang('btn_edit')); } $buttons .= GWF_Button::options($pm->getAutoFolderHREF(), $tLang->lang('btn_autofolder')); if (!$pm->isGuestPM()) { $buttons .= GWF_Button::reply($pm->getReplyHREF(), $tLang->lang('btn_reply')) . PHP_EOL . GWF_Button::quote($pm->getQuoteHREF(), $tLang->lang('btn_quote')); } $u2 = $pm->getOtherUser($u); $buttons .= GWF_Button::ignore($pm->getIgnoreHREF($pm->getOtherUser($u)), $tLang->lang('btn_ignore', array($u2->display('user_name')))); $buttons .= GWF_Button::translate($pm->getTranslateHREF(), $tLang->lang('btn_translate'), '', 'gwfGoogleTrans(\'' . $transid . '\'); return false;'); if (false !== ($nexts = $pm->getReplyToNext())) { foreach ($nexts as $next) {
<?php echo WC_HTML::accountButtons(); echo GWF_Button::generic($tLang->lang('btn_auto_folder'), $tVars['href_auto_folder']); echo $tVars['form']; ?> <?php $headers = array(array($tLang->lang('th_user_name')), array($tLang->lang('th_actions'))); $data = array(); foreach ($tVars['ignores'] as $uname) { $del_href = GWF_WEB_ROOT . 'index.php?mo=PM&me=Options&unignore=' . urlencode($uname); $data[] = array(GWF_HTML::display($uname), GWF_Button::delete($del_href)); } $headers = GWF_Table::getHeaders2($headers, ''); echo GWF_Table::display2($headers, $data, ''); ?> <?php echo $tVars['form_ignore'];
private function getHideButton() { return '<span class="">' . GWF_Button::delete($this->getMethodHref('&rightpanel=0'), $this->module->lang('btn_sidebar_on')) . '</span>'; }