本文整理汇总了PHP中CR3DCQuery::SendEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP CR3DCQuery::SendEmail方法的具体用法?PHP CR3DCQuery::SendEmail怎么用?PHP CR3DCQuery::SendEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CR3DCQuery
的用法示例。
在下文中一共展示了CR3DCQuery::SendEmail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TrimRSlash
require $Root_Path . "includes/siteconfig.php";
require $Root_Path . "includes/language.php";
/**********************************************************************
* TrimRSlash
*
*/
function TrimRSlash($URL)
{
$nLength = strlen($URL);
return $URL[$nLength - 1] == '/' ? substr($URL, 0, $nLength - 1) : $URL;
}
// Posted variables
$txtSubject = $_POST['txtSubject'];
$elm2 = $_POST['elm2'];
// Set the body of the news letter
$bodyp1 = "<html><head><title>" . $txtSubject . "</title></head><body>" . stripslashes($elm2) . "<br><br>" . GetStringFromStringTable("IDS_NEWSLETTER_MAILER_TXT_1", $config) . "<br><a href='" . TrimRSlash($conf['site_url']) . "/chess_close.php'>" . TrimRSlash($conf['site_url']) . "/chess_close.php</a></body></html>";
$From = $conf['registration_email'];
$Name = $conf['site_name'];
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
$aEmail = $oR3DCQuery->ListAvailablePlayersEmail($config);
$nCount = count($aEmail);
$i = 0;
while ($i < $nCount) {
$To = $aEmail[$i];
$oR3DCQuery->SendEmail($To, $From, $Name, $txtSubject, $bodyp1);
$i++;
}
$oR3DCQuery->Close();
unset($oR3DCQuery);
header('Location: ./create_newsletter.php');
示例2: GetStringFromStringTable
for ($i = 0; $i < count($_POST['lstTplayers']); $i++) {
if (trim($_POST['lstTplayers'][$i]) != "") {
$oR3DCQuery->AddTournamentPlayer($config, $TID, trim($_POST['lstTplayers'][$i]));
}
}
}
if ($oR3DCQuery->NewTournamentRequiresApproval() == false) {
$oR3DCQuery->AcceptTournamentproposal($config, $TID);
}
// Email admin about tournament
include $config;
$subject = str_replace("['site_name']", $conf['site_name'], GetStringFromStringTable("IDS_TOURNAMENTPROPOSAL_EMAIL_SUBJECT", $config));
$aFindTag = array("['txttname']", "['slctsDateMonth']", "['slctsDateDay']", "['slctsDateYear']", "['txtstime']", "['slctcpDateMonth']", "['slctcpDateDay']", "['slctcpDateYear']", "['txtcptime']");
$aReplaceTag = array($txttname, $slctsDateMonth, $slctsDateDay, $slctsDateYear, $txtstime, $slctcpDateMonth, $slctcpDateDay, $slctcpDateYear, $txtcptime);
$body = str_replace($aFindTag, $aReplaceTag, GetStringFromStringTable("IDS_TOURNAMENTPROPOSAL_EMAIL_BODY", $config));
$oR3DCQuery->SendEmail($conf['registration_email'], $conf['registration_email'], $conf['site_name'], $subject, $body);
}
// Get current time
$todaystime = date("H:i:s");
?>
<html>
<head>
<title><?php
echo GetStringFromStringTable("IDS_PAGETITLES_14", $config);
?>
</title>
<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">
示例3: CheckPlayerBillingTerm
function CheckPlayerBillingTerm($config)
{
include $config;
$db = mysql_connect($conf['database_host'], $conf['database_login'], $conf['database_pass']) or die("Couldn't connect to the database.");
mysql_select_db($conf['database_name']) or die("Couldn't select the database");
/************/
//$result = mysql_query("SELECT * FROM c4m_playerorders WHERE o_orderstatus = 'p' AND DATE_FORMAT('2005-05-07 18:18:18','%Y-%m-%d') >= DATE_FORMAT(o_datedue,'%Y-%m-%d')") or die("Couldn't Check The End Dates.");
$result = mysql_query("SELECT * FROM c4m_playerorders WHERE o_orderstatus = 'p' AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(o_datedue,'%Y-%m-%d')") or die("Couldn't Check The End Dates.");
/***********/
$num = mysql_numrows($result);
$i = 0;
while ($i < $num) {
$o_id = mysql_result($result, $i, "o_id");
$o_username = mysql_result($result, $i, "o_username");
$o_firstname = mysql_result($result, $i, "o_firstname");
$o_lastname = mysql_result($result, $i, "o_lastname");
$o_address = mysql_result($result, $i, "o_address");
$o_citytown = mysql_result($result, $i, "o_citytown");
$o_country = mysql_result($result, $i, "o_country");
$o_provincestatearea = mysql_result($result, $i, "o_provincestatearea");
$o_postalcode = mysql_result($result, $i, "o_postalcode");
$o_email = mysql_result($result, $i, "o_email");
$o_phonea = mysql_result($result, $i, "o_phonea");
$o_phoneb = mysql_result($result, $i, "o_phoneb");
$o_phonec = mysql_result($result, $i, "o_phonec");
$o_redemptioncode = mysql_result($result, $i, "o_redemptioncode");
$o_dateoforder = mysql_result($result, $i, "o_dateoforder");
$o_paymentterm = mysql_result($result, $i, "o_paymentterm");
$o_datepaid = mysql_result($result, $i, "o_datepaid");
$o_datedue = mysql_result($result, $i, "o_datedue");
$o_orderstatus = mysql_result($result, $i, "o_orderstatus");
//echo "[".$o_id."] ".$o_username." - ".$o_datedue." - ".$o_orderstatus."<br>";
// set order to finished
$update = "UPDATE c4m_playerorders SET o_orderstatus = 'f' WHERE o_id=" . $o_id;
mysql_query($update, $db) or die(mysql_error());
// create new order
$insert = "INSERT INTO c4m_playerorders VALUES(NULL, '" . $o_username . "', '" . $o_firstname . "', '" . $o_lastname . "', '" . $o_address . "', '" . $o_citytown . "', '" . $o_country . "', '" . $o_provincestatearea . "', '" . $o_postalcode . "', '" . $o_email . "', '" . $o_phonea . "', '" . $o_phoneb . "', '" . $o_phonec . "', '', NOW(), '" . $o_paymentterm . "', NULL, NULL, 'u')";
mysql_query($insert, $db) or die(mysql_error());
//Select the new Order ID
$query1 = "SELECT o_id FROM c4m_playerorders WHERE o_username = '" . $o_username . "' AND o_orderstatus='u' ORDER BY o_id DESC LIMIT 1";
$return1 = mysql_query($query1, $db) or die(mysql_error());
$num1 = mysql_numrows($return1);
$orderid = 0;
if ($num1 != 0) {
$orderid = mysql_result($return1, 0, 0);
}
// Send email
$query2 = "SELECT * FROM c4m_emailmessageconfig";
$return2 = mysql_query($query2, $db) or die(mysql_error());
$num2 = mysql_numrows($return2);
if ($num2 != 0) {
$o_regover = mysql_result($return2, 0, "o_regover");
$subject = "Chess Membership Renewal";
// configure message body
$body = $o_regover;
$body = str_replace("[NAME]", $o_firstname . " " . $o_lastname, $body);
$body = str_replace("[OID]", $orderid, $body);
$body = str_replace("[UNAME]", $o_username, $body);
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
$oR3DCQuery->SendEmail($o_email, $conf['registration_email'], $conf['site_name'], $subject, $body);
$oR3DCQuery->Close();
unset($oR3DCQuery);
}
$i++;
}
}