示例#1
0
function wcProfileFavCats($userid)
{
    require_once GWF_CORE_PATH . 'module/WeChall/WC_FavCats.php';
    $cats = WC_FavCats::getFavCats($userid);
    if (count($cats) === 0) {
        return '';
    }
    $back = gwfProfileRow('<hr/>') . sprintf('<tr><th colspan="2">%s</th></tr>', WC_HTML::lang('th_favcats'));
    foreach ($cats as $cat) {
        $back .= gwfProfileRow(htmlspecialchars($cat));
    }
    return $back;
}
示例#2
0
文件: profile.php 项目: sinfocol/gwf3
     echo gwfProfileRow($tLang->lang('th_msn'), $v);
 }
 if ('' !== ($v = $p->display('prof_jabber'))) {
     echo gwfProfileRow($tLang->lang('th_jabber'), $v);
 }
 if ('' !== ($v = $p->display('prof_skype'))) {
     echo gwfProfileRow($tLang->lang('th_skype'), $v);
 }
 if ('' !== ($v = $p->display('prof_yahoo'))) {
     echo gwfProfileRow($tLang->lang('th_yahoo'), $v);
 }
 if ('' !== ($v = $p->display('prof_aim'))) {
     echo gwfProfileRow($tLang->lang('th_aim'), $v);
 }
 if ('' !== ($v = $p->display('prof_irc'))) {
     echo gwfProfileRow($tLang->lang('th_irc'), $v);
 }
 $buttons = '';
 if ('' !== ($email = $u->getValidMail())) {
     $txt = $tLang->lang('at_mailto', array($u->displayUsername()));
     if ($u->isOptionEnabled(GWF_User::ALLOW_EMAIL)) {
         $buttons .= GWF_Button::mail(GWF_WEB_ROOT . 'send/email/to/' . $u->urlencode('user_name'), $txt);
     }
 }
 if (GWF_Session::isLoggedIn()) {
     $buttons .= GWF_Button::generic($tLang->lang('btn_pm'), $u->getPMHref());
 }
 if ($buttons !== '') {
     echo GWF_Table::rowStart();
     echo "<td colspan=\"2\" class=\"ce\">{$buttons}</td>" . PHP_EOL;
     echo GWF_Table::rowEnd();
示例#3
0
文件: profile.php 项目: sinfocol/gwf3
    $v = $p->display('prof_mobile');
    if ($v !== '0' && $v !== '') {
        echo gwfProfileRow($tLang->lang('th_mobile'), $v);
    }
    if ('' !== ($v = $p->display('prof_icq'))) {
        echo gwfProfileRow($tLang->lang('th_icq'), $v);
    }
    if ('' !== ($v = $p->display('prof_msn'))) {
        echo gwfProfileRow($tLang->lang('th_msn'), $v);
    }
    if ('' !== ($v = $p->display('prof_jabber'))) {
        echo gwfProfileRow($tLang->lang('th_jabber'), $v);
    }
    if ('' !== ($v = $p->display('prof_skype'))) {
        echo gwfProfileRow($tLang->lang('th_skype'), $v);
    }
    if ('' !== ($v = $p->display('prof_yahoo'))) {
        echo gwfProfileRow($tLang->lang('th_yahoo'), $v);
    }
    if ('' !== ($v = $p->display('prof_aim'))) {
        echo gwfProfileRow($tLang->lang('th_aim'), $v);
    }
}
echo GWF_Table::end();
#################
### Functions ###
#################
function gwfProfileRow($head, $value)
{
    return GWF_Table::rowStart() . sprintf('<th>%s</th><td>%s</td>', $head, $value) . GWF_Table::rowEnd();
}