HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/seekya.com/DEAD/beta/manage/email.php
<?php session_start();
include("../includes/connect.php"); 
include("../includes/func.php");?>
<?php if (empty($_SESSION["admin"])) redirect("index.php?e=1");
//if ($_SESSION["user_type"]!=1) redirect("index.php?e=1");

if ($_POST["email_subject"]!='')
{
	$headers = "From: ".$_POST["email_sender"]." \nContent-Type: text/html";
	if ($_POST["test"]!='1')
	{
	$sql="SELECT * from user_master where user_type=3 and active=1 order by user_id desc";
	$cmd = mysql_query($sql);
	while ($rs = mysql_fetch_array($cmd)) {
		mail($rs["email"],$_POST["email_subject"],$_POST["email_body"],$headers);
		echo $rs["email"];
	}
	}
	else
		{
			mail($_POST["email_sender"],$_POST["email_subject"],$_POST["email_body"],$headers);
		}
		
}
?>
<?php include("includes/header.php"); ?>
<??>

<table width="98%" height="100" border="0" align="center" cellpadding="5" cellspacing="5">
	<tr>
		<td height="50"><span style="font-weight: bold">email To Subscribers</span>
	      <hr size="1">  </td>
	</tr>
	
	
	
	<tr>
		<td class="BlackAri12B" colspan=2><table width="100%" border="0" cellpadding="2" cellspacing="1" class="bgDarkGray">
            
			<?php getErr("4"); ?>
            <tr>
                <td colspan="7" height="10" class="bgWhite"></td>
            </tr>
		<form method=post name=email action="">
			<tr class="bgLightGray">
				<td class="bgExtraLightGray"  colspan="7" valign=top width="80%">
				<font class="bgLightGray" size=1>Message Subject:
				<input type=text name="email_subject" size=50>
				</td>
			</tr>
			<tr class="bgLightGray">
				<td class="bgExtraLightGray"  colspan="7" valign=top width="80%">
				<font class="bgLightGray" size=1>Message Sender:
				<input type=text name="email_sender" size=50>
				</td>
			</tr>

				<tr class="bgLightGray">
				<td class="bgExtraLightGray"  colspan="7" valign=top width="80%">
				<font class="bgLightGray" size=1>Message Body:
				<textarea name="email_body" cols=55 rows=5></textarea>

				</td>

		
				
            </tr>
				<tr class="bgLightGray">
				<td class="bgExtraLightGray"  colspan="7" valign=top width="80%">
				<input type=submit name=submit value="Email"><br>
				<input type=checkbox name=test value=1><font class="bgLightGray" size=1>Test Email ONLY (To Sender)
		</font>

				</td>

		<form>
				
            </tr>
            
        </table></td>
	</tr>
	
	
	<tr>
		<td height="50" align="center">&nbsp;</td>
	</tr>
</table>
</form>

<?php include("includes/footer.php"); ?>