本文整理汇总了PHP中Emails::send方法的典型用法代码示例。如果您正苦于以下问题:PHP Emails::send方法的具体用法?PHP Emails::send怎么用?PHP Emails::send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Emails
的用法示例。
在下文中一共展示了Emails::send方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
// complete selling process.
// Enter any code here that you want to be executed after a successful
// payment.
$payment_id = intval($_REQUEST['payment_id']);
$line = stripslashes_array(sql_row('select * from translines where id="' . $payment_id . '"'));
if ($line['amount'] == $_REQUEST['lr_amnt']) {
$query = 'update translines set stamp="' . Project::getInstance()->getNow() . '", status="1", batch="' . $_REQUEST["lr_transfer"] . '" where id="' . $payment_id . '"';
sql_query($query);
$user = stripslashes_array(sql_row('SELECT * FROM users WHERE id="' . $line['user_id'] . '"'));
if ($user['deposit_notify']) {
include_once LIB_ROOT . '/emails.class.php';
$plan = stripslashes_array(sql_row('SELECT * FROM plans WHERE id="' . $line['plan_id'] . '"'));
//%user_fullname%, %user_login%, %amount%, %batch%, %access_time%, %account%, %plan_name%, %project_name%, %project_email%
$params = array('%user_fullname%' => htmlspecialchars($user['fullname']), '%user_login%' => $user['login'], '%account%' => $_REQUEST['lr_paidby'], '%amount%' => $_REQUEST['lr_amnt'], '%batch%' => $_REQUEST['lr_transfer'], '%plan_name%' => htmlspecialchars($plan['name']), '%project_name%' => get_setting('project_name'), '%project_email%' => get_setting('project_email'), '%access_time%' => date('M d, Y H:i', Project::getInstance()->getNow()));
$email = new Emails($user['id'], 'deposit_notify', $params);
$email->send();
}
if (!empty($user['referral'])) {
$referral_id = sql_get('select id from users where login="' . trim($user['referral']) . '" limit 1');
if ($referral_id) {
$referral_bonus = $line['amount'] * get_setting('referral_bonus') / 100;
sql_query('insert into translines values (0, 0, "' . $referral_id . '", "", "r", "' . $referral_bonus . '", "' . Project::getInstance()->getNow() . '", "1", "Bonus from: ' . $user['login'] . '")');
$ref_msg = $user['login'] . '->' . $user['referral'] . ':' . $line['amount'] . "\n";
if (REFERRAL_ONCE) {
sql_query('update users set referral="" where id="' . $user['id'] . '"');
}
}
}
$msgBody = "Payment was verified and is successful.\n\n";
}
} else {