當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GWF_User::display方法代碼示例

本文整理匯總了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);
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:16,代碼來源:ChallsProfile.php

示例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');
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:19,代碼來源:ChangeDemo.php

示例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')));
     }
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:8,代碼來源:Send.php

示例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;
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:10,代碼來源:Module_PM.php

示例5: getIgnoreHREF

 public function getIgnoreHREF(GWF_User $user)
 {
     return GWF_WEB_ROOT . sprintf('pm/do/ignore/%d/%s', $user->getID(), $user->display('user_name'));
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:4,代碼來源:GWF_PM.php


注:本文中的GWF_User::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。