|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/abtechsci/mmc15/ezupload/cp/ |
Upload File : |
<?php
require("header.php");
//include('Mail.php');
$sender=$_POST["sender"];
$subject=$_POST["subject"];
$message=$_POST["message"];
$submit=$_POST["submit"];
if($submit != "" )
{
if(empty($sender)) $result = "<font color=red ><b>Sender is empty</b></font>";
if(empty($subject)) $result = "<font color=red ><b>subject is empty</b></font>";
if(empty($message))$result = "<font color=red ><b>Message is empty</b></font>";
$headers = 'From: $sender' . "\r\n" .
'Reply-To: $sender' . "\r\n" ;
$user=new user();
$users=$user->get("");
$emails = array();
$x = array();
foreach($users as $user)
{
if(@mail($user->email,$subject,$message ,$headers )) $x[]="sent";
}
if(empty($result))
$result = "<font color=red ><b>Email has been sent successfully</b></font>";
}
?>
<HTML><HEAD><TITLE>Control Panel</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<LINK href="f_files/global.css" type=text/css rel=stylesheet>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
</HEAD>
<BODY <?php if($error !=""){ echo "onLoad=\"alert('$error')\"" ; } ?> >
<div align="center">
<table width="100" cellpadding="0" cellspacing="0" class="main_table" id="table1">
<tr>
<td>
<TABLE height="447" cellSpacing=0 cellPadding=0 width="770" id="table2" bgcolor="#FFFFFF">
<?php require("cp_header.php")?>
<tr>
<TD height=271 bgcolor="#FFFFFF">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="748" id="table3" height="208">
<tr>
<td height="14" width="748"></td>
</tr>
<tr>
<td height="14" width="748"></td>
</tr>
<tr>
<td height="187">
<div align="center">
<table width="583" height="217" border="0" cellpadding="0" cellspacing="0" class="main_table" id="table4">
<form method="POST" action="sm.php">
<tr>
<td width="579" colspan="2" valign="middle" bgcolor="#C1D1FF" class="t_header"><div class="div_1">Send message to all users</div></td>
</tr>
<tr>
<td colspan="2" valign="middle" class="td_1">
<?php echo $result; ?></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="579" height="24" align="left" valign="middle" class="td_1"><div class="div_1">
Sender email address</div></td>
<td width="579" valign="middle" class="td_2">
<div class="div_1"><input name="sender" type="text" value="<?php echo $sender ; ?>" size="29"></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="579" height="24" align="left" valign="middle" class="td_1">
<div class="div_1">Subject</div></td>
<td width="579" valign="middle" class="td_2">
<div class="div_1"><input type="text" name="subject" size="29" value="<?php echo $subject ; ?>" ></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="579" height="173" align="left" valign="middle" class="td_1"><div class="div_1">Message</div></td>
<td width="579" class="td_2">
<div class="div_1"><textarea rows="8" name="message" cols="50"><?php echo $message ; ?></textarea>
</div></td>
</tr>
</form>
</table>
<br>
<input name="submit" type="submit" class="button" value=" Send ">
</div> </td>
</tr>
<tr>
<td>
<p align="center"> </p>
<p align="center"><a href="emailist.php">Back </a><br>
</td>
</tr>
</table>
</div> </TD>
</tr>
</TABLE> </td>
</tr>
<?php include("footer.php"); ?>
</table>
</div>
<p align="center"> </p>
</BODY>
</HTML>