View file public_html/vipadz/sendmail.php

File size: 1.29Kb
<?php
//coded by arshad
//email: arshadwap.com@gmail.com

include '../db.php';
include '../functions.php';

headtag("$SiteName - Mail User");

if($adminlog==1){

$uid=formget("id");

$mohd = mysql_query("SELECT * FROM userdata WHERE id='$uid' LIMIT 50");
$arshad = mysql_fetch_array($mohd);
$to=$arshad["email"];
$user=$arshad["username"];

echo '<div class="title">Mail <font color="red">'.$user.'</font> User</div>';

if (isset($_REQUEST['subject']))
//if "subject" is filled out, send email
  {
  //send email
  $subject = $_REQUEST['subject'] ;
  $body = "Hello ".$user."! <br/>
".$_REQUEST['message'] ." <br/>
<br/>
Please Reply Us At support@earnbuzz.in
Thanks For Using EarnBuzz.In";
Send_Mail($to,$subject,$body);

  echo '<div class="ok"><font color=green>Mail Sent Successfully !</font></div><br/>';

  }
else
//if "subject" is not filled out, display the form
  {
  echo "<div class='form'><form method='post'>
  User:<br /><input name='subject' type='text' disabled='disabled' value='$user'/><br />
  Subject:<br /><input name='subject' type='text' /><br />
  Message:<br />
  <textarea name='message'></textarea><br />
  <input type='submit' value='Send Mail' />
  </form></div>";
  }

echo '<a href="index.php"><div class="ua">Home</div></a>';
include '../foot.php';
}
else {header('Location:login.php');}


?>