Вы находитесь на странице: 1из 6

$config['protocol'] = 'smtp';

$config['smtp_host'] = 'ssl://smtp.zoho.com';
$config['smtp_port'] = '465';
$config['smtp_user'] = 'no-reply@kolkataonwheels.com';
$config['smtp_pass'] = 'Admin@2017';
$config['mailtype'] = 'html';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['newline'] = "\r\n"; //use double quotes
$this->load->library('email',$config);

$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.gmail.com';
$config['smtp_port'] = '465';
$config['smtp_user'] = 'dummywebspark@gmail.com';
$config['smtp_pass'] = 'abcd1234@#';
$config['mailtype'] = 'html';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['newline'] = "\r\n"; //use double quotes
$this->load->library('email',$config);

require 'PHPMailer/PHPMailerAutoload.php';

$mail = new PHPMailer;


$mail->IsSMTP();

$mail->CharSet = "iso-8859-1";
$mail->Host = 'ssl://smtp.gmail.com'; //
Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable
SMTP authentication
$mail->Username = 'dummywebspark@gmail.com'; //
SMTP username
$mail->Password = 'abcd1234@#'; // SMTP
password
$mail->SMTPSecure = 'ssl'; // Enable TLS
encryption, `ssl` also accepted
$mail->Port = 465;

$mail->From = 'dummywebspark@gmail.com';
$mail->FromName = 'Kolkataonwheels Payment Success';

//->addAddress('mrityunjaybhagat@gmail.com');
$mail->addAddress('arpan.bagchi10@gmail.com');

$mail->isHTML(true);
$mail->Subject = "Payment for Drive Tour-MAHISHADAL RAJBARI has
Processed Successfully";
$mail->Body = "Payment Received";
$mail->send();
if($mail->send()){
echo "Mail Send successfully";
}else {
echo "Mail Failed successfully";
}

$text_data ="Your Payment of INR ".($amount/100)." is successfully processed.


</br> Your payment transaction no. is ".$tran_id;

$query = "SELECT mem_name, mem_no, mem_cell,


mem_email,mem_food,amount,trnid FROM `wheeler` where `trnid` = '".$tran_id."'";

if ($result = mysqli_query($conn, $query)) {

/* fetch associative array */


while ($row = mysqli_fetch_row($result)) {
$alldata = $row ;
$smstext = "Your payment of Rs ".($alldata[5]/100)." for Drive
Tour-MAHISHADAL RAJBARI has been received. For queries, write to
info@kolkataonwheels.com - Team WHEELS";

$phno = $alldata[2];

$text = urlencode($smstext);

$url = 'https://promo.webtwosms.com/api/api_http.php?
username=kolwheel&password=Wheel@19&senderid=WHEELS&to='.$phno.'&text='.
$text.'&route=Informative&type=text&datetime=2017-11-07%2012%3A12%3A33';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$output=curl_exec($ch);
if(curl_errno($ch))
{
echo 'error:' . curl_error($c);
}
curl_close($ch);

$msg = "<p>Hello ".$alldata[0]." </p><p>Your payment of Rs ".


($alldata[5]/100) ." for Drive Tour-MAHISHADAL RAJBARI has been received.</p>
<strong> Payment Details <br> <br>
<table>
<tr>
<td> Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td> ".$alldata[0]." </td>
</tr>
<tr>
<td> Email &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td> ". $alldata[3]." </td>
</tr>
<tr>
<td> Phone No &nbsp; &nbsp; &nbsp; </td>
<td> ".$alldata[2] ." </td>
</tr>
<tr>
<td> Membership Number &nbsp; &nbsp; &nbsp; </td>
<td> ".$alldata[1] ." </td>
</tr>
<tr>
<td> Food &nbsp; &nbsp; &nbsp; </td>
<td> ".$alldata[4] ." </td>
</tr>
<tr>
<td> Transaction Id &nbsp; &nbsp; </td>
<td> ". $alldata[6] ." </td>
</tr>
<tr>
<td> Amount &nbsp; &nbsp; &nbsp; </td>
<td> Rs ". ($alldata[5]/100) ."</td>
</tr>
</table>
</strong>
<p>We look forward to your presence at the event. For queries,
write to info@kolkataonwheels.com</p>
<p>- Team WHEELS<br>+91-9830370371</p>";

elseif(stripos($tran_id, "CTH18") !== false){

$sql = "Update `wp5i_FB_Payment` SET `sts`='Y' where `trnid` = '".


$tran_id."' AND `amount` = '".$amount."'";

if($conn->query($sql) === TRUE){


$query = "SELECT name, email, ph_no , trnid , amount ,comments FROM
`wp5i_FB_Payment` where `trnid` = '".$tran_id."'";
if ($result = mysqli_query($conn, $query)) {

while ($row = mysqli_fetch_row($result)) {


$alldata = $row ;

$msg = "<p>Hello ".$alldata[0]." </p><p>Your payment of Rs ".


($alldata[4]/100) ." for 16th CAR TREASURE HUNT has been received.</p><strong>
Payment Details <br> <br><table >
<tr>
<td> Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td> ".$alldata[0]." </td>
</tr>
<tr>
<td> Email &nbsp; &nbsp; &nbsp; &nbsp; </td>
<td> ". $alldata[1]." </td>
</tr>
<tr>
<td> Phone No &nbsp; &nbsp; &nbsp; </td>
<td> ".$alldata[2] ." </td>
</tr>
<tr>
<td> Transaction Id &nbsp; &nbsp; </td>
<td> ". $alldata[3] ." </td>
</tr>
<tr>
<td> Amount &nbsp; &nbsp; &nbsp; </td>
<td> ".( $alldata[4]/100) ."</td>
</tr>
<tr>
<td> Booking Information &nbsp; &nbsp; &nbsp; </td>
<td> ". $alldata[5] ."</td>
</tr> </table></strong><p>We look forward to your presence at
the event. For queries, write to info@kolkataonwheels.com</p>
<p>- Team WHEELS<br>+91-9830370371</p>";

require 'PHPMailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->IsSMTP();

$mail->CharSet = "iso-8859-1";
$mail->Host = 'smtp.zoho.com'; // Specify
main and backup SMTP servers
$mail->SMTPAuth = true; // Enable
SMTP authentication
$mail->Username = 'no-reply@kolkataonwheels.com';
// SMTP username
$mail->Password = 'Admin@2017'; //
SMTP password
$mail->SMTPSecure = 'ssl'; // Enable
TLS encryption, `ssl` also accepted
$mail->Port = 465;

$mail->From = 'no-reply@kolkataonwheels.com';
$mail->FromName = 'Kolkataonwheels Payment Success '.
$alldata[0];
$mail->addAddress('info@kolkataonwheels.com');
$mail->addAddress('guideindia@hotmail.com');
$mail->addAddress('guideindia1@hotmail.com');
$mail->addAddress('kolkataonwheels05@gmail.com');
$mail->addAddress('kolkataonwheels10@gmail.com');
$mail->addAddress('mrityunjaybhagat@gmail.com');
$mail->addAddress('kolkataonwheels27@gmail.com');
$mail->addAddress($alldata[1]);

$mail->isHTML(true);
$mail->Subject = "Payment for 16th CAR TREASURE HUNT has
Processed Successfully";
$mail->Body = $msg;
$mail->send();

header("location: https://www.kolkataonwheels.com/16th-wheels-
car-treasure-hunt-registration-confirmation/");

} // end of strpos CTH18 if

<div class="shop_cat">
<div class="heading">
<h2>Members Only</h2>
</div>
<div class="row">
<?php foreach($membersonly as $all) { ?>
<?php if($all->status==1) { ?>
<!-- Loop start -->
<div class="col-sm-4">
<div class="shop_item">
<div class="shop_item_img">
<?php if(empty($all->product_image)) { ?>
<img src="<?php echo
base_url('./uploads/merchandise/noimage.png')?>" alt="">
<?php } else { ?>
<img src="<?php echo
base_url('./uploads/merchandise/').$all->product_image?>" alt="">
<?php } ?>
</div>
<div class="shopping_cart">
<h6><?php echo $all->product_title ?></h6>
<p><em>?</em>&nbsp;<?php echo $all-
>product_price ?></p>
<div class="shop_btn">
<button class="btn btn-yellow"><i class="fas
fa-fw fa-shopping-cart"></i> Add To Cart</button>
</div>
</div>
</div>
</div>
<!-- Loop End -->
<?php }} ?>
</div>
</div>
<!-- Shop End -->
<?php } ?>

<div class="col-md-3">
<img src="<?php echo base_url('./uploads/merchandise/').
$member->product_image?>" alt="">
<h2><span><i class="fas fa-rupee-sign"></i>&nbsp;<?php
echo $member->product_price ?></span></h2>
<button class="btn"><i class="fas fa-shopping-
cart"></i></button>
</div>

Вам также может понравиться