本文整理匯總了PHP中GWF_User::urlencode方法的典型用法代碼示例。如果您正苦於以下問題:PHP GWF_User::urlencode方法的具體用法?PHP GWF_User::urlencode怎麽用?PHP GWF_User::urlencode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GWF_User
的用法示例。
在下文中一共展示了GWF_User::urlencode方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: create
private function create()
{
if (false === ($this->rec = GWF_User::getByName(Common::getPost('username'))) && false === ($this->rec = GWF_User::getByName(Common::getPost('username_sel')))) {
return GWF_HTML::err('ERR_UNKNOWN_USER') . $this->module->requestMethodB('Overview');
}
GWF_Website::redirect(GWF_WEB_ROOT . 'pm/send/to/' . $this->rec->urlencode('user_name'));
die;
}
示例3: wcProfileGraph
function wcProfileGraph(GWF_User $user, $type)
{
if (false === ($tu = GWF_Session::getUser()) || ($tu->getLevel() === 0 || $tu->getID() === $user->getID())) {
$href = GWF_WEB_ROOT . 'graph/wc_' . $type . '.' . $user->urlencode('user_name') . '.png';
$alt = WC_HTML::lang('alt_graph_' . $type, array($user->displayUsername()));
return sprintf('<img src="%s" alt="%s" title="%s" />', $href, $alt, $alt);
} else {
$href = GWF_WEB_ROOT . 'graph/wc_' . $type . '.' . $user->urlencode('user_name') . '.vs.' . $tu->urlencode('user_name') . '.png';
$alt = WC_HTML::lang('alt_graph_' . $type . '_vs', array($user->displayUsername(), $tu->displayUsername()));
return sprintf('<img src="%s" alt="%s" title="%s" />', $href, $alt, $alt);
}
}