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


PHP GWF_User::urlencode2方法代碼示例

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

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


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