本文整理汇总了PHP中GWF_User::urlencode2方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_User::urlencode2方法的具体用法?PHP GWF_User::urlencode2怎么用?PHP GWF_User::urlencode2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_User
的用法示例。
在下文中一共展示了GWF_User::urlencode2方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: templateHistory
private function templateHistory(GWF_User $user)
{
require_once GWF_CORE_PATH . 'module/WeChall/WC_SiteDescr.php';
require_once GWF_CORE_PATH . 'module/WeChall/WC_HistoryUser2.php';
$uid = $user->getID();
$ipp = 50;
$history = GDO::table('WC_HistoryUser2');
$nItems = $history->countRows("userhist_uid={$uid}");
$nPages = GWF_PageMenu::getPagecount($ipp, $nItems);
$page = Common::clamp(Common::getGet('page', 1), 1, $nPages);
$from = GWF_PageMenu::getFrom($page, $ipp);
$by = Common::getGet('by', '');
$dir = Common::getGet('dir', '');
$orderby = $history->getMultiOrderby($by, $dir);
$uuname = $user->urlencode2('user_name');
$duname = $user->displayUsername();
GWF_Website::setPageTitle($this->module->lang('pt_texthis', array($duname)));
GWF_Website::setMetaDescr($this->module->lang('md_texthis', array($duname)));
GWF_Website::setMetaTags($this->module->lang('mt_texthis', array($duname)));
$tVars = array('user' => $user, 'duname' => $duname, 'sites' => WC_Site::getSites('site_id'), 'data' => $history->selectObjects('*', "userhist_uid={$uid}", $orderby, $ipp, $from), 'sort_url' => GWF_WEB_ROOT . 'history/for/' . $uuname . '/by/%BY%/%DIR%/page-1', 'page_menu' => GWF_PageMenu::display($page, $nPages, GWF_WEB_ROOT . 'history/for/' . $uuname . '/by/' . urlencode($by) . '/' . urlencode($dir) . '/page-%PAGE%'));
return $this->module->templatePHP('text_history.php', $tVars);
}
示例2: wcProfileLastActivity
function wcProfileLastActivity(GWF_User $user, $ipp, $priv = false)
{
$uid = $user->getID();
$uh = GDO::table('WC_HistoryUser2');
$entries = $uh->selectObjects('*', "userhist_uid={$uid}", 'userhist_date DESC', $ipp);
// $entries = array_reverse($entries);
$back = '';
$back .= '<table class="cl">';
$href_txt_history = GWF_WEB_ROOT . 'history/for/' . $user->urlencode2('user_name');
$anchor = GWF_HTML::anchor($href_txt_history, WC_HTML::lang('th_last_activites', array($user->displayUsername())));
$back .= sprintf('<thead><tr><th colspan="2">%s</th></tr></thead>', $anchor);
$unknown = GWF_HTML::lang('unknown');
foreach ($entries as $entry) {
$entry instanceof WC_HistoryUser2;
$back .= GWF_Table::rowStart();
$back .= sprintf('<td class="gwf_date">%s</td>', $priv ? $unknown : $entry->displayDate());
$back .= sprintf('<td>%s</td>', $entry->displayComment());
$back .= GWF_Table::rowEnd();
}
$back .= '</table>';
return $back;
}