本文整理汇总了PHP中XoopsUser::email方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsUser::email方法的具体用法?PHP XoopsUser::email怎么用?PHP XoopsUser::email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsUser
的用法示例。
在下文中一共展示了XoopsUser::email方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showFriends
/**
* @desc Visualiza la lista de amigos del usuario
**/
function showFriends()
{
global $xoopsOption, $tpl, $db, $xoopsUser, $xoopsModuleConfig, $pag, $xoopsConfig;
$xoopsOption['template_main'] = 'gs_panel_friends.html';
include 'header.php';
$mc =& $xoopsModuleConfig;
GSFunctions::makeHeader();
//Barra de Navegación
$sql = "SELECT COUNT(*) FROM " . $db->prefix('gs_friends') . " WHERE gsuser='" . $xoopsUser->uid() . "'";
$page = isset($pag) ? $pag : '';
$limit = 30;
list($num) = $db->fetchRow($db->query($sql));
if ($page > 0) {
$page -= 1;
}
$start = $page * $limit;
$tpages = (int) ($num / $limit);
if ($num % $limit > 0) {
$tpages++;
}
$pactual = $page + 1;
if ($pactual > $tpages) {
$rest = $pactual - $tpages;
$pactual = $pactual - $rest + 1;
$start = ($pactual - 1) * $limit;
}
if ($tpages > 1) {
if ($mc['urlmode']) {
$urlnav = 'cpanel/friends';
} else {
$urlnav = 'cpanel.php?by=cpanel/friends';
}
$nav = new GsPageNav($num, $limit, $start, 'pag', $urlnav, 0);
$tpl->assign('friendsNavPage', $nav->renderNav(4, 1));
}
$showmax = $start + $limit;
$showmax = $showmax > $num ? $num : $showmax;
$tpl->assign('lang_showing', sprintf(__('Sowing friends %u to %u from %u.', 'galleries'), $start + 1, $showmax, $num));
$tpl->assign('limit', $limit);
$tpl->assign('pag', $pactual);
//Fin de barra de navegación
$sql = "SELECT * FROM " . $db->prefix('gs_friends') . " WHERE gsuser='" . $xoopsUser->uid() . "'";
$sql .= " LIMIT {$start},{$limit}";
$result = $db->query($sql);
while ($row = $db->fetchArray($result)) {
$xu = new XoopsUser($row['uid']);
$tpl->append('users', array('uid' => $xu->uid(), 'uname' => $xu->uname(), 'link' => XOOPS_URL . "/modules/galleries/" . ($mc['urlmode'] ? "usr/" . $xu->uname() . "/" : "user.php?id=usr/" . $xu->uname()), 'avatar' => RMEvents::get()->run_event('rmcommon.get.avatar', $xu->email(), 0, $xu->user_avatar() != '' ? XOOPS_URL . '/uploads/avatars/' . $xu->user_avatar() : GS_URL . '/images/avatar.png')));
}
$tpl->assign('lang_uname', __('User name', 'galleries'));
$tpl->assign('lang_newfriend', __('New Friend', 'galleries'));
$tpl->assign('lang_del', __('Delete', 'galleries'));
$tpl->assign('lang_confirm', __('Do you really wish to delete specified friend?', 'galleries'));
$tpl->assign('lang_confirms', __('Do you really wish to delete selected friends?', 'galleries'));
$tpl->assign('form_action_add', GSFunctions::get_url() . ($mc['urlmode'] ? 'cp/add/' : '?cp=add'));
$tpl->assign('form_action_del', GSFunctions::get_url() . ($mc['urlmode'] ? 'cp/delete/' : '?cp=delete'));
$tpl->assign('delete_link', GSFunctions::get_url() . ($mc['urlmode'] ? 'cp/deletefriend/pag/' . $pactual . '/id/' : '?cp=deletefriend&page=' . $pactual . '&id='));
RMTemplate::get()->add_style('panel.css', 'galleries');
createLinks();
include 'footer.php';
}
示例2: formatTimeStamp
$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>";
} else {
$user['pm'] = "";
}
if ($userinfo->url("E")) {
$user['url'] = "<a href='" . $userinfo->url("E") . "' target=new><img src='" . XOOPS_URL . "/images/icons/www.gif' border='0' alt='" . _VISITWEBSITE . "' /></a>";
} else {
$user['url'] = "";
}
示例3: while
$post->setAuthor($row['uid']);
$post->setDate($row['created']);
$post->setModDate($row['published']);
$post->setText($row['hometext'] . '<br />' . $row['bodytext']);
$post->setStatus(1);
$post->setAllowComs(1);
$post->setAdvance(0);
$post->addToCatego($cats[$row['topicid']]);
$post->save();
$stories[$row['storyid']] = $post->getID();
}
// Guardamos los comentarios
$result = $db->query("SELECT * FROM " . $db->prefix("xoopscomments") . " WHERE com_modid='" . $module->mid() . "'");
while ($row = $db->fetchArray($result)) {
$xu = new XoopsUser($row['com_uid']);
$sql = "INSERT INTO " . $db->prefix("mw_comments") . " (`post`,`nombre`,`email`,`texto`,`xu`,`fecha`,`aprovado`)\n\t\t\t\t\tVALUES ('" . $stories[$row['com_itemid']] . "','" . $xu->uname() . "','" . $xu->email() . "','{$row['com_text']}',\n\t\t\t\t\t'{$row['com_uid']}','{$row['com_created']}','" . ($row['com_status'] == 2 ? 1 : 0) . "')";
$db->queryF($sql);
$post = new NPPost($stories[$row['com_itemid']]);
$post->setComments($post->getComments() + 1);
$post->update();
}
redirect_header('posts.php', 2, _AS_NP_DBOK);
die;
break;
default:
xoops_cp_header();
makeAdminNav();
$hiddens['op'] = 'do';
$buttons['sbt']['value'] = _SUBMIT;
$buttons['sbt']['type'] = 'submit';
$util->msgBox($hiddens, 'import_news.php', sprintf(_AS_NP_CONFIRMIMPORT, 'News'), '../images/question.png', $buttons, true, 400);
示例4: explodeopts
$labs = explodeopts($optfield);
$isnum = in_array($nlab, $labs);
$cnt = 0;
echo "<p><a href='{$evurl}' class='evhead'>{$title}</a></p>\n";
foreach ($_POST['act'] as $i) {
$rvid = intval($i);
$yesno = param('yesno');
$result = $xoopsDB->query("SELECT * FROM " . RVTBL . " WHERE rvid={$rvid} AND status=" . _RVSTAT_ORDER);
$data = $xoopsDB->fetchArray($result);
if ($data) {
$msg = param('msg', '');
$xoopsMailer =& getMailer();
$xoopsMailer->useMail();
$xoopsMailer->setSubject("Re: " . $title);
$xoopsMailer->setBody($msg);
$xoopsMailer->setFromEmail($poster->email());
if ($data['uid']) {
$user = new XoopsUser($data['uid']);
$uinfo = sprintf("%s: %s (%s)\n", _MD_UNAME, $user->getVar('uname'), $user->getVar('name'));
$xoopsMailer->setToUsers($user);
} else {
$xoopsMailer->setToEmails($data['email']);
$uinfo = sprintf("%s: %s\n", _MD_EMAIL, $email);
}
$xoopsMailer->assign('REQ_UNAME', $xoopsUser->getVar('uname'));
$xoopsMailer->assign('REQ_NAME', $xoopsUser->getVar('name'));
$xoopsMailer->setFromName(eguide_from_name());
$xoopsMailer->assign("INFO", $uinfo . $data['info']);
$curl = EGUIDE_URL . "/reserv.php?op=cancel&rvid={$rvid}&key=" . $data['confirm'];
$xoopsMailer->assign('RVID', $rvid);
$xoopsMailer->assign('CANCEL_URL', $curl);