本文整理汇总了PHP中global_common::formatMailContent方法的典型用法代码示例。如果您正苦于以下问题:PHP global_common::formatMailContent方法的具体用法?PHP global_common::formatMailContent怎么用?PHP global_common::formatMailContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类global_common
的用法示例。
在下文中一共展示了global_common::formatMailContent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$isBad = $_pgR["isbad"];
$strTableName = Model_CommentBad::TBL_SL_COMMENT_BAD;
$comment = $objComment->getCommentByID($commentID);
$user = $objUser->getUserByID($comment[global_mapping::CreatedBy]);
if ($user && $comment) {
$isSent = true;
$description = "Restore Comment";
if ($isBad) {
$description = "Bad Comment";
$userEmail = $user[global_mapping::Email];
$fullName = $user[global_mapping::FullName];
$linkArticle = global_common::getHostName() . '/article_detail.php?aid=' . $comment[global_mapping::ArticleID];
$commentDate = global_common::formatDateTimeVN($comment[global_mapping::CreatedDate]);
$commentContent = $comment[global_mapping::Content];
$linkPolicy = global_common::getHostName() . '/' . global_common::PAGE_TERM_KM;
$arrMailContent = global_common::formatMailContent(global_common::TEAMPLATE_BAD_COMMENT, null, array(global_common::formatOutputText($fullName), $linkArticle, $commentDate, $commentContent, $linkPolicy));
$emailSubject = $arrMailContent[0];
$emailContent = $arrMailContent[1];
$isSent = global_mail::send($userEmail, $fullName, $emailSubject, $emailContent, null, global_common::SUPPORT_MAIL_USERNAME, global_common::SUPPORT_MAIL_PASSWORD, global_common::SUPPORT_MAIL_DISPLAY_NAME);
}
if ($isSent) {
$badComment = $objCommentBad->getCommentBadByID($commentID);
if (count($badComment) <= 0) {
$createdBy = $c_userInfo[global_mapping::UserID];
$resultID = $objCommentBad->insert($commentID, $description, $createdBy, $isBad);
} else {
$updatedBy = $c_userInfo[global_mapping::UserID];
$resultID = $objCommentBad->activateBadComment($commentID, $description, $updatedBy, $isBad);
}
if ($resultID) {
$arrHeader = global_common::getMessageHeaderArr($banCode);
示例2: array
if ($userName) {
$fieldName = global_mapping::UserName;
$fieldValue = $userName;
} else {
$fieldName = global_mapping::Email;
$fieldValue = $email;
}
$result = $objUser->getUserByField($fieldName, $fieldValue);
//echo $result;
if ($result) {
$guid = $objReset->insert($result[0][global_mapping::UserID]);
if ($guid) {
$userEmail = $result[0][global_mapping::Email];
$fullName = $result[0][global_mapping::FullName];
$linkReset = global_common::getHostName() . '/change_password.php?id=' . $guid;
$arrMailContent = global_common::formatMailContent(global_common::TEMPLATE_RESET_PASSWORD, null, array(global_common::formatOutputText($result[0][global_mapping::FullName]), $linkReset, global_common::RESET_EXPIRE_DAYS));
$emailSubject = $arrMailContent[0];
$emailContent = $arrMailContent[1];
$isSent = global_mail::send($userEmail, $fullName, $emailSubject, $emailContent, null, global_common::SUPPORT_MAIL_USERNAME, global_common::SUPPORT_MAIL_PASSWORD, global_common::SUPPORT_MAIL_DISPLAY_NAME);
if ($isSent) {
$arrHeader = global_common::getMessageHeaderArr($banCode);
//$banCode
echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(1, 'Vui lòng kiểm tra email để cập nhật lại mật khẩu'), array(0, 1));
return;
}
}
echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(0, 'Xử lý thất bại. Xin vui lòng thử lại sau!'), array(0, 1));
return;
} else {
echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(0, 'Tên đăng nhập hoặc email không tồn tại.'), array(0, 1));
return;