1.修改e/enews/gbookfun.php文件找到function AddGbook函數(shù),
在這個函數(shù)下面找到
$reurl=DoingReturnUrl("../tool/gbook/?bid=$bid",$add['ecmsfrom']);
在其下面加入以下代碼
@include("../class/SendEmail.inc.php");
SendNoticeToAdmin("收到新留言",$_POST);
2.找到e/class/SendEmail.inc.php,結(jié)尾下加入以下代碼
//給管理員信箱發(fā)送通知郵件新增函數(shù)
function SendNoticeToAdmin($subject,$body){
global $empire,$dbtbpre;
$empire=new mysqlquery();
$pr=$empire->fetch1("select email from {$dbtbpre}enewspublic limit 1");
if(is_array($body)){
foreach($body as $value){
$key=key($body);
next($body);
$msgtext .= "$key:"."$value"."n";
}
}else{
$msgtext=$body;
}
$msgtext .= "rnrn此郵件由系統(tǒng)自動發(fā)出,請管理員盡快處理nr";
$sm=EcmsToSendMail($pr['email'],$subject,$msgtext);
return $sm;
}