• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BxDolEmailTemplates类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中BxDolEmailTemplates的典型用法代码示例。如果您正苦于以下问题:PHP BxDolEmailTemplates类的具体用法?PHP BxDolEmailTemplates怎么用?PHP BxDolEmailTemplates使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了BxDolEmailTemplates类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: onPostReply

function onPostReply($aTopic, $sPostText, $sUser)
{
    $oProfile = new BxDolProfile($sUser);
    $iProfileId = $oProfile->getID();
    if (BX_ORCA_INTEGRATION == 'dolphin' && !isAdmin($iProfileId)) {
        defineForumActions();
        $iActionId = BX_FORUM_PUBLIC_POST;
        if (isset($aTopic['forum_type']) && 'private' == $aTopic['forum_type']) {
            $iActionId = BX_FORUM_PRIVATE_POST;
        }
        checkAction($iProfileId, $iActionId, true);
        // perform action
    }
    $aPlusOriginal = array('PosterUrl' => $iProfileId ? getProfileLink($iProfileId) : 'javascript:void(0);', 'PosterNickName' => $iProfileId ? getNickName($iProfileId) : $sUser, 'TopicTitle' => $aTopic['topic_title'], 'ReplyText' => $sPostText);
    $oEmailTemplate = new BxDolEmailTemplates();
    $aTemplate = $oEmailTemplate->getTemplate('bx_forum_notifier');
    $fdb = new DbForum();
    $a = $fdb->getSubscribersToTopic($aTopic['topic_id']);
    foreach ($a as $r) {
        if ($r['user'] == $sUser) {
            continue;
        }
        $oRecipient = new BxDolProfile($r['user']);
        $aRecipient = getProfileInfo($oRecipient->_iProfileID);
        $aPlus = array_merge(array('Recipient' => ' ' . getNickName($aRecipient['ID'])), $aPlusOriginal);
        sendMail(trim($aRecipient['Email']), $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus);
    }
    forumAlert('reply', $aTopic['topic_id'], $iProfileId);
}
开发者ID:noormcs,项目名称:studoro,代码行数:29,代码来源:callback.php


示例2: _checkProfileMatch

 function _checkProfileMatch($iProfileId, $sAction)
 {
     $aProfile = getProfileInfo($iProfileId);
     if ($aProfile['Status'] == 'Active' && ($aProfile['UpdateMatch'] || $sAction == 'join')) {
         $oDb = new BxDolDb();
         // clear field "UpdateMatch"
         $oDb->query("UPDATE `Profiles` SET `UpdateMatch` = 0 WHERE `ID`= {$iProfileId}");
         // clear cache
         $oDb->query("DELETE FROM `sys_profiles_match`");
         // get send mails
         $aSendMails = $oDb->getRow("SELECT `profiles_match` FROM `sys_profiles_match_mails` WHERE `profile_id` = {$iProfileId}");
         $aSend = !empty($aSendMails) ? unserialize($aSendMails['profiles_match']) : array();
         $aProfiles = getMatchProfiles($iProfileId);
         foreach ($aProfiles as $iProfId) {
             if (!isset($aSend[(int) $iProfId])) {
                 $oEmailTemplate = new BxDolEmailTemplates();
                 $aMessage = $oEmailTemplate->parseTemplate('t_CupidMail', array('StrID' => $iProfId, 'MatchProfileLink' => getProfileLink($iProfileId)), $iProfId);
                 $aProfile = getProfileInfo($iProfId);
                 if (!empty($aProfile) && $aProfile['Status'] == 'Active') {
                     $oDb->query("INSERT INTO `sys_sbs_queue`(`email`, `subject`, `body`) VALUES('" . $aProfile['Email'] . "', '" . process_db_input($aMessage['subject'], BX_TAGS_NO_ACTION, BX_SLASHES_NO_ACTION) . "', '" . process_db_input($aMessage['body'], BX_TAGS_NO_ACTION, BX_SLASHES_NO_ACTION) . "')");
                 }
                 $aSend[(int) $iProfId] = 0;
             }
         }
         if (empty($aSendMails)) {
             $oDb->query("INSERT INTO `sys_profiles_match_mails`(`profile_id`, `profiles_match`) VALUES({$iProfileId}, '" . serialize($aSend) . "')");
         } else {
             $oDb->query("UPDATE `sys_profiles_match_mails` SET `profiles_match` = '" . serialize($aSend) . "' WHERE `profile_id` = {$iProfileId}");
         }
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:31,代码来源:BxDolAlertsResponceMatch.php


示例3: SendTellFriend

/**
 * send "tell a friend" email
 */
function SendTellFriend($iSenderID = 0)
{
    global $profileID;
    $sRecipient = clear_xss($_POST['friends_emails']);
    $sSenderName = clear_xss($_POST['name']);
    $sSenderEmail = clear_xss($_POST['email']);
    if (strlen(trim($sRecipient)) <= 0) {
        return 0;
    }
    if (strlen(trim($sSenderEmail)) <= 0) {
        return 0;
    }
    $sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : '';
    $rEmailTemplate = new BxDolEmailTemplates();
    if ($profileID) {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriendProfile', $profileID);
        $Link = getProfileLink($profileID, $sLinkAdd);
    } else {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriend');
        $Link = BX_DOL_URL_ROOT;
        if (strlen($sLinkAdd) > 0) {
            $Link .= '?' . $sLinkAdd;
        }
    }
    $aPlus = array('Link' => $Link, 'FromName' => $sSenderName);
    return sendMail($sRecipient, $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus);
}
开发者ID:noormcs,项目名称:studoro,代码行数:30,代码来源:tellfriend.php


示例4: SendTellFriend

/**
 * send "tell a friend" email
 */
function SendTellFriend($iSenderID = 0)
{
    global $profileID;
    $sSenderEmail = clear_xss(bx_get('sender_email'));
    if (strlen(trim($sSenderEmail)) <= 0) {
        return 0;
    }
    $sSenderName = clear_xss(bx_get('sender_name'));
    $sSenderLink = $iSenderID != 0 ? getProfileLink($iSenderID) : BX_DOL_URL_ROOT;
    $sRecipientEmail = clear_xss(bx_get('recipient_email'));
    if (strlen(trim($sRecipientEmail)) <= 0) {
        return 0;
    }
    $sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : '';
    $rEmailTemplate = new BxDolEmailTemplates();
    if ($profileID) {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriendProfile', getLoggedId());
        $Link = getProfileLink($profileID, $sLinkAdd);
    } else {
        $aTemplate = $rEmailTemplate->getTemplate('t_TellFriend', getLoggedId());
        $Link = BX_DOL_URL_ROOT;
        if (strlen($sLinkAdd) > 0) {
            $Link .= '?' . $sLinkAdd;
        }
    }
    return sendMail($sRecipientEmail, $aTemplate['Subject'], $aTemplate['Body'], '', array('Link' => $Link, 'SenderName' => $sSenderName, 'SenderLink' => $sSenderLink));
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:30,代码来源:tellfriend.php


示例5: processing

 function processing()
 {
     $oModules = new BxDolModuleDb();
     $aModules = $oModules->getModules();
     $aResult = array();
     foreach ($aModules as $aModule) {
         $aCheckInfo = BxDolInstallerUi::checkForUpdates($aModule);
         if (isset($aCheckInfo['version'])) {
             $aResult[] = _t('_adm_txt_modules_update_text_ext', $aModule['title'], $aCheckInfo['version']);
         }
     }
     if (empty($aResult)) {
         return;
     }
     $aAdmins = $GLOBALS['MySQL']->getAll("SELECT * FROM `Profiles` WHERE `Role`&" . BX_DOL_ROLE_ADMIN . "<>0 AND `EmailNotify`='1'");
     if (empty($aAdmins)) {
         return;
     }
     $oEmailTemplate = new BxDolEmailTemplates();
     $sMessage = implode('<br />', $aResult);
     foreach ($aAdmins as $aAdmin) {
         $aTemplate = $oEmailTemplate->getTemplate('t_ModulesUpdates', $aAdmin['ID']);
         sendMail($aAdmin['Email'], $aTemplate['Subject'], $aTemplate['Body'], $aAdmin['ID'], array('MessageText' => $sMessage));
     }
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:25,代码来源:BxDolCronModules.php


示例6: PageCompPageMainCode

/**
 * page code function
 */
function PageCompPageMainCode($iID, $sConfCode)
{
    global $site;
    $ID = (int) $iID;
    $ConfCode = clear_xss($sConfCode);
    $p_arr = getProfileInfo($ID);
    if (!$p_arr) {
        $_page['header'] = _t("_Error");
        $_page['header_text'] = _t("_Profile Not found");
        return MsgBox(_t('_Profile Not found Ex'));
    }
    $aCode = array('message_status' => '', 'message_info' => '', 'bx_if:form' => array('condition' => false, 'content' => array('form' => '')), 'bx_if:next' => array('condtion' => false, 'content' => array('next_url' => '')));
    if ($p_arr['Status'] == 'Unconfirmed') {
        $ConfCodeReal = base64_encode(base64_encode(crypt($p_arr[Email], CRYPT_EXT_DES ? "secret_co" : "se")));
        if (strcmp($ConfCode, $ConfCodeReal) != 0) {
            $aForm = array('form_attrs' => array('action' => BX_DOL_URL_ROOT . 'profile_activate.php', 'method' => 'post', 'name' => 'form_change_status'), 'inputs' => array('conf_id' => array('type' => 'hidden', 'name' => 'ConfID', 'value' => $ID), 'conf_code' => array('type' => 'text', 'name' => 'ConfCode', 'value' => '', 'caption' => _t("_Confirmation code")), 'submit' => array('type' => 'submit', 'name' => 'submit', 'value' => _t("_Submit"))));
            $oForm = new BxTemplFormView($aForm);
            $aCode['message_status'] = _t("_Profile activation failed");
            $aCode['message_info'] = _t("_EMAIL_CONF_FAILED_EX");
            $aCode['bx_if:form']['condition'] = true;
            $aCode['bx_if:form']['content']['form'] = $oForm->getCode();
        } else {
            $aCode['bx_if:next']['condition'] = true;
            $aCode['bx_if:next']['content']['next_url'] = BX_DOL_URL_ROOT . 'member.php';
            $send_act_mail = false;
            if (getParam('autoApproval_ifJoin') == 'on' && !(getParam('sys_dnsbl_enable') && 'approval' == getParam('sys_dnsbl_behaviour') && bx_is_ip_dns_blacklisted('', 'join'))) {
                $status = 'Active';
                $send_act_mail = true;
                $aCode['message_info'] = _t("_PROFILE_CONFIRM");
            } else {
                $status = 'Approval';
                $aCode['message_info'] = _t("_EMAIL_CONF_SUCCEEDED", $site['title']);
            }
            $update = bx_admin_profile_change_status($ID, $status, $send_act_mail);
            // Promotional membership
            if (getParam('enable_promotion_membership') == 'on') {
                $memership_days = getParam('promotion_membership_days');
                setMembership($p_arr['ID'], MEMBERSHIP_ID_PROMOTION, $memership_days, true);
            }
            // check couple profile;
            if ($p_arr['Couple']) {
                $update = bx_admin_profile_change_status($p_arr['Couple'], $status);
                //Promotional membership
                if (getParam('enable_promotion_membership') == 'on') {
                    $memership_days = getParam('promotion_membership_days');
                    setMembership($p_arr['Couple'], MEMBERSHIP_ID_PROMOTION, $memership_days, true);
                }
            }
            if (getParam('newusernotify')) {
                $oEmailTemplates = new BxDolEmailTemplates();
                $aTemplate = $oEmailTemplates->getTemplate('t_UserConfirmed', $p_arr['ID']);
                sendMail($site['email_notify'], $aTemplate['Subject'], $aTemplate['Body'], $p_arr['ID']);
            }
        }
    } else {
        $aCode['message_info'] = _t('_ALREADY_ACTIVATED');
    }
    return $GLOBALS['oSysTemplate']->parseHtmlByName('profile_activate.html', $aCode);
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:62,代码来源:profile_activate.php


示例7: finish

 protected function finish()
 {
     bx_alert('system', 'pruning', 0);
     if (!($sOutput = ob_get_clean())) {
         return;
     }
     $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_Pruning', array('pruning_output' => $sOutput, 'site_title' => getParam('site_title')), 0, 0);
     if ($aTemplate) {
         sendMail(getParam('site_email'), $aTemplate['Subject'], $aTemplate['Body'], 0, array(), BX_EMAIL_NOTIFY);
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:11,代码来源:BxDolCronPruning.php


示例8: onPostReply

function onPostReply($aTopic, $sPostText, $sUser)
{
    $oProfile = new BxDolProfile($sUser);
    $aPlusOriginal = array('PosterUrl' => $oProfile->_iProfileID ? getProfileLink($oProfile->_iProfileID) : 'javascript:void(0);', 'PosterNickName' => $sUser, 'TopicTitle' => $aTopic['topic_title'], 'ReplyText' => $sPostText);
    $oEmailTemplate = new BxDolEmailTemplates();
    $aTemplate = $oEmailTemplate->getTemplate('bx_forum_notifier');
    $fdb = new DbForum();
    $a = $fdb->getSubscribersToTopic($aTopic['topic_id']);
    foreach ($a as $r) {
        if ($r['user'] == $sUser) {
            continue;
        }
        $oRecipient = new BxDolProfile($r['user']);
        $aRecipient = getProfileInfo($oRecipient->_iProfileID);
        $aPlus = array_merge(array('Recipient' => ' ' . $aRecipient['NickName']), $aPlusOriginal);
        sendMail(trim($aRecipient['Email']), $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus);
    }
    $oAlert = new BxDolAlerts('bx_forum', 'reply', $aTopic['topic_id']);
    $oAlert->alert();
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:20,代码来源:callback.php


示例9: serviceIsSpam

 /**
  * Check text for spam.
  * First it check if IP is whitelisted(or under cron execution or user is admin) - for whitelisted IPs check for spam isn't performed,
  * then it checks URLs found in text for DNSURI black lists (@see BxAntispamDNSURIBlacklists),
  * then it checks text in Akismet service (@see BxAntispamAkismet).
  * It can send report if spam is found or tries to inform caller to block the content (depending on configuration).
  *
  * @param $sContent content to check for spam
  * @param $sIp IP address of content poster
  * @param $isStripSlashes slashes parameter:
  *          BX_SLASHES_AUTO - automatically detect magic_quotes_gpc setting
  *          BX_SLASHES_NO_ACTION - do not perform any action with slashes
  * @return true if spam detected and content shouln't be recorded, false if content should be processed as usual.
  */
 public function serviceIsSpam($sContent, $sIp = '', $isStripSlashes = BX_SLASHES_AUTO)
 {
     if (defined('BX_DOL_CRON_EXECUTE') || isAdmin()) {
         return false;
     }
     if ($this->serviceIsIpWhitelisted($sIp)) {
         return false;
     }
     if (get_magic_quotes_gpc() && $isStripSlashes == BX_SLASHES_AUTO) {
         $sContent = stripslashes($sContent);
     }
     $bRet = false;
     if ('on' == $this->_oConfig->getAntispamOption('uridnsbl_enable')) {
         $oDNSURIBlacklists = bx_instance('BxAntispamDNSURIBlacklists', array(), $this->_aModule);
         if ($oDNSURIBlacklists->isSpam($sContent)) {
             $oDNSURIBlacklists->onPositiveDetection($sContent);
             $bRet = true;
         }
     }
     if (!$bRet && 'on' == $this->_oConfig->getAntispamOption('akismet_enable')) {
         $oAkismet = bx_instance('BxAntispamAkismet', array(), $this->_aModule);
         if ($oAkismet->isSpam($sContent)) {
             $oAkismet->onPositiveDetection($sContent);
             $bRet = true;
         }
     }
     if ($bRet && 'on' == $this->_oConfig->getAntispamOption('antispam_report')) {
         $oProfile = BxDolProfile::getInstance();
         $aPlus = array('SpammerUrl' => $oProfile->getUrl(), 'SpammerNickName' => $oProfile->getDisplayName(), 'Page' => htmlspecialchars_adv($_SERVER['PHP_SELF']), 'Get' => print_r($_GET, true), 'Post' => print_r($_POST, true), 'SpamContent' => htmlspecialchars_adv($sContent));
         bx_import('BxDolEmailTemplates');
         $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('bx_antispam_spam_report', $aPlus);
         if (!$aTemplate) {
             trigger_error('Email template or translation missing: bx_antispam_spam_report', E_USER_ERROR);
         }
         sendMail(getParam('site_email'), $aTemplate['Subject'], $aTemplate['Body']);
     }
     if ($bRet && 'on' == $this->_oConfig->getAntispamOption('antispam_block')) {
         return true;
     }
     return false;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:55,代码来源:BxAntispamModule.php


示例10: serviceGetBlockForm

 /**
  * SERVICE METHODS
  */
 public function serviceGetBlockForm()
 {
     $aDefaultFields = array('name', 'email', 'subject', 'body', 'do_submit');
     $mixedAllowed = $this->isAllowedContact();
     if ($mixedAllowed !== true) {
         return array('content' => MsgBox($mixedAllowed));
     }
     $sResult = '';
     bx_import('BxDolForm');
     $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject('form_contact'), $this->_oConfig->getObject('form_display_contact_send'), $this->_oTemplate);
     $oForm->initChecker();
     if ($oForm->isSubmittedAndValid()) {
         $iId = $oForm->insert(array('uri' => $oForm->generateUri(), 'date' => time()));
         if ($iId !== false) {
             $sCustomFields = '';
             $aCustomFields = array();
             foreach ($oForm->aInputs as $aInput) {
                 if (in_array($aInput['name'], $aDefaultFields)) {
                     continue;
                 }
                 $aCustomFields[$aInput['name']] = bx_process_output($oForm->getCleanValue($aInput['name']));
                 $sCustomFields .= $aInput['caption'] . ': ' . $aCustomFields[$aInput['name']] . '<br />';
             }
             $aTemplateKeys = array('SenderName' => bx_process_output($oForm->getCleanValue('name')), 'SenderEmail' => bx_process_output($oForm->getCleanValue('email')), 'MessageSubject' => bx_process_output($oForm->getCleanValue('subject')), 'MessageBody' => bx_process_output(nl2br($oForm->getCleanValue('body')), BX_DATA_TEXT_MULTILINE), 'CustomFields' => $sCustomFields);
             $aTemplateKeys = array_merge($aTemplateKeys, $aCustomFields);
             bx_import('BxDolEmailTemplates');
             $aMessage = BxDolEmailTemplates::getInstance()->parseTemplate('bx_contact_contact_form_message', $aTemplateKeys);
             $sResult = '';
             $sRecipientEmail = $this->_oConfig->getEmail();
             if (sendMail($sRecipientEmail, $aMessage['Subject'], $aMessage['Body'], 0, array(), BX_EMAIL_SYSTEM)) {
                 $this->onContact();
                 $sResult = '_ADM_PROFILE_SEND_MSG';
             } else {
                 $sResult = '_Email sent failed';
             }
             $sResult = MsgBox(_t($sResult));
         }
     }
     return array('content' => $sResult . $oForm->getCode());
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:43,代码来源:BxContactModule.php


示例11: checkModulesPendingUninstall

 /**
  * Check all pending for uninstallation modules and uninstall them if no pending for deletion files are found
  */
 public static function checkModulesPendingUninstall()
 {
     $a = BxDolModuleQuery::getInstance()->getModules();
     foreach ($a as $aModule) {
         // after we make sure that all pending for deletion files are deleted
         if (!$aModule['pending_uninstall'] || BxDolStorage::isQueuedFilesForDeletion($aModule['name'])) {
             continue;
         }
         // remove pending uninstall flag
         self::setModulePendingUninstall($aModule['uri'], false);
         // perform uninstallation
         $aResult = BxDolStudioInstallerUtils::getInstance()->perform($aModule['path'], 'uninstall');
         // send email nofitication
         $aTemplateKeys = array('Module' => $aModule['title'], 'Result' => _t('_Success'), 'Message' => '');
         if ($aResult['code'] > 0) {
             $aTemplateKeys['Result'] = _t('_Failed');
             $aTemplateKeys['Message'] = $aResult['message'];
         }
         $aMessage = BxDolEmailTemplates::getInstance()->parseTemplate('t_DelayedModuleUninstall', $aTemplateKeys);
         sendMail(getParam('site_email'), $aMessage['Subject'], $aMessage['Body'], 0, array(), BX_EMAIL_SYSTEM);
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:25,代码来源:BxDolInstallerUtils.php


示例12: resetPassword

 /**
  * Reset password procedure
  */
 public function resetPassword()
 {
     $sKey = bx_process_input(bx_get('key'));
     // get link to forgot password page for error message
     $sUrlForgotPassword = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password');
     // check if key exists
     $oKey = BxDolKey::getInstance();
     if (!$oKey || !$oKey->isKeyExists($sKey)) {
         return _t("_sys_txt_reset_pasword_error_occured", $sUrlForgotPassword);
     }
     // check if key data exists
     $aData = $oKey->getKeyData($sKey);
     if (!isset($aData['email'])) {
         return _t("_sys_txt_reset_pasword_error_occured", $sUrlForgotPassword);
     }
     // check if account with such email exists
     $iAccountId = $this->_oAccountQuery->getIdByEmail($aData['email']);
     if (!$iAccountId) {
         return _t("_sys_txt_reset_pasword_error_occured", $sUrlForgotPassword);
     }
     // generate new password
     $sPassword = $this->generateUserNewPwd($iAccountId);
     // remove key
     $oKey->removeKey($sKey);
     // send email with new password and display result message
     $aPlus = array('password' => $sPassword);
     $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_PasswordReset', $aPlus, $iAccountId);
     if ($aTemplate && sendMail($aData['email'], $aTemplate['Subject'], $aTemplate['Body'], 0, $aPlus, BX_EMAIL_SYSTEM)) {
         return _t("_sys_txt_reset_pasword_email_sent", $sPassword);
     } else {
         return _t("_sys_txt_reset_pasword_email_send_failed", $sPassword);
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:36,代码来源:BxBaseServiceAccount.php


示例13: MemberSendVKiss

/**
 * Send virtual kiss
 */
function MemberSendVKiss($member, $recipient, $isCheckVisitorGreeting = true)
{
    global $logged;
    // Check if recipient is active
    if ('Active' != $recipient['Status']) {
        return 7;
    }
    // block members
    if ($recipient['ID'] && $member['ID'] && isBlocked((int) $recipient['ID'], (int) $member['ID'])) {
        return 24;
    }
    // Get sender info
    $sender = getProfileInfo($member['ID']);
    // Send email notification
    $rEmailTemplate = new BxDolEmailTemplates();
    if ($logged['member'] || !$isCheckVisitorGreeting) {
        $aTemplate = $rEmailTemplate->getTemplate('t_VKiss', $_COOKIE['memberID']);
    } else {
        $aTemplate = $rEmailTemplate->getTemplate('t_VKiss_visitor');
    }
    $sConfCode = urlencode(base64_encode(base64_encode(crypt($recipient['ID'], CRYPT_EXT_DES ? "vkiss_sec" : "vk"))));
    // parse the email template ;
    $sProfileLink = $sender ? '<a href="' . getProfileLink($member['ID']) . '">' . getNickName($sender['ID']) . '</a>' : '<b>' . _t("_Visitor") . '</b>';
    $sKissLink = $sender ? '<a href="' . BX_DOL_URL_ROOT . 'greet.php?fullpage=1&sendto=' . $member['ID'] . '&from=' . $recipient['ID'] . '&ConfCode=' . $sConfCode . '">' . BX_DOL_URL_ROOT . 'greet.php?sendto=' . $member['ID'] . '&from=' . $recipient['ID'] . '&ConfCode=' . $sConfCode . '</a>' : '<a href="' . BX_DOL_URL_ROOT . 'communicator.php">' . BX_DOL_URL_ROOT . 'communicator.php</a>';
    $aRepl = array('<ConfCode>' => $sConfCode, '<ProfileReference>' => $sProfileLink, '<VKissLink>' => $sKissLink, '<RealName>' => getNickName($recipient['ID']), '<SiteName>' => BX_DOL_URL_ROOT);
    $aTemplate['Body'] = str_replace(array_keys($aRepl), array_values($aRepl), $aTemplate['Body']);
    $mail_ret = sendMail($recipient['Email'], $aTemplate['Subject'], $aTemplate['Body'], $recipient['ID']);
    // Send message into the member's site personal mailbox;
    $aTemplate['Subject'] = process_db_input($aTemplate['Subject'], BX_TAGS_NO_ACTION);
    $aTemplate['Body'] = process_db_input($aTemplate['Body'], BX_TAGS_NO_ACTION);
    $sender['ID'] = !$sender['ID'] ? 0 : $sender['ID'];
    $sQuery = "\n        INSERT INTO\n            `sys_messages`\n        SET\n            `Date` = NOW(),\n            `Sender` = '{$sender['ID']}',\n            `Recipient` = '{$recipient['ID']}',\n            `Subject` = '{$aTemplate['Subject']}',\n            `Text`  = '{$aTemplate['Body']}',\n            `New` = '1',\n            `Type` = 'greeting'\n    ";
    db_res($sQuery);
    if (!$mail_ret) {
        return 10;
    }
    // Insert kiss into database
    $kiss_arr = db_arr("SELECT `ID` FROM `sys_greetings` WHERE `ID` = {$member['ID']} AND `Profile` = {$recipient['ID']} LIMIT 1", 0);
    if (!$kiss_arr) {
        $result = db_res("INSERT INTO `sys_greetings` ( `ID`, `Profile`, `Number`, `When`, `New` ) VALUES ( {$member['ID']}, {$recipient['ID']}, 1, NOW(), '1' )", 0);
    } else {
        $result = db_res("UPDATE `sys_greetings` SET `Number` = `Number` + 1, `New` = '1' WHERE `ID` = {$member['ID']} AND `Profile` = {$recipient['ID']}", 0);
    }
    if (!$result) {
        return 1;
    }
    // If success then perform actions
    checkAction($member['ID'], ACTION_ID_SEND_VKISS, true);
    $oAlert = new BxDolAlerts('greeting', 'add', 0, $member['ID'], array('Recipient' => $recipient['ID']));
    $oAlert->alert();
    return 0;
}
开发者ID:boonex,项目名称:dolphin.pro,代码行数:55,代码来源:greet.php


示例14: bx_admin_profile_change_status

/**
 * Perform change of status with clearing profile(s) cache and sending mail about activation
 * 
 * @param mixed  $mixedIds      - array of IDs or single int ID of profile(s)
 * @param string $sStatus       - given status
 * @param boolean $bSendActMail - send email about activation or not (works with 'Active' status only
 * @return boolean              - TRUE on success / FALSE on failure
 */
function bx_admin_profile_change_status($mixedIds, $sStatus, $bSendActMail = FALSE)
{
    if (!$mixedIds || is_array($mixedIds) && empty($mixedIds)) {
        return FALSE;
    }
    if (!is_array($mixedIds)) {
        $mixedIds = array((int) $mixedIds);
    }
    $sStatus = strip_tags($sStatus);
    $oEmailTemplate = new BxDolEmailTemplates();
    foreach ($mixedIds as $iId) {
        $iId = (int) $iId;
        if (!$GLOBALS['MySQL']->query("UPDATE `Profiles` SET `Status` = '{$sStatus}' WHERE `ID` = {$iId}")) {
            break;
        }
        createUserDataFile($iId);
        reparseObjTags('profile', $iId);
        if ($sStatus == 'Active' && $bSendActMail) {
            if (BxDolModule::getInstance('BxWmapModule')) {
                BxDolService::call('wmap', 'response_entry_add', array('profiles', $iId));
            }
            $aProfile = getProfileInfo($iId);
            $aMail = $oEmailTemplate->parseTemplate('t_Activation', array(), $iId);
            sendMail($aProfile['Email'], $aMail['subject'], $aMail['body'], $iId, array(), 'html', FALSE, TRUE);
        }
        $oAlert = new BxDolAlerts('profile', 'change_status', $iId, 0, array('status' => $sStatus));
        $oAlert->alert();
    }
    return TRUE;
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:38,代码来源:admin.inc.php


示例15: invite

 public function invite($sType, $sEmails, $sText, $mixedLimit = false, $oForm = null)
 {
     $iProfileId = $this->getProfileId();
     $iAccountId = $this->getAccountId($iProfileId);
     $oKeys = BxDolKey::getInstance();
     if (!$oKeys || !in_array($sType, array(BX_INV_TYPE_FROM_MEMBER, BX_INV_TYPE_FROM_SYSTEM))) {
         return false;
     }
     $iKeyLifetime = $this->_oConfig->getKeyLifetime();
     $sEmailTemplate = '';
     switch ($sType) {
         case BX_INV_TYPE_FROM_MEMBER:
             $sEmailTemplate = 'bx_invites_invite_form_message';
             break;
         case BX_INV_TYPE_FROM_SYSTEM:
             $sEmailTemplate = 'bx_invites_invite_by_request_message';
             break;
     }
     if (empty($oForm)) {
         $oForm = $this->getFormObjectInvite();
     }
     $aMessage = BxDolEmailTemplates::getInstance()->parseTemplate($sEmailTemplate, array('text' => $sText), $iAccountId, $iProfileId);
     $iSent = 0;
     $iDate = time();
     $aEmails = preg_split("/[\\s\n,;]+/", $sEmails);
     if (is_array($aEmails) && !empty($aEmails)) {
         foreach ($aEmails as $sEmail) {
             if ($mixedLimit !== false && (int) $mixedLimit <= 0) {
                 break;
             }
             $sEmail = trim($sEmail);
             if (empty($sEmail)) {
                 continue;
             }
             $sKey = $oKeys->getNewKey(false, $iKeyLifetime);
             if (sendMail($sEmail, $aMessage['Subject'], $aMessage['Body'], 0, array('join_url' => $this->getJoinLink($sKey)), BX_EMAIL_SYSTEM)) {
                 $oForm->insert(array('account_id' => $iAccountId, 'profile_id' => $iProfileId, 'key' => $sKey, 'email' => $sEmail, 'date' => $iDate));
                 $this->onInvite($iAccountId, $iProfileId);
                 $iSent += 1;
                 if ($mixedLimit !== false) {
                     $mixedLimit -= 1;
                 }
             }
         }
     }
     return $iSent;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:47,代码来源:BxInvModule.php


示例16: sendUnregisterUserNotify

 function sendUnregisterUserNotify($aMember)
 {
     if (empty($aMember) || !is_array($aMember)) {
         return false;
     }
     $oEmailTemplates = new BxDolEmailTemplates();
     $aTemplate = $oEmailTemplates->parseTemplate('t_UserUnregistered', array('NickName' => $aMember['NickName'], 'Email' => $aMember['Email']));
     return sendMail($GLOBALS['site']['email'], $aTemplate['subject'], $aTemplate['body']);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:9,代码来源:BxDolProfilesController.php


示例17: bx_is_spam

/**
 *  spam checking function
 *  @param $s content to check for spam
 *  @param $isStripSlashes slashes parameter:
 *          BX_SLASHES_AUTO - automatically detect magic_quotes_gpc setting
 *          BX_SLASHES_NO_ACTION - do not perform any action with slashes
 *  @return true if spam detected
 */
function bx_is_spam($val, $isStripSlashes = BX_SLASHES_AUTO)
{
    if (defined('BX_DOL_CRON_EXECUTE')) {
        return false;
    }
    if (isAdmin()) {
        return false;
    }
    if (bx_is_ip_whitelisted()) {
        return false;
    }
    if (get_magic_quotes_gpc() && $isStripSlashes == BX_SLASHES_AUTO) {
        $val = stripslashes($val);
    }
    $bRet = false;
    if ('on' == getParam('sys_uridnsbl_enable')) {
        $oBxDolDNSURIBlacklists = bx_instance('BxDolDNSURIBlacklists');
        if ($oBxDolDNSURIBlacklists->isSpam($val)) {
            $oBxDolDNSURIBlacklists->onPositiveDetection($val);
            $bRet = true;
        }
    }
    if ('on' == getParam('sys_akismet_enable')) {
        $oBxDolAkismet = bx_instance('BxDolAkismet');
        if ($oBxDolAkismet->isSpam($val)) {
            $oBxDolAkismet->onPositiveDetection($val);
            $bRet = true;
        }
    }
    if ($bRet && 'on' == getParam('sys_antispam_report')) {
        bx_import('BxDolEmailTemplates');
        $oEmailTemplates = new BxDolEmailTemplates();
        $aTemplate = $oEmailTemplates->getTemplate('t_SpamReportAuto', 0);
        $iProfileId = getLoggedId();
        $aPlus = array('SpammerUrl' => getProfileLink($iProfileId), 'SpammerNickName' => getNickName($iProfileId), 'Page' => htmlspecialchars_adv($_SERVER['PHP_SELF']), 'Get' => print_r($_GET, true), 'SpamContent' => htmlspecialchars_adv($val));
        sendMail($GLOBALS['site']['email'], $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus);
    }
    if ($bRet && 'on' == getParam('sys_antispam_block')) {
        return true;
    }
    return false;
}
开发者ID:blas-dmx,项目名称:dolphin.pro,代码行数:50,代码来源:utils.inc.php


示例18: getExpirationLetter

 function getExpirationLetter($iProfileId, $sLevelName, $iLevelExpireDays)
 {
     $iProfileId = (int) $iProfileId;
     if (!$iProfileId) {
         return false;
     }
     $oProfileQuery = BxDolProfileQuery::getInstance();
     $sProfileEmail = $oProfileQuery->getEmailById($iProfileId);
     $aPlus = array('membership_name' => $sLevelName, 'expire_days' => $iLevelExpireDays);
     $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('t_MemExpiration', $aPlus, 0, $iProfileId);
     $iResult = $aTemplate && sendMail($sProfileEmail, $aTemplate['Subject'], $aTemplate['Body'], $iProfileId, $aPlus);
     return !empty($iResult);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:13,代码来源:BxDolAcl.php


示例19: sendFileInfo

 function sendFileInfo($sEmail, $sMessage, $sUrl, $sType = 'share')
 {
     $aUser = getProfileInfo($this->_iProfileId);
     $sUrl = urldecode($sUrl);
     $aPlus = array('MediaType' => _t('_' . $this->_oConfig->getMainPrefix() . '_single'), 'MediaUrl' => $sUrl, 'SenderNickName' => $aUser ? getNickName($aUser['ID']) : _t("_Visitor"), 'UserExplanation' => $sMessage);
     bx_import('BxDolEmailTemplates');
     $rEmailTemplate = new BxDolEmailTemplates();
     $sSubject = 't_' . $this->_oConfig->getMainPrefix() . '_' . $sType;
     $aEmails = explode(",", $sEmail);
     foreach ($aEmails as $sMail) {
         $aTemplate = $rEmailTemplate->getTemplate($sSubject);
         $sMail = trim($sMail);
         if (sendMail($sMail, $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus)) {
             return true;
         }
     }
     return false;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:18,代码来源:BxDolFilesModule.php


示例20: ActionBuySendMailAdvertisement

    /**
     * Generate second paid page
     *
     * @param $iAdvertisementID	ID of Advertisement
     * @return HTML presentation of data
     */
    function ActionBuySendMailAdvertisement($iAdvertisementID)
    {
        global $site;
        $iSellerId = (int) bx_get('IDSeller');
        $sRetHtml = _t('_WARNING');
        if ($this->_iVisitorID > 0) {
            $aSqlResStr = $this->_oDb->getAdInfo($iAdvertisementID);
            $aSqlSellerRes = getProfileInfo($iSellerId);
            $aSqlMemberRes = getProfileInfo($this->_iVisitorID);
            if ($aSqlResStr) {
                $sCustDetails = $aSqlResStr['CustomFieldName1'] != NULL && $aSqlResStr['CustomFieldValue1'] ? "{$aSqlResStr['Unit1']} {$aSqlResStr['CustomFieldValue1']}" : '';
                $sPowDol = _t('_powered_by_Dolphin');
                $sBuyMsg2 = _t('_bx_ads_BuyMsg2');
                $sBuyDet1 = _t('_bx_ads_BuyDetails1');
                $sReturnBackC = _t('_bx_ads_Back');
                bx_import('BxDolEmailTemplates');
                $rEmailTemplate = new BxDolEmailTemplates();
                $aTemplate = $rEmailTemplate->getTemplate('t_BuyNow', $this->_iVisitorID);
                $aTemplateS = $rEmailTemplate->getTemplate('t_BuyNowS', $this->_iVisitorID);
                // Send email notification
                $sMessageB = $aTemplate['Body'];
                $sMessageS = $aTemplateS['Body'];
                $sSubject = $aTemplate['Subject'];
                $sSubjectS = $aTemplateS['Subject'];
                $aPlus = array();
                $aPlus['Subject'] = $aSqlResStr['Subject'];
                $aPlus['NickName'] = getNickName($aSqlSellerRes['ID']);
                $aPlus['EmailS'] = $aSqlSellerRes['Email'];
                $aPlus['NickNameB'] = getNickName($aSqlMemberRes['ID']);
                $aPlus['EmailB'] = $aSqlMemberRes['Email'];
                $aPlus['sCustDetails'] = $sCustDetails;
                $sGenUrl = $this->genUrl($iAdvertisementID, $aSqlResStr['EntryUri']);
                $aPlus['ShowAdvLnk'] = $sGenUrl;
                $aPlus['sPowDol'] = $sPowDol;
                $aPlus['site_email'] = $site['email'];
                $sRetHtml = '';
                $aPlus['Who'] = 'buyer';
                $aPlus['String1'] = _t('_bx_ads_you_have_purchased_an_item');
                sendMail($aSqlMemberRes['Email'], $sSubject, $sMessageB, $aSqlSellerRes['ID'], $aPlus, 'html');
                $aPlus['Who'] = 'seller';
                $aPlus['String1'] = _t('_bx_ads_someone_wants_to_purchase');
                if (sendMail($aSqlSellerRes['Email'], $sSubjectS, $sMessageS, $aSqlSellerRes['ID'], $aPlus, 'html')) {
                    $sRetHtml .= MsgBox(_t('_Email was successfully sent'));
                    bx_import('BxDolAlerts');
                    $oZ = new BxDolAlerts('ads', 'buy', $iAdvertisementID, $this->_iVisitorID);
                    $oZ->alert();
                }
                $sBoxContent = <<<EOF
    <div>
        <b>{$sBuyMsg2}</b>
    </div><br/>
    <div>
        <b>{$sBuyDet1}</b>&nbsp;&nbsp;&nbsp;{$sCustDetails}
    </div><br/>
    <div>
        <a class="bx-btn" href="{$sGenUrl}">{$sReturnBackC}</a>
        <div class="clear_both"></div>
    </div>
EOF;
                $sRetHtml .= DesignBoxContent($aSqlResStr['Subject'], $sBoxContent, 11);
            }
        }
        return $sRetHtml;
    }
开发者ID:newton27,项目名称:dolphin.pro,代码行数:70,代码来源:BxAdsModule.php



注:本文中的BxDolEmailTemplates类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BxDolForm类代码示例发布时间:2022-05-23
下一篇:
PHP BxDolDb类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap