本文整理汇总了PHP中GWF_User::display方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_User::display方法的具体用法?PHP GWF_User::display怎么用?PHP GWF_User::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_User
的用法示例。
在下文中一共展示了GWF_User::display方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: templateChalls
public function templateChalls(GWF_User $user)
{
$whitelist = array('chall_score', 'chall_title', 'chall_creator_name', 'chall_solvecount', 'chall_date', 'chall_dif', 'chall_edu', 'chall_fun', 'csolve_date', 'csolve_time_taken');
require_once GWF_CORE_PATH . 'module/WeChall/WC_ChallSolved.php';
$challs = GDO::table('WC_Challenge');
$db = gdo_db();
$uid = $user->getVar('user_id');
$challs = GWF_TABLE_PREFIX . 'wc_chall';
$solved = GWF_TABLE_PREFIX . 'wc_chall_solved';
$by = GDO::getWhitelistedByS(Common::getGet('pcby'), $whitelist, self::DEFAULT_BY);
$dir = GDO::getWhitelistedDirS(Common::getGet('pcdir'), self::DEFAULT_DIR);
$orderby = "ORDER BY {$by} {$dir}";
$query = "SELECT c.*, s.* FROM {$challs} c LEFT JOIN {$solved} s ON c.chall_id=s.csolve_cid AND s.csolve_uid={$uid} {$orderby}";
$tVars = array('data' => $db->queryAll($query), 'sort_url' => GWF_WEB_ROOT . 'index.php?mo=Profile&me=Profile&username=' . $user->urlencode('user_name') . '&pcby=%BY%&pcdir=%DIR%#wc_profile_challenges', 'table_title' => $this->module->lang('tt_challs_for', array('', $user->display('user_name'))));
return $this->module->templatePHP('challs_profile.php', $tVars);
}
示例2: sendMail
private static function sendMail(Module_Account $module, GWF_User $user, array $data)
{
$token = GWF_AccountChange::createToken($user->getID(), 'demo', serialize($data));
$mail = new GWF_Mail();
$mail->setSender($module->cfgMailSender());
$mail->setReceiver($user->getVar('user_email'));
$mail->setSubject($module->lang('chdemo_subj'));
$username = $user->display('user_name');
$timeout = GWF_Time::humanDuration($module->cfgChangeTime());
$gender = GWF_HTML::display($user->getVar('user_gender'));
$country = GWF_Country::getByIDOrUnknown($data['user_countryid'])->display('country_name');
$lang1 = GWF_Language::getByIDOrUnknown($data['user_langid'])->display('lang_nativename');
$lang2 = GWF_Language::getByIDOrUnknown($data['user_langid2'])->display('lang_nativename');
$gender = GWF_HTML::lang('gender_' . $data['user_gender']);
$birthdate = $data['user_birthdate'] > 0 ? GWF_Time::displayDate($data['user_birthdate'], true, 1) : GWF_HTML::lang('unknown');
$link = self::getChangeLink($user->getID(), $token);
$mail->setBody($module->lang('chdemo_body', array($username, $timeout, $gender, $country, $lang1, $lang2, $birthdate, $link)));
return $mail->sendToUser($user) ? $module->message('msg_mail_sent') : GWF_HTML::err('ERR_MAIL_SENT');
}
示例3: getSEOTitle
private function getSEOTitle()
{
if ($this->pm === false) {
return $this->module->lang('ft_create', array($this->rec->display('user_name')));
} else {
return $this->module->lang('ft_reply', array($this->rec->display('user_name')));
}
}
示例4: validate_ignore
public function validate_ignore(GWF_User $recipient)
{
if (false === ($user = GWF_Session::getUser())) {
return false;
}
if (false !== ($message = GWF_PMIgnore::isIgnored($recipient->getID(), $user->getID()))) {
return $this->lang('err_ignored', array($recipient->display('user_name'), htmlspecialchars($message)));
}
return false;
}
示例5: getIgnoreHREF
public function getIgnoreHREF(GWF_User $user)
{
return GWF_WEB_ROOT . sprintf('pm/do/ignore/%d/%s', $user->getID(), $user->display('user_name'));
}