本文整理汇总了PHP中XoopsUser::user_viewemail方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsUser::user_viewemail方法的具体用法?PHP XoopsUser::user_viewemail怎么用?PHP XoopsUser::user_viewemail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsUser
的用法示例。
在下文中一共展示了XoopsUser::user_viewemail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$num_users = $xoopsDB->getRowsNum($result);
//number of users per sorted and limit query
if ($totalcount > 0) {
while ($userinfo = $xoopsDB->fetchArray($result)) {
$userinfo = new XoopsUser($userinfo['uid']);
$user = array();
$avatar = $userinfo->user_avatar();
if ($avatar == 'blank.gif' && $xoopsModuleConfig['defaultavatar']) {
$user['avatar'] = "<img src='" . XOOPS_URL . "/modules/membership/images/davatar.gif' alt='' width='64' height='64' />";
} else {
$user['avatar'] = "<img src='" . XOOPS_URL . "/uploads/" . $userinfo->user_avatar() . "' alt='' width='64' height='64' />";
}
$user['nickname'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $userinfo->uid() . "'>" . $userinfo->uname("E") . "</a>";
$user['regdate'] = formatTimeStamp($userinfo->user_regdate(), "m");
$showmail = 0;
if ($userinfo->user_viewemail()) {
$showmail = 1;
} else {
if ($is_admin) {
$showmail = 1;
}
}
if ($showmail) {
$user['email'] = "<a href='mailto:" . $userinfo->email("E") . "'>";
$user['email'] .= "<img src='" . XOOPS_URL . "/images/icons/email.gif' border='0' alt='" . sprintf(_SENDEMAILTO, $userinfo->uname("E")) . "' /></a>";
} else {
$user['email'] = "";
}
if ($xoopsUser) {
$user['pm'] = "<a href='javascript:openWithSelfMain(\"" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $userinfo->uid() . "\",\"pmlite\",450,370);'>";
$user['pm'] .= "<img src='" . XOOPS_URL . "/images/icons/pm.gif' border='0' alt='" . sprintf(_SENDPMTO, $userinfo->uname("E")) . "' /></a>";