| Server IP : 74.208.236.52 / Your IP : 216.73.217.12 Web Server : Apache System : Linux infong527 4.4.400-icpu-115 #2 SMP Mon Jul 6 08:15:05 UTC 2026 x86_64 User : u44043973 ( 5404757) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /homepages/18/d194259149/htdocs/bonus1/admin/ |
Upload File : |
<?php
session_start();
include "../config.php";
include "../header.php";
include "../style.php";
$Subject = $_POST['Subject'];
$Message = $_POST['Message'];
if( session_is_registered("alogin") ) {
?><table>
<tr>
<td width="15%" valign=top><br>
<? include("adminnavigation.php"); ?>
</td>
<td valign="top" align="center"><br><br> <?
echo "<font size=2 face='$fonttype' color='$fontcolour'><p><b><center>";
if (empty($Message)) {
echo "Message field is empty, please click your browsers 'back' button.";
exit;
}
if($_POST['Member']) {
echo "Sending to ".$_POST['Member'].". Please be patient...";
$query = "SELECT userid, name, pword, contact_email FROM members where status=1 and userid = '".trim($_POST['Member'])."' and deleted='' LIMIT 1";
$result = mysql_query ($query)
or die ("Query failed");
$num_rows = @mysql_num_rows($result);
} elseif($_POST['ADate']) {
echo "Sending to all active members that joined after ".$_POST['ADate'].". Please be patient...";
$query = "SELECT userid, name, pword, contact_email FROM members where status=1 and joindate >= '".trim($_POST['ADate'])."' and deleted=''";
$result = mysql_query ($query)
or die ("Query failed");
$num_rows = @mysql_num_rows($result);
} elseif($_POST['memtype']) {
$memtype = $_POST['memtype'];
if($memtype=='PRO') echo "Sending to all $proname members. Please be patient...";
elseif($memtype=='PRO2') echo "Sending to all $pro2name members. Please be patient...";
else echo "Sending to all Free members. Please be patient...";
$query = "SELECT distinct userid, name, pword, contact_email FROM members where status=1 and memtype = '$memtype' and deleted=''";
$result = mysql_query ($query)
or die ("Query failed");
$num_rows = mysql_num_rows($result);
} else {
echo "Sending to all active members. Please be patient...";
$query = "SELECT distinct userid, name, pword, contact_email FROM members where status=1 and deleted=''";
$result = mysql_query ($query)
or die ("Query failed");
$num_rows = mysql_num_rows($result);
}
$query1 = "SELECT * FROM pages WHERE name='Admin email footer ad'";
$result1 = mysql_query ($query1);
$line1 = mysql_fetch_array($result1);
$htmlcode = $line1["htmlcode"];
if($htmlcode) $htmlcode = "\n$htmlcode\n\n";
$line = "";
$Subjectold = $Subject;
$Messageold = $Message;
while ($line = @mysql_fetch_array($result)) {
$name = $line["name"];
$userid = $line['userid'];
$password = $line['pword'];
$contactemail = $line["contact_email"];
//reset values.
$headers = "";
$Subject = $Subjectold;
$Message = $Messageold;
//replace the merge fields.
$Subject = stripslashes($Subject);
$Subject = str_replace("~userid~",$userid,$Subject);
$Subject = str_replace("~name~",$name,$Subject);
$Subject = str_replace("~password~",$password,$Subject);
$Message = stripslashes($Message);
$Message = str_replace("~userid~",$userid,$Message);
$Message = str_replace("~name~",$name,$Message);
$Message = str_replace("~password~",$password,$Message);
$Message = str_replace("~email~",$contactemail,$Message);
$name = trim($name);
if(strpos($name, " ")) $firstname = substr($name , 0, strpos($name, " "));
else $firstname = $name;
$Message = str_replace("~fname~",$firstname,$Message);
$Subject = str_replace("~fname~",$firstname,$Subject);
$Message = "*********************\nAs a valued member of $sitename you have agreed to receive contact from us.\nIf you no longer want our messages, follow the instructions at the bottom.\n*********************\n\n".$Message."\n\n*********************\n".$htmlcode."You are receiving this as you are a member of $sitename.\nYou can opt out of receiving emails only by deleting your account, click here to delete your account.\n\n$domain/delete.php?userid=$userid&code=".md5($password)."\n\n$sitename\n$adminaddress";
$headers .= "From: $sitename<$adminemail>\n";
$headers .= "Reply-To: <$adminemail>\n";
$headers .= "X-Sender: <$adminemail>\n";
$headers .= "X-Mailer: PHP4\n";
$headers .= "X-Priority: 3\n";
$headers .= "Return-Path: <$adminemail>\n";
mail($contactemail, $Subject, $Message,$headers)
or print "Failed to send email.";
}
echo "<br><br><center><b>Message sent to $num_rows members.</b></center>";
?>
</td>
</tr>
</table>
<?
}
else {
echo "Unauthorised Access!";
}
include "../footer.php";
mysql_close($dblink);
?>