GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/uploads/approveVendorProd.php
<?php
ob_start();
ini_set('error_reporting', E_STRICT);
include("connect.php");
mysqli_set_charset($conn,'utf8');
date_default_timezone_set('Asia/Kolkata');

$prod_sr=$_GET['prod_sr'];
$user_id=$_GET['user_id'];
$prod_name=$_GET['prod_name'];

// decline the product
$sql="UPDATE `products` SET `prod_approval`='1' WHERE `sr`='".$prod_sr."'";
$rs=mysqli_query($conn,$sql);
if($rs>0)
{
	$sql2="SELECT * FROM `vendor_details` WHERE `sr`='".$user_id."'";
	$rs2=mysqli_query($conn,$sql2);
	$row2=mysqli_fetch_assoc($rs2);

$to = $row2['vemail'];
$subject = "Product Approved";

$message = "
<html>
<head>
<title>Product approval</title>
</head>
<body>
<p>Hello Sir,<br><br> Dear user, Your product(".$prod_name.") request has been approved. <br> Now
your product has been live on website. <br>
 For more information visit your Control Panel. <br>
 Click here : https:techeor.co.in<br> </p>


<br><br>
<Organisation Name>,<br>
<Address....><br>
mail server : <a href='http://techeor.co.in/'>Techeor Technology</a>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: '.$_SESSION['mobb'] . "\r\n";
$headers .= 'Cc: aksz888@rediffmail.com' . "\r\n";
$data=mail($to,$subject,$message,$headers);
if($data>0){
echo "1";
}
else
{
echo "0";
}
}
else
{
	echo "0";
}
?>