MINI Sh3ll
<?php
//print_r($_REQUEST);exit();
session_start();
include('admin/config/mysql_crud.php');
$db = new Database();
$db->connect();
require_once('PHPMailer/class.phpmailer.php');
if((!empty($_REQUEST['first_name'])) && (!empty($_REQUEST['last_name'])) && (!empty($_REQUEST['email'])) && (!empty($_REQUEST['contact'])) && (!empty($_REQUEST['company_name'])) && (!empty($_REQUEST['job_title'])) && (!empty($_REQUEST['resource_type_type'])) && (!empty($_REQUEST['resource_type_id']))) {
if($_REQUEST['resource_type_type'] == 'case study'){
$type = "case study";
$db->select('case_studies','*',NULL,"id='".$_REQUEST['resource_type_id']."' AND flag=0");
$row = $db->getResult();
$title = $row[0]['name'];
$url = !empty($row[0]['slug'])? 'http://alpha.smartcirqls.com/case-study.php?slug='.$row[0]['slug'] : 'javascript:void(0)';
} else if ($_REQUEST['resource_type_type'] == 'webinar'){
$type = "webinar";
$db->select('webinars','*',NULL,"id='".$_REQUEST['resource_type_id']."' AND flag=0");
$row = $db->getResult();
$title = $row[0]['name'];
$url = !empty($row[0]['slug'])? 'http://alpha.smartcirqls.com/registration-webinar.php?slug='.$row[0]['slug'] : 'javascript:void(0)';
} else if ($_REQUEST['resource_type_type'] == 'press release'){
$type = "press release";
$db->select('press_releases','*',NULL,"id='".$_REQUEST['resource_type_id']."' AND flag=0");
$row = $db->getResult();
$title = $row[0]['title'];
$url = !empty($row[0]['file_uploaded'])? 'http://alpha.smartcirqls.com/uploads/'.$row[0]['file_uploaded'] : 'javascript:void(0)';
} else {
$type = "";
}
/* User Email */
$mail1 = new PHPMailer();
$mail1->isSMTP();
$mail1->SMTPDebug =1;
$mail1->Debugoutput = 'html';
$host_server="localhost";
$mail1->Host = $host_server;
$mail1->Port = 25;
//$mail1->AddAddress('[email protected]');
$mail1->AddAddress($_REQUEST['email']);
$mail1_subject = "SmartCirqls : Thanks for your interest in the ".$type." - ".$title;
$mail1_body = '<div class="container" style="max-width: 35rem; border: 1px solid #ddd; margin: 0 auto; margin-top: 50px; display:block;">
<div class="header" style="background-color: #005593; color: #fff; text-align: center; font-size:20px;">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="300" style="background-color: #e80e88; border-bottom: 1px solid #ddd;">
<img src="images/footerLogo.png" style="padding: 5px 10px 0px 10px;">
</td>
</tr>
</tbody>
</table>
</div>
<div class="row">
<div class="col-lg-12">
<p style="padding:0px 20px; color: #000;"> Hi '.$_REQUEST['first_name'].' '.$_REQUEST['last_name'].',</p>
<p style="padding:0px 20px; color: #000;"> Thanks for your interest in the '.$type.' - '.$title.'</p>
<p style="padding:0px 20px; color: #000;"> Here is the link to the requested '.$type.'.</p>
<p style="padding:0px 20px; color: #000;"> <a href="'.$url.'" target="_blank">'.$title.' </a></p>
<p style="padding:0px 20px; color: #000;"> You can get in touch with us at <a href="mailto:[email protected]" target="_blank"> [email protected]</a> to schedule a free consultation for your organisation. </p>
<p style="padding:0px 20px; color: #000;">Thanks,</p>
<p style="padding:0px 20px; color: #000;">SmartCirqls Team.</p>
</div>
</div>
<footer class="footer" style="background: #e4e4e4;">
<p style="text-align: center; padding: 10px 20px; color: #737477; font-weight: bold; margin-top: 0px; margin-bottom: 0px;">Copyright ©SmartCirqls 2012-2019. All rights reserved.</p>
</footer>
</div>';
//$mail1->setFrom('[email protected]');
$mail1->setFrom('[email protected]');
$mail1->Subject = $mail1_subject;
$mail1->msgHTML($mail1_body);
$mail1->send();
/* User Email */
/* Admin Email */
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPDebug =1;
$mail->Debugoutput = 'html';
/* $host_server="localhost";
$mail1->Host = $host_server;
$mail1->Port = 25; */
$host_server="email-smtp.ap-south-1.amazonaws.com";
$mail->Host = $host_server;
$mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = "AKIAU2W326NUCQA3RVNK";
$mail->Password = "BLpw2EyqMf4/nzp/kdInPC2uD6eau8W0u2K56ARt5tBs";
//$mail->AddAddress('[email protected] ');
//$mail->AddAddress('[email protected]');
//$mail->AddAddress('[email protected]');
//$mail->AddAddress('[email protected]');
//$mail->AddAddress('[email protected]');
$mail->AddAddress('[email protected]');
$mail_subject = "SmartCirqls : ".$type." form enquiry";
$mail_body = '<div class="container" style="max-width: 35rem; border: 1px solid #ddd; margin: 0 auto; margin-top: 50px; display:block;">
<div class="header" style="background-color: #005593; color: #fff; text-align: center; font-size:20px;">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="300" style="background-color: #e80e88; border-bottom: 1px solid #ddd;">
<img src="images/footerLogo.png" style="padding: 5px 10px 0px 10px;">
</td>
</tr>
</tbody>
</table>
</div>
<div class="row">
<div class="col-lg-12">
<p style="padding:5px 20px; color: #000;"> <strong> Hi Team, </strong> </p>
<p style="padding:5px 20px; color: #000;">New '.$type.' form enquiry as follows:</p>
<p style="padding:0px 20px; color: #000;"> <strong> Name : </strong> '.$_REQUEST['first_name'].' '.$_REQUEST['last_name'].'</p>
<p style="padding:0px 20px; color: #000;"> <strong> Email : </strong> '.$_REQUEST['email'].'</p>
<p style="padding:0px 20px; color: #000;"> <strong> Contact Number : </strong> '.$_REQUEST['contact'].'</p>
<p style="padding:0px 20px; color: #000;"> <strong> Conpany Name : </strong> '.$_REQUEST['company_name'].'</p>
<p style="padding:0px 20px; color: #000;"> <strong> Job Title : </strong> '.$_REQUEST['job_title'].'</p>
<p style="padding:0px 20px; color: #000;"> <strong> Enquiry for : </strong> '.$title.'</p>
<p style="padding:0px 20px; color: #000;">Thanks,</p>
<p style="padding:0px 20px; color: #000;">SmartCirqls Team.</p>
</div>
</div>
<footer class="footer" style="background: #e4e4e4;">
<p style="text-align: center; padding: 10px 20px; color: #737477; font-weight: bold; margin-top: 0px; margin-bottom: 0px;">Copyright ©SmartCirqls 2012-2019. All rights reserved.</p>
</footer>
</div>';
//$mail->setFrom('[email protected]');
$mail->setFrom('[email protected]');
$mail->Subject = $mail_subject;
$mail->msgHTML($mail_body);
if (!$mail->send()){
echo 0;
} else {
$db->insert('resource_type_enquiries',array('name'=>$_REQUEST['first_name'].' '.$_REQUEST['last_name'], 'email'=>$_REQUEST['email'], 'contact'=>$_REQUEST['contact'], 'company_name'=>$_REQUEST['company_name'], 'job_title'=>$_REQUEST['job_title'], 'resource_type_type'=>$_REQUEST['resource_type_type'], 'resource_type_id'=>$_REQUEST['resource_type_id']));
echo 1;
}
/* Admin Email */
}
?>
OHA YOOOO