帝國(guó)CMS修改步驟:
1.文件修改e/enews/index.php 找到如下代碼
上方加入如下代碼:
view?plaincopy?to?clipboardprint?
//trylife?add?for?feedmail
elseif($enews=='AddFeedback'){
include('../class/q_functions.php');
include('../class/SendEmail.inc.php');
include('../trylife/Mail/FeedMail.php');
}
//trylife?add?for?feedmail
elseif($enews=='AddFeedback'){
include('../class/q_functions.php');
include('../class/SendEmail.inc.php');
include('../trylife/Mail/FeedMail.php');
}
2.文件上傳 FeedMail.php 文件上傳到 e/trylife/Mail/
(如無此文件夾請(qǐng)建立)
3.FeedMail.php文件代碼示例
內(nèi)容:
--------------------------------------------------------------------------------------
{$_POST['saytext']}
--------------------------------------------------------------------------------------
IP:$ip
";??
//執(zhí)行發(fā)信??
$sm=EcmsToSendMail($email,$subject,$text);??
?>
other1.發(fā)件人修改?e/class/SendEmail.inc.php
這個(gè)是修改發(fā)件人的EMAIL是反饋者留的郵箱地址,方便回復(fù)郵件到反饋人的郵箱
//$mailer->From=$r['fromemail'];??
if($_POST['email']){??
$mailer->From=$_POST['email'];??
}??
else{??
$mailer->From=$r['fromemail'];??
}??
//$mailer->FromName=$r['emailname'];??
if($_POST['name']){??
$mailer->FromName=$_POST['name'];??
}??
else{??
$mailer->FromName=$r['emailname'];??
}
//$mailer->From=$r['fromemail'];
if($_POST['email']){
$mailer->From=$_POST['email'];
}
else{
$mailer->From=$r['fromemail'];
}
//$mailer->FromName=$r['emailname'];
if($_POST['name']){
$mailer->FromName=$_POST['name'];
}
else{
$mailer->FromName=$r['emailname'];
}
//2010-06-17 防止字符過濾不嚴(yán)被利用 需要修改上述代碼
里面$_POST['字段']這樣的改為RepPostVar($_POST['字段'])
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 帝國(guó)CMS二次開發(fā)把反饋內(nèi)容發(fā)送到郵箱的代碼