| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/cooperative/sell/ |
Upload File : |
<?
ob_start();
session_start();
if($_SESSION["adminlogin"]=="")
{
header('location:index.php');
exit();
}
//============ Start Session และทำการเรียก Function ติดต่อฐานข้อมูล
require_once('../connect/connect.php');
//=========== กรณีมีการส่งอีเมล์
if($_GET["Action"]=="Send")
{
$header= "Content-type: text/html; charset=windows-874\n";
$header.="from: ".($_POST["txtEmail"])."\nreply-to: ".($_POST["txtEmail"])."";
$subject="".$_POST["txtSubject"]."";
$msg="<u>มีรายละเอียดดังนี้</u>";
$msg.="<br><br>=============================";
$msg.="<br><br>".nl2br($_POST["txtDescription"])." ";
$msg.="<br><br>=============================";
$msg.="<br>ส่งโดยแอดมิน<br>";
$msg.="=============================";
echo"<script language=\"JavaScript\">";
echo"alert('ส่งอีเมล์เรียบร้อย');window.location='sendmail.php';";
echo"</script>";
$sql="select * from member where 1";
$query=mysql_query($sql);
while($result=mysql_fetch_array($query))
{
@mail($result["Email"],$subject,$msg,$header);
}
}
?>
<html>
<title>..:: ระบบจัดการฐานข้อมูล ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/styles.css" type="text/css">
<div align="center"><br>
<table cellspacing=1 cellpadding=4 width="68%" bgcolor=#cccccc border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="100%" bgcolor="#FFFFFF"> <div align="center"></div>
<table cellspacing=1 cellpadding=4 width="100%" border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="35%" bgcolor="#FFFFFF"> <div align="left"><b><img src="../image/allrowto.gif" width="11" height="11" align="absbottom">
ส่งอีเมล์</b></div></td>
<td width="22%" align=middle bgcolor="#FFFFFF"> <div align="left">
</div></td>
<td width="43%" bgcolor="#FFFFFF"> <div align="right"><a href="head.php">กลับไปหน้าหลัก</a></div></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</div>
<form name="frmMain" method="post" action="<?=$_SERVER['PHP_SELF'];?>?Action=Send" enctype="multipart/form-data" onSubmit="return checkvalue();">
<table cellspacing=1 cellpadding=3 width="68%" bgcolor=#cccccc border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="31" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="24%"> </td>
<td width="76%"><script language="JavaScript">
function checkvalue()
{
if(document.all.txtSubject.value=="")
{
alert('กรุณากรอก เรื่อง');
document.all.txtSubject.focus();
return false;
}
if(document.all.txtDescription.value=="")
{
alert('กรุณากรอก รายละเอียด');
document.all.txtDescription.focus();
return false;
}
if(document.all.txtEmail.value=="")
{
alert('กรุณากรอก อีเมล์ ');
document.all.txtEmail.focus();
return false;
}
}
</script></td>
</tr>
<tr>
<td valign="top">เรื่อง <font color="#FF0000">** </font></td>
<td><input name="txtSubject" type="text" class="txtbox" id="txtSubject" value="<?=$_POST["txtSubject"];?>" size="50" maxlength="100">
</td>
</tr>
<tr>
<td valign="top">รายละเอียด <font color="#FF0000">** </font></td>
<td><textarea name="txtDescription" cols="100" rows="20" class="txtbox" id="txtDescription"><?=$_POST["txtDescription"];?></textarea></td>
</tr>
<tr>
<td valign="top">ส่งจากอีเมล์ <font color="#FF0000">** </font></td>
<td><input name="txtEmail" type="text" class="txtbox" id="txtEmail" value="<?=$_POST["txtEmail"];?>" size="40" maxlength="150"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input name="Submit" type="submit" class="button" value="ส่งอีเมล์">
<input name="cancel" type="button" class="button" id="cancel" value="ยกเลิก" onclick="window.location='head.php';"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
</tbody>
</table>
</form>