本文整理汇总了PHP中EmailTemplate::getTemplateInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailTemplate::getTemplateInfo方法的具体用法?PHP EmailTemplate::getTemplateInfo怎么用?PHP EmailTemplate::getTemplateInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmailTemplate
的用法示例。
在下文中一共展示了EmailTemplate::getTemplateInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: forgotPasswordMail
function forgotPasswordMail($argArrPOST)
{
$objTemplate = new EmailTemplate();
$objValid = new Validate_fields();
$objCore = new Core();
$objGeneral = new General();
$objValid->check_4html = true;
$_SESSION['sessForgotValues'] = array();
$objValid->add_text_field('Login ID', strip_tags($argArrPOST['frmUserName']), 'text', 'y', 255);
$objValid->add_text_field('Verification Code', strip_tags($argArrPOST['frmSecurityCode']), 'text', 'y', 255);
if (!$objValid->validation()) {
$errorMsg = $objValid->create_msg();
}
if ($errorMsg) {
$_SESSION['sessForgotValues'] = $argArrPOST;
$objCore->setErrorMsg($errorMsg);
return false;
} else {
if ($_SESSION['security_code'] == $argArrPOST['frmSecurityCode'] && !empty($_SESSION['security_code'])) {
$varWhereCond = " AND ClientEmailAddress ='" . $argArrPOST['frmUserName'] . "'";
$userRecords = $this->getClientNumRows($varWhereCond);
$userInfo = $this->getClientInfo($varWhereCond);
if ($userRecords > 0) {
$varClientID = $userInfo['0']['pkClientID'];
$varMemberData = trim(strip_tags($argArrPOST['frmUserName']));
$varForgotPasswordCode = $objGeneral->getValidRandomKey(TABLE_CLIENTS, array('pkClientID'), 'ClientForgotPWCode', '25');
$varForgotPasswordLink = '<a href="' . SITE_ROOT_URL . 'clients/reset_password.php?mid=' . $varClientID . '&code=' . $varForgotPasswordCode . '">' . SITE_ROOT_URL . 'clients/reset_password.php?mid=' . $varClientID . '&code=' . $varForgotPasswordCode . '</a>';
$arrColumns = array('ClientForgotPWStatus' => 'Active', 'ClientForgotPWCode' => $varForgotPasswordCode);
$varWhereCondition = 'pkClientID = \'' . $varClientID . '\'';
$this->update(TABLE_CLIENTS, $arrColumns, $varWhereCondition);
$varClientEmail = $userInfo[0]['ClientEmailAddress'];
$varToUser = $varClientEmail;
$varFromUser = SITE_NAME . '<' . $varClientEmail . '>';
$varSiteName = SITE_NAME;
$varWhereTemplate = ' EmailTemplateTitle= \'Forgot password\' AND EmailTemplateStatus = \'Active\' ';
$arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
$varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
$varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
$varSubject = str_replace('{PROJECT_NAME}', SITE_NAME, html_entity_decode(stripcslashes($arrMailTemplate['0']['EmailTemplateSubject'])));
$varKeyword = array('{IMAGE_PATH}', '{MEMBER}', '{PROJECT_NAME}', '{USER_DATA}', '{FORGOT_PWD_LINK}', '{SITE_NAME}');
$varKeywordValues = array($varPathImage, 'Client', SITE_NAME, $varMemberData, $varForgotPasswordLink, SITE_NAME);
$varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
$objCore->sendMail($varToUser, $varFromUser, $varSubject, $varOutPutValues);
$_SESSION['sessForgotValues'] = '';
$objCore->setSuccessMsg(ADMIN_FORGOT_PASSWORD_CONFIRM_MSG);
return true;
} else {
$_SESSION['sessForgotValues'] = $argArrPOST;
$objCore->setErrorMsg(EMAIL_NOT_EXIST_MSG);
return true;
}
} else {
$_SESSION['sessForgotValues'] = $argArrPOST;
$objCore->setErrorMsg(INVALID_SECURITY_CODE_MSG);
return false;
}
}
}
示例2: sendMailToUser
function sendMailToUser($argPost)
{
$objTemplate = new EmailTemplate();
$objCore = new Core();
$objAdminLogin = new AdminLogin();
$arrAdminInfo = $objAdminLogin->getAdminInfo($varWhere);
$varToAdmin = $arrAdminInfo[0]['AdminEmail'];
$varFrom = SITE_NAME . '<' . $varToAdmin . '>';
$varSiteName = SITE_NAME;
$varPathImage = "<img src='" . SITE_ROOT_URL . "admin/images/logo.jpg'";
//echo $varPathImage;
$varWhereTemplate = ' EmailTemplateTitle = binary \'Subscribed NewsLetter admin\' AND EmailTemplateStatus = \'Active\' ';
$arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
$varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
$varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
$varKeyword = array('{IMAGE_PATH}', '{MEMBER}', '{SITE_NAME}');
$varKeywordValues = array($varPathImage, $argPost['frmSubscriberEmail'], $varSiteName);
$varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
//echo $varOutPutValues;exit;
$varSubject = str_replace('{SITE_NAME}', $varSiteName, $varSubject);
//send email
$objCore->sendMail($varToAdmin, $varFrom, $varSubject, $varOutPutValues);
//send mail to user
$varWhereTemplate = ' EmailTemplateTitle = binary \'Subscribed NewsLetter\' AND EmailTemplateStatus = \'Active\' ';
$arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
$varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
$varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
$varKeyword = array('{IMAGE_PATH}', '{MEMBER}', '{SITE_NAME}');
$varKeywordValues = array($varPathImage, $argPost['frmSubscriberEmail'], $varSiteName);
$varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
//echo $varOutPutValues;exit;
$varSubject = str_replace('{SITE_NAME}', $varSiteName, $varSubject);
$varTo = $argPost['frmSubscriberEmail'];
//echo $varOutPutValues;die;
$objCore->sendMail($varTo, $varFrom, $varSubject, $varOutPutValues);
}
示例3: sendChangePassMailToUser
function sendChangePassMailToUser($argArrPOST)
{
$objTemplate = new EmailTemplate();
$objCore = new Core();
$objAdminLogin = new AdminLogin();
$varWhere = '';
$arrAdminResult = $objAdminLogin->getAdminInfo($varWhere);
$varAdminEmail = $arrAdminResult['0']['AdminEmail'];
$varPath = "<img src = " . SITE_ROOT_URL . 'common/images/logo.jpg' . ">";
$varFirstName = $_SESSION['sessCustomerFirstName'];
$varUserName = $_SESSION['sessCustomerUserName'];
$varFrom = SITE_NAME . '<' . $varAdminEmail . '>';
$varSiteName = SITE_NAME;
$varWhereTemplate = ' EmailTemplateTitle = binary \'Change User Password\' AND EmailTemplateStatus = \'Active\' ';
$arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
$varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
$varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
$varKeyword = array('{IMAGE_PATH}', '{NAME}', '{SITE_NAME}', '{USER_NAME}');
$varKeywordValues = array($varPath, $varFirstName, $varSiteName, $varUserName);
$varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
$varSubject = str_replace('{SITE_NAME}', $varSiteName, $varSubject);
//send email
$varTo = $varUserName;
$objCore->sendMail($varTo, $varFrom, $varSubject, $varOutPutValues);
}
示例4: contactUs
function contactUs($argArrPOST)
{
$objTemplate = new EmailTemplate();
$objValid = new Validate_fields();
$objCore = new Core();
$objGeneral = new General();
$objValid->check_4html = true;
$varUserUserName = $argArrPOST['frmEmail'];
$varUserFirstName = $argArrPOST['frmName'];
$varUserSubject = $argArrPOST['frmSubject'];
$varMessage = $argArrPOST['frmMessage'];
$objValid->add_text_field('Email', strip_tags($argArrPOST['frmEmail']), 'email', 'y', 255);
$objValid->add_text_field('Name', strip_tags($argArrPOST['frmName']), 'text', 'y', 100);
$objValid->add_text_field('Subject', strip_tags($argArrPOST['frmSubject']), 'text', 'y', 255);
$objValid->add_text_field('Message', strip_tags($argArrPOST['frmMessage']), 'text', 'y');
if ($objValid->validation()) {
$errorMsgFirst = 'Please enter required fields!';
} else {
$errorMsg = $objValid->create_msg();
}
if ($errorMsg) {
$objCore->setErrorMsg($errorMsg);
return false;
} else {
$objAdminLogin = new AdminLogin();
$varWhere = '';
$arrAdminResult = $objAdminLogin->getAdminInfo($varWhere);
$varAdminEmail = $arrAdminResult['0']['AdminEmail'];
$varPath = "<img src = " . SITE_ROOT_URL . 'common/images/logo.jpg' . ">";
$varFromUser = SITE_NAME . '<' . $varAdminEmail . '>';
$varSiteName = SITE_NAME;
$varWhereTemplate = ' EmailTemplateTitle = binary \'Inquiry email to admin\' AND EmailTemplateStatus = \'Active\' ';
$arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
$varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
$varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
$varKeyword = array('{IMAGE_PATH}', '{SITE_NAME}', '{USER_FNAME}', '{USER_USERNAME}', '{USER_SUBJECT}', '{USER_MESSAGE}');
$varKeywordValues = array($varPath, $varSiteName, $varUserFirstName, $varUserUserName, $varUserSubject, $varMessage);
$varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
$varSubject = str_replace('{SITE_NAME}', $varSiteName, $varSubject);
//echo $varOutPutValues;die;
$objCore->sendMail($varAdminEmail, $varFromUser, $varSubject, $varOutPutValues);
$objCore->setSuccessMsg(ADMIN_CONTACTUS_MSG);
}
}
示例5: sendPaymentInfoMail
function sendPaymentInfoMail($varPaymentStatus, $varOrderID)
{
if ($varPaymentStatus == 'Completed') {
$varWhereTemplate = 'EmailTemplateTitle= binary \'Successful Payment\' AND EmailTemplateStatus = \'Active\' ';
} else {
$varWhereTemplate = 'EmailTemplateTitle= binary \'Unsuccessful Payment\' AND EmailTemplateStatus = \'Active\' ';
}
$objCore = new Core();
$varPath = "<img src = " . SITE_ROOT_URL . 'common/images/logo.jpg' . ">";
/*$varWher = " AND pkMemberID ='".$arrPost['Username']."'";*/
$varToUser = $_SESSION['sessCustomerUserName'];
$varFirstName = $_SESSION['sessCustomerFirstName'];
$varFromUser = SITE_NAME . '<' . $varToUser . '>';
$objTemplate = new EmailTemplate();
$varSiteUrl = '<a href="' . SITE_ROOT_URL . '" />' . SITE_ROOT_URL . '</a>';
$arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
$varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
$varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
$varSubject = str_replace('{SITE_NAME}', SITE_NAME, $varSubject);
$varSubject = str_replace('{Order_ID}', $varOrderID, $varSubject);
$varKeyword = array('{IMAGE_PATH}', '{SITE_NAME}', '{MEMBER}', '{Order_ID}', '{SITE_ROOT_URL}');
$varKeywordValues = array($varPath, SITE_NAME, $varFirstName, $varOrderID, $varSiteUrl);
$varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);
$objCore->sendMail($varToUser, $varFromUser, $varSubject, $varOutPutValues);
/*}
else
{
$objCore = new Core();
$varPath=SITE_ROOT_URL."admin/images/logo.jpg";
/*$arrClm = array('pkMemberID');
$varWher = " MemberUserName ='".$email."'";
$arrResult = $objGeneral->getRecord(TABLE_MEMBER,$arrClm,$varWher);*/
/*$varToUser = $varEmail ;
$varFromUser = SITE_NAME.'<'.$varToUser.'>';
$varSiteName = SITE_NAME;
$varUrlPayment = '<a href="'.SITE_ROOT_URL.'payment_paypal.php?uID='.$arrResult[0]['pkMemberID'].'" />"'.SITE_ROOT_URL.'payment_paypal.php?uID='.$arrResult[0]['pkMemberID'].'"';
$objTemplate = new EmailTemplate();
$varWhereTemplate ='EmailTemplateTitle= binary \'Unsuccessful Payment\' AND EmailTemplateStatus = \'Active\' ';
$arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);
$varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));
$varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));
/*$varSubject = str_replace('{SITE_NAME}',$varSiteName,$varSubject);*/
/*$varKeyword = array('{IMAGE_PATH}','{SITE_NAME}');
$varKeywordValues = array($varPath, SITE_NAME);
$varOutPutValues = str_replace($varKeyword,$varKeywordValues,$varOutput);
$objCore->sendMail($varToUser,$varFromUser,$varSubject,$varOutPutValues);
}*/
}