本文整理汇总了PHP中GWF_HTML::langUser方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_HTML::langUser方法的具体用法?PHP GWF_HTML::langUser怎么用?PHP GWF_HTML::langUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_HTML
的用法示例。
在下文中一共展示了GWF_HTML::langUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deliver
public static function deliver(Module_PM $module, GWF_PM $pm)
{
if (false === ($pmo = GWF_PMOptions::getPMOptions($pm->getReceiver()))) {
return 0;
}
if (!$pmo->isOptionEnabled(GWF_PMOptions::EMAIL_ON_PM)) {
return 0;
}
$sender = $pm->getSender();
$receiver = $pm->getReceiver();
if ('' === ($rec = $receiver->getValidMail())) {
return 0;
}
$sendername = $sender->getID() !== '0' ? $sender->display('user_name') : GWF_HTML::langUser($receiver, 'guest');
$email = new GWF_Mail();
$email->setSender($module->cfgEmailSender());
$email->setReceiver($rec);
$email->setSubject($module->langUser($receiver, 'mail_subj', array($sendername)));
$autofolder = sprintf('index.php?mo=PM&me=AutoFolder&pmid=%s&uid=%s&token=%s', $pm->getID(), $receiver->getID(), $pm->getHashcode());
$autofolder = Common::getAbsoluteURL($autofolder);
$autofolder = GWF_HTML::anchor($autofolder, $autofolder);
$delete = sprintf('index.php?mo=PM&me=Delete&pmid=%s&uid=%s&token=%s', $pm->getID(), $receiver->getID(), $pm->getHashcode());
$delete = Common::getAbsoluteURL($delete);
$delete = GWF_HTML::anchor($delete, $delete);
$email->setBody($module->langUser($receiver, 'mail_body', array($receiver->displayUsername(), $sendername, $pm->display('pm_title'), $pm->display('pm_message'), $autofolder, $delete)));
if (false === $email->sendToUser($receiver)) {
return -4;
}
return 1;
}