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

PHP email_collect_extra_info函数代码示例

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

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



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

示例1: str_replace

            $html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\\n', '', EMAIL_CONTACT);
            $html_msg['EMAIL_CLOSURE'] = nl2br(EMAIL_GV_CLOSURE);
            // include create-account-specific disclaimer
            $email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
            $html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
            // send welcome email
            if (trim(EMAIL_SUBJECT) != 'n/a') {
                zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
            }
            // send additional emails
            if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO != '') {
                if ($_SESSION['customer_id']) {
                    $account_query = "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax\n                            from " . TABLE_CUSTOMERS . "\n                            where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
                    $account = $db->Execute($account_query);
                }
                $extra_info = email_collect_extra_info($name, $email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);
                $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
                if (trim(SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT) != 'n/a') {
                    zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
                }
            }
            //endif send extra emails
        }
        zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
    }
    //endif !error
}
/*
 * Set flags for template use:
 */
$selected_country = isset($_POST['zone_country_id']) && $_POST['zone_country_id'] != '' ? $country : SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;
开发者ID:Southern-Exposure-Seed-Exchange,项目名称:Zencart-Bootstrap-Theme,代码行数:31,代码来源:create_account.php


示例2: sprintf

        }
        $email_body .= sprintf(EMAIL_TEXT_LINK, zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']), '', false) . "\n\n" . sprintf(EMAIL_TEXT_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
        $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
        $html_msg['EMAIL_PRODUCT_LINK'] = sprintf(str_replace('\\n\\n', '<br />', EMAIL_TEXT_LINK), '<a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']) . '">' . $product_info->fields['products_name'] . '</a>', '', false);
        $html_msg['EMAIL_TEXT_SIGNATURE'] = sprintf(str_replace('\\n', '', EMAIL_TEXT_SIGNATURE), '');
        // include disclaimer
        $email_body .= "\n\n" . EMAIL_ADVISORY . "\n\n";
        //send the email
        zen_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address, $html_msg, 'tell_a_friend');
        // send additional emails
        if (SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO_STATUS == '1' and SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO != '') {
            if ($_SESSION['customer_id']) {
                $account_query = "SELECT customers_firstname, customers_lastname, customers_email_address\n                          FROM " . TABLE_CUSTOMERS . "\n                          WHERE customers_id = :customersID";
                $account_query = $db->bindVars($account_query, ':customersID', $_SESSION['customer_id'], 'integer');
                $account = $db->Execute($account_query);
            }
            $extra_info = email_collect_extra_info($from_name, $from_email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address']);
            $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
            zen_mail('', SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO, SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO_SUBJECT . ' ' . $email_subject, $email_body . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'tell_a_friend_extra');
        }
        $messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info->fields['products_name'], zen_output_string_protected($to_name)), 'success');
        zen_redirect(zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']));
    }
} elseif ($_SESSION['customer_id']) {
    $account_query = "SELECT customers_firstname, customers_lastname, customers_email_address\n                    FROM " . TABLE_CUSTOMERS . "\n                    WHERE customers_id = :customersID";
    $account_query = $db->bindVars($account_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $account = $db->Execute($account_query);
    $from_name = $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'];
    $from_email_address = $account->fields['customers_email_address'];
}
$breadcrumb->add(NAVBAR_TITLE);
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:header_php.php


示例3: explode

         $customer_name = NOT_LOGGED_IN_TEXT;
     }
     // use contact us dropdown if defined
     if (CONTACT_US_LIST != '') {
         $send_to_array = explode(",", CONTACT_US_LIST);
         preg_match('/\\<[^>]+\\>/', $send_to_array[$_POST['send_to']], $send_email_array);
         $send_to_email = eregi_replace(">", "", $send_email_array[0]);
         $send_to_email = eregi_replace("<", "", $send_to_email);
         $send_to_name = preg_replace('/\\<[^*]*/', '', $send_to_array[$_POST['send_to']]);
     } else {
         //otherwise default to EMAIL_FROM and store name
         $send_to_email = EMAIL_FROM;
         $send_to_name = STORE_NAME;
     }
     // Prepare extra-info details
     $extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email);
     // Prepare Text-only portion of message
     $text_message = OFFICE_FROM . "\t" . $name . "\n" . OFFICE_EMAIL . "\t" . $email_address . "\n\n" . '------------------------------------------------------' . "\n\n" . strip_tags($_POST['enquiry']) . "\n\n" . '------------------------------------------------------' . "\n\n" . $extra_info['TEXT'];
     // Prepare HTML-portion of message
     $html_msg['EMAIL_MESSAGE_HTML'] = strip_tags($_POST['enquiry']);
     $html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $email_address . ')';
     $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
     // Send message
     zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg, 'contact_us');
     zen_redirect(zen_href_link(FILENAME_CONTACT_US, 'action=success'));
 } else {
     $error = true;
     if (empty($name)) {
         $messageStack->add('contact', ENTRY_EMAIL_NAME_CHECK_ERROR);
     }
     if ($zc_validate_email == false) {
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:header_php.php


示例4: zen_mail

        $name = TEXT_EASY_SIGNUP_CUSTOMER_NAME;
        //send welcome email
        zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
        // send additional emails
        if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO != '') {
            /*if ($_SESSION['customer_id']) {
                $account_query = "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax
                                    from " . TABLE_CUSTOMERS . "
                                    where customers_id = '" . (int)$_SESSION['customer_id'] . "'";
                $account_query = "select  customers_email_address, customers_telephone, customers_fax
                                  from   " . TABLE_CUSTOMERS . "
                                  where customers_id = '" . (int)$_SESSION['customer_id'] . "'";
                $account = $db->Execute($account_query);
              }*/
            /*$extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);*/
            $extra_info = email_collect_extra_info($name, $email_address, ' ', $email_address, '', '');
            $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
            zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
        }
        //endif send extra emails
        //user
        if (function_exists('addRewardPointersForRecommender')) {
            addRewardPointersForRecommender();
        }
        //end user
        zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
    }
    //endif !error
}
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_MODULE_END_EASY_CREATE_ACCOUNT');
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:easy_create_account.php


示例5: values

        }
        $sql = "insert into " . TABLE_REVIEWS . "\r\n                              (products_id, customers_id, customers_name, reviews_rating, date_added, status)\r\n                     values ('" . (int) $_GET['products_id'] . "', '" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($customer->fields['customers_firstname']) . ' ' . zen_db_input($customer->fields['customers_lastname']) . "', '" . zen_db_input($rating) . "', now(), " . zen_db_input($review_status) . ")";
        $rs = $db->Execute($sql);
        $insert_id = $db->Insert_ID();
        $sql = "insert into " . TABLE_REVIEWS_DESCRIPTION . "\r\n                          (reviews_id, languages_id, reviews_text)\r\n                     values ('" . (int) $insert_id . "', '" . (int) $_SESSION['languages_id'] . "', '" . zen_db_input($review_text) . "')";
        $db->Execute($sql);
        // send review-notification email to admin
        if (REVIEWS_APPROVAL == '1' && SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO_STATUS == '1' and defined('SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO') and SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO != '') {
            $email_text = sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_INTRO, $product_info->fields['products_name']) . "\n\n";
            $email_text .= sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_DETAILS, $review_text) . "\n\n";
            $email_subject = sprintf(EMAIL_REVIEW_PENDING_SUBJECT, $product_info->fields['products_name']);
            $html_msg['EMAIL_SUBJECT'] = sprintf(EMAIL_REVIEW_PENDING_SUBJECT, $product_info->fields['products_name']);
            $html_msg['EMAIL_MESSAGE_HTML'] = str_replace('\\n', '', sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_INTRO, $product_info->fields['products_name']));
            $html_msg['EMAIL_MESSAGE_HTML'] .= '<br />';
            $html_msg['EMAIL_MESSAGE_HTML'] .= str_replace('\\n', '', sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_DETAILS, $review_text));
            $extra_info = email_collect_extra_info($name, $email_address, $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'], $customer->fields['customers_email_address']);
            $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
            zen_mail('', SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO, $email_subject, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'reviews_extra');
        }
        // end send email
        zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('action'))));
    }
}
$products_price = zen_get_products_display_price($product_info->fields['products_id']);
$products_name = $product_info->fields['products_name'];
if ($product_info->fields['products_model'] != '') {
    $products_model = '<br /><span class="smallText">[' . $product_info->fields['products_model'] . ']</span>';
} else {
    $products_model = '';
}
// set image
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:header_php.php


示例6: module_visitor_to_account


//.........这里部分代码省略.........
                     $sql_data_array['entry_state'] = $state;
                 }
             }
             zen_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '" . (int) $_SESSION['customer_id'] . "' and address_book_id = '" . (int) $_SESSION['customer_default_address_id'] . "'");
             $sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "\r\n                  SET    customers_info_date_account_last_modified = now()\r\n                  WHERE  customers_info_id = :customersID";
             $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
             // phpBB create account
             if ($phpBB->phpBB['installed'] == true) {
                 $phpBB->phpbb_create_account($nick, $password, $email_address);
             }
             // End phppBB create account
             $_SESSION['customer_first_name'] = $firstname;
             $_SESSION['customer_last_name'] = $lastname;
             // ->furikana
             if (FURIKANA_NESESSARY) {
                 $_SESSION['customer_first_name_kana'] = $firstname_kana;
                 $_SESSION['customer_last_name_kana'] = $lastname_kana;
             }
             // <-furikana
             $_SESSION['customer_country_id'] = $country;
             $_SESSION['customer_zone_id'] = $zone_id;
             // restore cart contents
             $_SESSION['cart']->restore_contents();
             // hook notifier class
             $zco_notifier->notify('NOTIFY_LOGIN_SUCCESS_VIA_VISITOR_TO_ACCOUNT');
             // build the message content
             $name = $firstname . ' ' . $lastname;
             if (ACCOUNT_GENDER == 'true') {
                 if ($gender == 'm') {
                     $email_text = sprintf(EMAIL_GREET_MR, $name);
                 } else {
                     $email_text = sprintf(EMAIL_GREET_MS, $name);
                 }
             } else {
                 $email_text = sprintf(EMAIL_GREET_NONE, $name);
             }
             $html_msg['EMAIL_GREETING'] = str_replace('\\n', '', $email_text);
             $html_msg['EMAIL_FIRST_NAME'] = $firstname;
             $html_msg['EMAIL_LAST_NAME'] = $lastname;
             // initial welcome
             $email_text .= EMAIL_WELCOME;
             $html_msg['EMAIL_WELCOME'] = str_replace('\\n', '', EMAIL_WELCOME);
             if (NEW_SIGNUP_DISCOUNT_COUPON != '' and NEW_SIGNUP_DISCOUNT_COUPON != '0') {
                 $coupon_id = NEW_SIGNUP_DISCOUNT_COUPON;
                 $coupon = $db->Execute("select * from " . TABLE_COUPONS . " where coupon_id = '" . $coupon_id . "'");
                 $coupon_desc = $db->Execute("select coupon_description from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . $_SESSION['languages_id'] . "'");
                 $db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id . "', '0', 'Admin', '" . $email_address . "', now() )");
                 // if on, add in Discount Coupon explanation
                 //        $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .
                 $email_text .= "\n" . EMAIL_COUPON_INCENTIVE_HEADER . (!empty($coupon_desc->fields['coupon_description']) ? $coupon_desc->fields['coupon_description'] . "\n\n" : '') . strip_tags(sprintf(EMAIL_COUPON_REDEEM, ' ' . $coupon->fields['coupon_code'])) . EMAIL_SEPARATOR;
                 $html_msg['COUPON_TEXT_VOUCHER_IS'] = EMAIL_COUPON_INCENTIVE_HEADER;
                 $html_msg['COUPON_DESCRIPTION'] = !empty($coupon_desc->fields['coupon_description']) ? '<strong>' . $coupon_desc->fields['coupon_description'] . '</strong>' : '';
                 $html_msg['COUPON_TEXT_TO_REDEEM'] = str_replace("\n", '', sprintf(EMAIL_COUPON_REDEEM, ''));
                 $html_msg['COUPON_CODE'] = $coupon->fields['coupon_code'];
             }
             //endif coupon
             if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
                 $coupon_code = zen_create_coupon_code();
                 $insert_query = $db->Execute("insert into " . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())");
                 $insert_id = $db->Insert_ID();
                 $db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id . "', '0', 'Admin', '" . $email_address . "', now() )");
                 // if on, add in GV explanation
                 $email_text .= "\n\n" . sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . sprintf(EMAIL_GV_REDEEM, $coupon_code) . EMAIL_GV_LINK . zen_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code, 'NONSSL', false) . "\n\n" . EMAIL_GV_LINK_OTHER . EMAIL_SEPARATOR;
                 $html_msg['GV_WORTH'] = str_replace('\\n', '', sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)));
                 $html_msg['GV_REDEEM'] = str_replace('\\n', '', str_replace('\\n\\n', '<br />', sprintf(EMAIL_GV_REDEEM, '<strong>' . $coupon_code . '</strong>')));
                 $html_msg['GV_CODE_NUM'] = $coupon_code;
                 $html_msg['GV_CODE_URL'] = str_replace('\\n', '', EMAIL_GV_LINK . '<a href="' . zen_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code, 'NONSSL', false) . '">' . TEXT_GV_NAME . ': ' . $coupon_code . '</a>');
                 $html_msg['GV_LINK_OTHER'] = EMAIL_GV_LINK_OTHER;
             }
             // endif voucher
             // add in regular email welcome text
             $email_text .= "\n\n" . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_GV_CLOSURE;
             $html_msg['EMAIL_MESSAGE_HTML'] = str_replace('\\n', '', EMAIL_TEXT);
             $html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\\n', '', EMAIL_CONTACT);
             $html_msg['EMAIL_CLOSURE'] = nl2br(EMAIL_GV_CLOSURE);
             // include create-account-specific disclaimer
             $email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
             $html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
             // send welcome email
             zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
             // send additional emails
             if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO != '') {
                 if ($_SESSION['customer_id']) {
                     $account_query = "select customers_firstname, customers_lastname, customers_email_address\r\n                                from " . TABLE_CUSTOMERS . "\r\n                                where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
                     $account = $db->Execute($account_query);
                 }
                 $extra_info = email_collect_extra_info($name, $email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address']);
                 $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
                 zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
             }
             //endif send extra emails
             $_SESSION['navigation']->clear_snapshot();
             zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
         }
         //endif !error
     } else {
         $return = $this->getFormDefault($return);
     }
     return $return;
 }
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:101,代码来源:module.php


示例7: str_replace

    $html_msg['GV_LINK_OTHER'] = EMAIL_GV_LINK_OTHER;
}
// add in regular email welcome text
$email_text .= "\n\n" . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_GV_CLOSURE;
$html_msg['EMAIL_MESSAGE_HTML'] = str_replace('\\n', '', EMAIL_TEXT);
$html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\\n', '', EMAIL_CONTACT);
$html_msg['EMAIL_CLOSURE'] = nl2br(EMAIL_GV_CLOSURE);
// include create-account-specific disclaimer
$email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
$html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
$html_msg['EMAIL_TO_NAME'] = $name;
$html_msg['EMAIL_TO_ADDRESS'] = $email_address;
$html_msg['EMAIL_SUBJECT'] = $EMAIL_SUBJECT;
$html_msg['EMAIL_FROM_NAME'] = $STORE_NAME;
$html_msg['EMAIL_FROM_ADDRESS'] = $EMAIL_FROM;
$extra_info = email_collect_extra_info(STORE_NAME, EMAIL_FROM, $name, $email_address);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
$email_html = zen_build_html_email_from_template('welcome_extra', $html_msg);
//   zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:email_welcome.php


示例8: send_order_email


//.........这里部分代码省略.........
     //added by john 2010-05-04 afterbuy
     $afterbuy_id = '';
     $afterbuy_id_chk = false;
     $email_module_template = 'checkout';
     $afterbuy_id_db = $db->Execute('select afterbuy_id,afterbuy_success,payment_module_code  from ' . TABLE_ORDERS . ' where orders_id=' . (int) $zf_insert_id);
     if ($afterbuy_id_db->RecordCount() == 1) {
         if ($afterbuy_id_db->fields['afterbuy_success'] == 1) {
             $afterbuy_id_chk = true;
             $afterbuy_id = $afterbuy_id_db->fields['afterbuy_id'];
             $html_msg['AFTERBUY_ID'] = $afterbuy_id;
             $html_msg['EMAIL_TEXT_AFTERBUY_ID_TIP1'] = EMAIL_TEXT_AFTERBUY_ID_TIP1;
         } else {
             $html_msg['AFTERBUY_ID'] = '';
             $html_msg['EMAIL_TEXT_AFTERBUY_ID_TIP1'] = '';
         }
     }
     //end
     $email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" . $this->customer['firstname'] . ' ' . $this->customer['lastname'] . "\n\n" . EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" . ($afterbuy_id_chk == true ? EMAIL_TEXT_AFTERBUY_ID_TIP1 . $afterbuy_id . "\n" : '') . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
     $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
     $html_msg['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM;
     $html_msg['INTRO_STORE_NAME'] = STORE_NAME;
     $html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
     $html_msg['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW;
     $html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
     $html_msg['INTRO_ORDER_NUMBER'] = $zf_insert_id;
     $html_msg['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED;
     $html_msg['INTRO_DATE_ORDERED'] = strftime(DATE_FORMAT_LONG);
     $html_msg['INTRO_URL_TEXT'] = $htmlInvoiceURL;
     $html_msg['INTRO_URL_VALUE'] = $htmlInvoiceValue;
     //comments area
     if ($this->info['comments']) {
         $email_order .= zen_db_output($this->info['comments']) . "\n\n";
         $html_msg['ORDER_COMMENTS'] = nl2br(zen_db_output($this->info['comments']));
     } else {
         $html_msg['ORDER_COMMENTS'] = '';
     }
     //products area
     $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $this->products_ordered . EMAIL_SEPARATOR . "\n";
     $html_msg['PRODUCTS_TITLE'] = EMAIL_TEXT_PRODUCTS;
     $html_msg['PRODUCTS_DETAIL'] = '<table class="product-details" border="0" width="100%" cellspacing="0" cellpadding="2">' . $this->products_ordered_html . '</table>';
     //order totals area
     $html_ot .= '<td class="order-totals-text" align="right" width="100%">' . '&nbsp;' . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' . '---------' . '</td> </tr>' . "\n" . '<tr>';
     for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
         $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
         $html_ot .= '<td class="order-totals-text" align="right" width="100%">' . $order_totals[$i]['title'] . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' . $order_totals[$i]['text'] . '</td> </tr>' . "\n" . '<tr>';
     }
     $html_msg['ORDER_TOTALS'] = '<table border="0" width="100%" cellspacing="0" cellpadding="2"> ' . $html_ot . ' </table>';
     //addresses area: Delivery
     $html_msg['HEADING_ADDRESS_INFORMATION'] = HEADING_ADDRESS_INFORMATION;
     $html_msg['ADDRESS_DELIVERY_TITLE'] = EMAIL_TEXT_DELIVERY_ADDRESS;
     $html_msg['ADDRESS_DELIVERY_DETAIL'] = $this->content_type != 'virtual' ? zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, '', "<br />") : 'n/a';
     $html_msg['SHIPPING_METHOD_TITLE'] = HEADING_SHIPPING_METHOD;
     $html_msg['SHIPPING_METHOD_DETAIL'] = zen_not_null($this->info['shipping_method']) ? $this->info['shipping_method'] : 'n/a';
     if ($this->content_type != 'virtual') {
         $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], 0, '', "\n") . "\n";
     }
     //addresses area: Billing
     $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], 0, '', "\n") . "\n\n";
     $html_msg['ADDRESS_BILLING_TITLE'] = EMAIL_TEXT_BILLING_ADDRESS;
     $html_msg['ADDRESS_BILLING_DETAIL'] = zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, '', "<br />");
     if (is_object($GLOBALS[$_SESSION['payment']])) {
         $cc_num_display = isset($this->info['cc_number']) && $this->info['cc_number'] != '' ? substr($this->info['cc_number'], 0, 4) . str_repeat('X', strlen($this->info['cc_number']) - 8) . substr($this->info['cc_number'], -4) . "\n\n" : '';
         $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
         $payment_class = $_SESSION['payment'];
         $email_order .= $GLOBALS[$payment_class]->title . "\n\n";
         $email_order .= isset($this->info['cc_type']) && $this->info['cc_type'] != '' ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '';
         $email_order .= $GLOBALS[$payment_class]->email_footer ? $GLOBALS[$payment_class]->email_footer . "\n\n" : '';
     } else {
         $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
         $email_order .= PAYMENT_METHOD_GV . "\n\n";
     }
     $html_msg['PAYMENT_METHOD_TITLE'] = EMAIL_TEXT_PAYMENT_METHOD;
     $html_msg['PAYMENT_METHOD_DETAIL'] = is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV;
     $html_msg['PAYMENT_METHOD_FOOTER'] = is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '' ? nl2br($GLOBALS[$payment_class]->email_footer) : (isset($this->info['cc_type']) && $this->info['cc_type'] != '' ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '');
     // include disclaimer
     $email_order .= "\n-----\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
     // include copyright
     $email_order .= "\n-----\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";
     while (strstr($email_order, '&nbsp;')) {
         $email_order = str_replace('&nbsp;', ' ', $email_order);
     }
     $html_msg['EMAIL_FIRST_NAME'] = $this->customer['firstname'];
     $html_msg['EMAIL_LAST_NAME'] = $this->customer['lastname'];
     //  $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
     $html_msg['EXTRA_INFO'] = '';
     $zco_notifier->notify('NOTIFY_ORDER_INVOICE_CONTENT_READY_TO_SEND', array('zf_insert_id' => $zf_insert_id, 'text_email' => $email_order, 'html_email' => $html_msg));
     zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order, STORE_NAME, EMAIL_FROM, $html_msg, $email_module_template, $this->attachArray);
     // send additional emails
     if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
         $extra_info = email_collect_extra_info('', '', $this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], $this->customer['telephone']);
         $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
         if ($GLOBALS[$_SESSION['payment']]->auth_code || $GLOBALS[$_SESSION['payment']]->transaction_id) {
             $pmt_details = 'AuthCode: ' . $GLOBALS[$_SESSION['payment']]->auth_code . '  TransID: ' . $GLOBALS[$_SESSION['payment']]->transaction_id . "\n\n";
             $email_order = $pmt_details . $email_order;
             $html_msg['EMAIL_TEXT_HEADER'] = nl2br($pmt_details) . $html_msg['EMAIL_TEXT_HEADER'];
         }
         zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, $email_module_template, $this->attachArray);
     }
     $zco_notifier->notify('NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL');
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:101,代码来源:order.php


示例9: zen_href_link

        $gv_email .= EMAIL_GV_LINK . ' ' . zen_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $id1, 'NONSSL');
        $gv_email .= "\n\n";
        $gv_email .= EMAIL_GV_FIXED_FOOTER . "\n\n";
        $gv_email .= EMAIL_GV_SHOP_FOOTER;
        $gv_email_subject = sprintf(EMAIL_GV_TEXT_SUBJECT, $_POST['send_name']);
        // include disclaimer
        $gv_email .= "\n\n" . EMAIL_ADVISORY . "\n\n";
        $html_msg['EMAIL_GV_FIXED_FOOTER'] = str_replace(array("\r\n", "\n", "\r", "-----"), '', EMAIL_GV_FIXED_FOOTER);
        $html_msg['EMAIL_GV_SHOP_FOOTER'] = EMAIL_GV_SHOP_FOOTER;
        // send the email
        zen_mail('', $_POST['email'], $gv_email_subject, nl2br($gv_email), STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send');
        // send additional emails
        if (SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_STATUS == '1' and SEND_EXTRA_GV_CUSTOMER_EMAILS_TO != '') {
            if ($_SESSION['customer_id']) {
                $account_query = "select customers_firstname, customers_lastname, customers_email_address\r\n                            from " . TABLE_CUSTOMERS . "\r\n                            where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
                $account = $db->Execute($account_query);
            }
            $extra_info = email_collect_extra_info($_POST['to_name'], $_POST['email'], $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address']);
            $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
            zen_mail('', SEND_EXTRA_GV_CUSTOMER_EMAILS_TO, SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_SUBJECT . ' ' . $gv_email_subject, $gv_email . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send_extra');
        }
        // do a fresh calculation after sending an email
        $gv_query = "select amount\r\n                   from " . TABLE_COUPON_GV_CUSTOMER . "\r\n                   where customer_id = '" . $_SESSION['customer_id'] . "'";
        $gv_result = $db->Execute($gv_query);
    }
}
$gv_current_balance = $gv_result->fields['amount'];
if ($_GET['action'] == 'complete') {
    zen_redirect(zen_href_link(FILENAME_GV_SEND, 'action=doneprocess'));
}
$breadcrumb->add(NAVBAR_TITLE);
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:header_php.php


示例10: sprintf

        $email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
        $html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
        // send welcome email
        zen_mail($name, $faqs_contact_mail, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'faqssubmit');
        // send additional emails
        if (SEND_FAQ_SUBMIT_EMAILS_TO_EMAILS_TO != '') {
            if ($_SESSION['customer_id']) {
                $account_query = "select customers_firstname, customers_lastname, customers_email_address\n                            from " . TABLE_CUSTOMERS . "\n                            where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
                $account = $db->Execute($account_query);
                $customers_sname = $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'];
                $customers_email_address = $account->fields['customers_email_address'];
            } else {
                $customers_sname = 'Not logged in';
                $customers_email_address = 'Not logged in';
            }
            $extra_info = email_collect_extra_info($name, $faqs_contact_mail, $customers_sname, $customers_email_address);
            $html_msg['EMAIL_MESSAGE_HTML'] = $faqs_name . '<br />' . $faqs_description . '<br />';
            $html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $faqs_contact_mail . ')';
            $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
            zen_mail('', SEND_FAQ_SUBMIT_EMAILS_TO_EMAILS_TO, SEND_EXTRA_SUBMIT_FAQ_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['HTML'], STORE_NAME, EMAIL_FROM, $html_msg, 'contact_us');
        }
        $messageStack->add_session('submit_success', EMAIL_TEXT_APPROVED, 'success');
        zen_redirect(zen_href_link(FILENAME_FAQS_SUBMIT, '', 'SSL'));
    }
}
// faqs breadcrumb
if ($_SESSION['customer_id']) {
    $check_customer = $db->Execute("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'");
    $email = $check_customer->fields['customers_email_address'];
    $name = $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
}
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:header_php.php


示例11: checkout_process

 function checkout_process($notifier)
 {
     global $currencies, $order_totals, $order;
     global $messageStack;
     global $request_type;
     // send lowstock email to admin
     if ($order->email_low_stock != '' and SEND_LOWSTOCK_EMAIL == '1') {
         return true;
     }
     // prepare data
     $customer = $order->customer;
     $GLOBALS['phpmailer']['comments'] = $order->info['comments'];
     $GLOBALS['phpmailer']['content_type'] = $order->content_type;
     $oID = $_SESSION['order_number_created'];
     // get template id
     if ($_SESSION['customer_id'] > 0 && !isset($_SESSION['visitors_id'])) {
         // members
         $email_template_id = MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_MAIL_ID;
     } else {
         //visitors
         $email_template_id = MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_VISITOR_MAIL_ID;
     }
     switch ($notifier) {
         case 'NOTIFY_BEFORE_CREATE_HEADER':
             if (!empty($email_template_id) && is_numeric($email_template_id)) {
                 // template本文取得
                 $id = $email_template_id;
                 $order_id = null;
                 $language_id = $_SESSION['language_id'];
                 $subject = get_email_template_contents($id, $order_id, $language_id, 'subject');
                 if ($subject === false) {
                     // template取得できなければ何もしない
                     return false;
                 }
                 if (strpos($GLOBALS['phpmailer']['Subject'], SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT) !== false) {
                     // admin 宛のメールはsubjectにprefixを付ける
                     $GLOBALS['phpmailer']['Subject'] = SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . zen_db_prepare_input($subject) . EMAIL_ORDER_NUMBER_SUBJECT . $oID;
                 } else {
                     $GLOBALS['phpmailer']['Subject'] = zen_db_prepare_input($subject) . EMAIL_ORDER_NUMBER_SUBJECT . $oID;
                 }
             } else {
                 // idが無効なら何もしない
                 return false;
             }
             break;
         case 'NOTIFY_BEFORE_CREATE_BODY':
             if (!empty($email_template_id) && is_numeric($email_template_id)) {
                 // template本文取得
                 $id = $email_template_id;
                 $order_id = null;
                 $language_id = $_SESSION['language_id'];
                 $contents = get_email_template_contents($id, $order_id, $language_id, 'contents');
                 if ($contents === false) {
                     // template取得できなければ何もしない
                     return false;
                 }
                 // GLOBALSにテンプレートをセット
                 $GLOBALS['phpmailer']['Body'] = zen_db_prepare_input($contents);
                 if (!empty($GLOBALS['phpmailer']['AltBody'])) {
                     $GLOBALS['phpmailer']['AltBody'] = zen_db_prepare_input($contents);
                 }
                 // 置換開始
                 $GLOBALS['phpmailer']['Body'] = replace_order_email($oID, $GLOBALS['phpmailer']['Body'], $id);
                 $GLOBALS['phpmailer']['Body'] = $this->_cleanup_email($GLOBALS['phpmailer']['Body']);
                 if (!empty($GLOBALS['phpmailer']['AltBody'])) {
                     $GLOBALS['phpmailer']['AltBody'] = replace_order_email($oID, $GLOBALS['phpmailer']['AltBody'], $id);
                     $GLOBALS['phpmailer']['AltBody'] = $this->_cleanup_email($GLOBALS['phpmailer']['AltBody']);
                 }
                 // admin 宛には追加情報を付加
                 if (strpos($GLOBALS['phpmailer']['Subject'], SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT) !== false) {
                     $extra_info = email_collect_extra_info('', '', $customer['firstname'] . ' ' . $customer['lastname'], $customer['email_address'], $customer['telephone']);
                     $GLOBALS['phpmailer']['Body'] .= strip_tags($extra_info['TEXT']);
                     if (!empty($GLOBALS['phpmailer']['AltBody'])) {
                         $GLOBALS['phpmailer']['AltBody'] .= strip_tags($extra_info['TEXT']);
                     }
                 }
             } else {
                 // idが無効なら何もしない
                 return false;
             }
             break;
     }
 }
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:83,代码来源:class.email_templates_notifier.php


示例12: customerSendCoupon

 function customerSendCoupon($pFromUser, $pRecipient, $pAmount)
 {
     global $gBitDb, $gBitSmarty, $gCommerceSystem, $currencies;
     $ret = NULL;
     $gBitDb->StartTrans();
     $code = CommerceVoucher::generateCouponCode();
     $gvBalance = CommerceVoucher::getGiftAmount(FALSE);
     $newBalance = $gvBalance - $pAmount;
     if ($new_amount < 0) {
         $error = ERROR_ENTRY_AMOUNT_CHECK;
     } else {
         $gv_query = "UPDATE " . TABLE_COUPON_GV_CUSTOMER . "\n\t\t\t\t\t\t SET `amount` = ?\n\t\t\t\t\t\t WHERE `customer_id` = ?";
         $gBitDb->query($gv_query, array($newBalance, $pFromUser->mUserId));
         $gv_query = "INSERT INTO " . TABLE_COUPONS . " (`coupon_type`, `coupon_code`, `date_created`, `coupon_amount`) values ('G', ?, NOW(), ?)";
         $gv = $gBitDb->query($gv_query, array($code, $pAmount));
         $gvId = zen_db_insert_id(TABLE_COUPONS, 'coupon_id');
         $gv_query = "insert into " . TABLE_COUPON_EMAIL_TRACK . "\t(`coupon_id`, `customer_id_sent`, `emailed_to`, `date_sent`)\n\t\t\t\t\t\tvalues ( ?, ?, ?, now())";
         $gBitDb->query($gv_query, array($gvId, $pFromUser->mUserId, $pRecipient['email']));
         $ret = $code;
         $gv_email_subject = tra('A gift from') . ' ' . $pFromUser->getDisplayName() . ' ' . tra('to') . ' ' . $gCommerceSystem->getConfig('STORE_NAME');
         $gBitSmarty->assign('gvCode', $code);
         $gBitSmarty->assign('gvSender', $pFromUser->getDisplayName());
         $gBitSmarty->assign('gvAmount', $currencies->format($pAmount, false));
         $gBitSmarty->assign('gvRedeemUrl', BITCOMMERCE_PKG_URI . 'index.php?main_page=gv_redeem&gv_no=' . $code);
         if (!empty($pRecipient['message'])) {
             $gBitSmarty->assign('gvMessage', $pRecipient['message']);
         }
         $textMessage = $gBitSmarty->fetch('bitpackage:bitcommerce/gv_send_email_text.tpl');
         $htmlMessage = $gBitSmarty->fetch('bitpackage:bitcommerce/gv_send_email_html.tpl');
         // send the email
         zen_mail('', $pRecipient['email'], $gv_email_subject, $textMessage, STORE_NAME, EMAIL_FROM, $htmlMessage, 'gv_send');
         // send additional emails
         if (SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_STATUS == '1' and SEND_EXTRA_GV_CUSTOMER_EMAILS_TO != '') {
             zen_mail('', SEND_EXTRA_GV_CUSTOMER_EMAILS_TO, $gv_email_subject, $textMessage, STORE_NAME, EMAIL_FROM, $htmlMessage, 'gv_send');
             if ($_SESSION['customer_id']) {
                 $account_query = "select `customers_firstname`, `customers_lastname`, `customers_email_address`\n\t\t\t\t\t\t\t\t\t\tfrom " . TABLE_CUSTOMERS . "\n\t\t\t\t\t\t\t\t\t\twhere `customers_id` = '" . (int) $_SESSION['customer_id'] . "'";
                 $account = $gBitDb->Execute($account_query);
             }
             $extra_info = email_collect_extra_info($pRecipient['to_name'], $pRecipient['email'], $pFromUser->getDisplayName(), $pFromUser->getField('email'));
             $html_msg['EXTRA_INFO'] = $gCommerceSystem->getConfig('TEXT_GV_NAME') . ' Code: ' . $code . '<br/>' . $extra_info['HTML'];
             zen_mail('', SEND_EXTRA_GV_CUSTOMER_EMAILS_TO, tra('[GV CUSTOMER SENT]') . ' ' . $gv_email_subject, $gCommerceSystem->getConfig('TEXT_GV_NAME') . ' Code: ' . $code . "\n" . $gv_email . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send_extra');
         }
     }
     $gBitDb->CompleteTrans();
     return $ret;
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:46,代码来源:CommerceVoucher.php


示例13: send_gift_certificate_email

 public static function send_gift_certificate_email()
 {
     global $db, $error, $messageStack, $mail, $gv_current_balance, $gv_amount;
     require_once 'includes/classes/http_client.php';
     require 'includes/languages/english/gv_send.php';
     // verify no timeout has occurred on the send or process
     if (!$_SESSION['customer_id']) {
         zen_redirect(zen_href_link(FILENAME_TIME_OUT));
     }
     // if the customer is not logged on, redirect them to the login page (for
     // cowoa customers, just a check the session is good)
     if (!$_SESSION['customer_id']) {
         $_SESSION['navigation']->set_snapshot();
         zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
     }
     require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
     // extract sender's name+email from database, s 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP email_ensure_not_disposable函数代码示例发布时间:2022-05-15
下一篇:
PHP email_build_subject函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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