⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sendmessageall.php

📁 通达OA部分源代码
💻 PHP
字号:
<?
include_once("myconnect.php");

if ( $_REQUEST["radiobutton"]=='A' || $_REQUEST["radiobutton"]=='B')
{
			$sql="Select * from sbbleads_members";
			$rs0=mysql_query($sql);
			$cnt=0;
			while ( ($rs=mysql_fetch_array($rs0)) )
			{							
			 $from =$_REQUEST["email"];
			 $to = $rs["sb_email"];
			 $subject = $_REQUEST["subject"];
			 $body = $_REQUEST["message"];
		     $header="From:" . $from . "\r\n" ."Reply-To:". $from  ;
			if(isset($_REQUEST["html"])&&($_REQUEST["html"]=="yes"))
			{
			$header .= "\r\nMIME-Version: 1.0";
			$header .= "\r\nContent-type: text/html; charset=iso-8859-1\r\n";
			}
			//echo $header;
			mail($to,$subject,$body,$header);
			}

}

if ( $_REQUEST["radiobutton"]=='M' || $_REQUEST["radiobutton"]=='B')
{
			$sql="Select * from sbbleads_newsletter";
			$rs0=mysql_query($sql);
			$cnt=0;
			while ( ($rs=mysql_fetch_array($rs0)) )
			{							
			 $from =$_REQUEST["email"];
			 $to = $rs["sb_email"];
			 $subject = $_REQUEST["subject"];
			 $body = $_REQUEST["message"];
		     $header="From:" . $from . "\r\n" ."Reply-To:". $from  ;
			
			if(isset($_REQUEST["html"])&&($_REQUEST["html"]=="yes"))
			{
			$header .= "\r\nMIME-Version: 1.0";
			$header .= "\r\nContent-type: text/html; charset=iso-8859-1\r\n";
			}
			//echo $header;
			 mail($to,$subject,$body,$header);
			}

}


header("Location: ". "adminhome.php?msg=" . urlencode("Your Message has been sent!") );
die();
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -