OverLord Shell
<?php
session_start();
include("mail_fun.php");
require_once("db/conn.php");
/*include("sql_ing.php");
if(empty($_SESSION['captcha_code'] ) || strcasecmp($_SESSION['captcha_code'], $_POST['captcha_code']) != 0){
echo "The captcha code does not match!";// Captcha verification is incorrect.
}else
{ */
include("sql_ing.php");
if(empty($_SESSION['captcha_code'] ) || strcasecmp($_SESSION['captcha_code'], $_POST['captcha_code']) != 0){
echo "The captcha code does not match!";// Captcha verification is incorrect.
}else
{
$business=$_POST['business'];
$companyname1= $_POST['fname']." ".$_POST['mname']." ".$_POST['lname'];
$passwordsend=substr(time(),3,8);
$salutation=filter_var(addslashes($_POST['salutation']), FILTER_SANITIZE_STRING);
$fname=filter_var(addslashes($_POST['fname']), FILTER_SANITIZE_STRING);
$mname=filter_var(addslashes($_POST['mname']), FILTER_SANITIZE_STRING);
$lname=filter_var(addslashes($_POST['lname']), FILTER_SANITIZE_STRING);
$proposer=filter_var(addslashes($_POST['proposer']), FILTER_SANITIZE_STRING);
$signator=filter_var(addslashes($_POST['signator']), FILTER_SANITIZE_STRING);
$mobno=filter_var(addslashes($_POST['mobno']), FILTER_SANITIZE_STRING);
$faxno=filter_var(addslashes($_POST['faxno']), FILTER_SANITIZE_STRING);
$landlineno=filter_var(addslashes($_POST['landlineno']), FILTER_SANITIZE_STRING);
$email=filter_var(filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL);
$gender=filter_var(addslashes($_POST['gender']), FILTER_SANITIZE_STRING);
$voting=filter_var(addslashes($_POST['voting']), FILTER_SANITIZE_STRING);
$region=filter_var(addslashes($_POST['region']), FILTER_SANITIZE_STRING);
$district=filter_var(addslashes($_POST['district']), FILTER_SANITIZE_STRING);
$memcode=NULL;
$memtype=filter_var(addslashes($_POST['memtype']), FILTER_SANITIZE_STRING);
if($memtype == 'Individual'){
if(isset($_POST['isstudent']))$isstudent=$_POST['isstudent'];
if(isset($_POST['young']))$young=$_POST['young'];
}
elseif($memtype == 'Company'){
if(isset($_POST['young']))$young=$_POST['young'];
if(isset($_POST['jointstockco']))$jointstockco=$_POST['jointstockco'];
if(isset($_POST['commercialassoc']))$commercialassoc=$_POST['commercialassoc'];
if(isset($_POST['coopsoc']))$coopsoc=$_POST['coopsoc'];
if(isset($_POST['assocmem']))$assocmem=$_POST['assocmem'];
$turnover=filter_var(addslashes($_POST['turnover']), FILTER_SANITIZE_STRING);
$rep_name=filter_var(addslashes($_POST['rep_name']), FILTER_SANITIZE_STRING);
$rep_mobno=filter_var(addslashes($_POST['rep_mobno']), FILTER_SANITIZE_STRING);
$rep_email=filter_var(addslashes($_POST['rep_email']), FILTER_SANITIZE_STRING);
$bus_type=filter_var(addslashes($_POST['bus_type']), FILTER_SANITIZE_STRING);
$buscat_name=filter_var(addslashes($_POST['buscat_name']), FILTER_SANITIZE_STRING);
if(isset($_POST['buss']))$buss=implode(',',$_POST['buss']);
}
$subscription_fee=filter_var(addslashes($_POST['subscription_fee']), FILTER_SANITIZE_STRING);
$admission_fee=filter_var(addslashes($_POST['admission_fee']), FILTER_SANITIZE_STRING);
$memshiptype=filter_var(addslashes($_POST['memshiptype']), FILTER_SANITIZE_STRING);
$memdate=date('Y-m-d',strtotime($_POST['memdate']));
$memexpdate="";
if($memshiptype=='Term'){
$memexpdate=date('Y-03-31',strtotime($memdate.'+15 years'));
}
if($memshiptype=='Ordinary'){
$memexpdate=date('Y-03-31',strtotime($memdate.'+1 years'));
}
if($memshiptype=='Centenary'){
$memexpdate=date('2027-03-31');
}
$address=nl2br($_POST['address']);
$state=$_POST['state'];
if(isset($_POST['city']))$city=$_POST['city'];
if(isset($_POST['area']))$area=$_POST['area'];
$pincode=$_POST['pincode'];
$dob=date('Y-m-d',strtotime($_POST['dob']));
$doa=date('Y-m-d',strtotime($_POST['doa']));
$profession=$_POST['profession'];
$qualification=filter_var(addslashes($_POST['qualification']), FILTER_SANITIZE_STRING);
$pancard=filter_var(addslashes($_POST['pancard']), FILTER_SANITIZE_STRING);
$aadhaar=filter_var(addslashes($_POST['aadhaar']), FILTER_SANITIZE_STRING);
$passport=filter_var(addslashes($_POST['passport']), FILTER_SANITIZE_STRING);
$license=filter_var(addslashes($_POST['license']), FILTER_SANITIZE_STRING);
$voterid=filter_var(addslashes($_POST['voterid']), FILTER_SANITIZE_STRING);
if(!empty(filter_var(addslashes($_POST['notifyme']), FILTER_SANITIZE_STRING)))$notifyme=NULL;
if(!empty(filter_var(addslashes($_POST['autowish']), FILTER_SANITIZE_STRING)))$autowish=NULL;
if(!empty(filter_var(addslashes($_POST['smstemp']), FILTER_SANITIZE_STRING)))$smstemp=NULL;
if(!empty(filter_var(addslashes($_POST['emailtemp']), FILTER_SANITIZE_STRING)))$emailtemp=NULL;
if(!empty(filter_var(addslashes($_POST['smstemp2']), FILTER_SANITIZE_STRING)))$smstemp2=NULL;
if(!empty(filter_var(addslashes($_POST['emailtemp2']), FILTER_SANITIZE_STRING)))$emailtemp2=NULL;
$companyname=filter_var(addslashes($_POST['companyname']), FILTER_SANITIZE_STRING);
$cname='India';
$selr=$conn->query("SELECT con_sr_no FROM otms_mst_contact WHERE active='m' AND fname='".$fname."' AND lname='".$lname."' AND mobno='".$mobno."'");
$addq="INSERT INTO otms_mst_contact(su_sr_no,user_sr_no,salutation,fname,mname,lname,memcode,memtype,memshiptype,memdate,memexpdate,email,mobno,faxno,landlineno,gender,voting,regsrno,regdistsrno,proposer,signator,isstudent,young,jointstockco,commercialassoc,coopsoc,assocmem,turnover,rep_name,rep_mobno,rep_email,bus_type,buscat_name,businessm,business,subscription_fee,admission_fee,address,statesrno,citysrno,areasrno,pincode,dob,doa,profession,qualification,pancard,aadhaarcard,passport,driverlicense,votercard,notifyme,autowish,bdayst_sr_no,bdayet_sr_no,annvst_sr_no,annvet_sr_no,companyname,";
for($x=1;$x<=20;$x++){
if(isset($_POST['col'.$x]))$addq.="col".$x.",";
}
$addq.="active,create_dt,create_by) VALUES('1',";
if($_SESSION['role']=='su')$addq.="NULL,";else $addq.="NULL,";
if(!empty($salutation))$addq.="'$salutation',";else $addq.="NULL,";
$addq.="'$fname',";
if(!empty($mname))$addq.="'$mname',";else $addq.="NULL,";
if(!empty($lname))$addq.="'$lname',";else $addq.="NULL,";
if(!empty($memcode))$addq.="'$memcode',";else $addq.="NULL,";
if(!empty($memtype))$addq.="'$memtype',";else $addq.="NULL,";
if(!empty($memshiptype))$addq.="'$memshiptype',";else $addq.="NULL,";
if(!empty($_POST['memdate']))$addq.="'$memdate',";else $addq.="NULL,";
if(!empty($memexpdate))$addq.="'$memexpdate',";else $addq.="NULL,";
if(!empty($email))$addq.="'$email',";else $addq.="NULL,";
$addq.="'$mobno',";
if(!empty($faxno))$addq.="'$faxno',";else $addq.="NULL,";
if(!empty($landlineno))$addq.="'$landlineno',";else $addq.="NULL,";
$addq.="'$gender','$voting','$region','$district','$proposer','$signator',";
if($memtype == 'Individual'){
if(isset($_POST['isstudent']))$addq.="'y',";else $addq.="NULL,";
if(isset($_POST['young']))$addq.="'y',";else $addq.="NULL,";
$addq.="NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,";
}
elseif($memtype == 'Company'){
$addq.="NULL,";
if(isset($_POST['young']))$addq.="'y',";else $addq.="NULL,";
if(isset($_POST['jointstockco']))$addq.="'y',";else $addq.="NULL,";
if(isset($_POST['commercialassoc']))$addq.="'y',";else $addq.="NULL,";
if(isset($_POST['coopsoc']))$addq.="'y',";else $addq.="NULL,";
if(isset($_POST['assocmem']))$addq.="'y',";else $addq.="NULL,";
$addq.="'$turnover',";
if(!empty($rep_name))$addq.="'$rep_name',";else $addq.="NULL,";
if(!empty($rep_mobno))$addq.="'$rep_mobno',";else $addq.="NULL,";
if(!empty($rep_email))$addq.="'$rep_email',";else $addq.="NULL,";
if(!empty($bus_type))$addq.="'$bus_type',";else $addq.="NULL,";
if(!empty($buscat_name))$addq.="'$buscat_name',";else $addq.="NULL,";
if(isset($_POST['buss']))$addq.="'$buss',";else $addq.="NULL,";
}
$addq.="'$business',";
$addq.="'$subscription_fee','$admission_fee',";
if(!empty($address))$addq.="'$address',";else $addq.="NULL,";
if(!empty($state))$addq.="'$state',";else $addq.="NULL,";
if(isset($_POST['city']) && !empty($_POST['city']))$addq.="'$city',";else $addq.="NULL,";
if(isset($_POST['area']) && !empty($_POST['area']))$addq.="'$area',";else $addq.="NULL,";
if(!empty($pincode))$addq.="'$pincode',";else $addq.="NULL,";
if(!empty($_POST['dob']))$addq.="'$dob',";else $addq.="NULL,";
if(!empty($_POST['doa']))$addq.="'$doa',";else $addq.="NULL,";
if(!empty($profession))$addq.="'$profession',";else $addq.="NULL,";
if(!empty($qualification))$addq.="'$qualification',";else $addq.="NULL,";
if(!empty($pancard))$addq.="'$pancard',";else $addq.="NULL,";
if(!empty($aadhaar))$addq.="'$aadhaar',";else $addq.="NULL,";
if(!empty($passport))$addq.="'$passport',";else $addq.="NULL,";
if(!empty($license))$addq.="'$license',";else $addq.="NULL,";
if(!empty($voterid))$addq.="'$voterid',";else $addq.="NULL,";
if(!empty($_POST['notifyme']))$addq.="'$notifyme',";else $addq.="NULL,";
if(!empty($_POST['autowish']))$addq.="'$autowish',";else $addq.="NULL,";
if(!empty($_POST['smstemp']))$addq.="'$smstemp',";else $addq.="NULL,";
if(!empty($_POST['emailtemp']))$addq.="'$emailtemp',";else $addq.="NULL,";
if(!empty($_POST['smstemp2']))$addq.="'$smstemp2',";else $addq.="NULL,";
if(!empty($_POST['emailtemp2']))$addq.="'$emailtemp2',";else $addq.="NULL,";
if(!empty($companyname))$addq.="'$companyname',";else $addq.="NULL,";
for($x=1;$x<=20;$x++){
if(isset($_POST['col'.$x])){
if($x<=16){
if(!empty($_POST['col'.$x]))$addq.="'".$_POST['col'.$x]."',";
else $addq.="NULL,";
}
else{
if(!empty($_POST['col'.$x]))$addq.="'".date('Y-m-d H:i:s',strtotime($_POST['col'.$x]))."',";
else $addq.="NULL,";
}
}
}
$addq.="'m','".date('Y-m-d H:i:s')."','".$_SESSION['id']."')";
$addr=$conn->query($addq);
if($addr){
$fromc='Maccia';
$toc=$_POST['email'];
$subjectc='Welcome to Maharashtra Chamber of Commerce, Industry & Agriculture';
$emailc="support@ultraliant.com,sagar@maccia.org.in";
$stringc='Dear '.$companyname .' ('.$companyname1.' ji),<br/> Thank you for your interest in '.$memshiptype.' membership of MACCIA. Once Management approves your membership request, We will inform you with all your membership details. Kindly send your payment details on nitin@maccia.org.in';
$regardsc='Membership Committee, MACCIA';
// mail_sendto($from,$to,$subject,$email,$string,$regards);
mail_sendto($fromc, $toc, $subjectc, $emailc, $stringc, $regardsc);
/*$fromc='Maccia';
$to2='support@ultraliant.com';
$email2=$_POST['email'];
$subject2="New enquiry for Membership request of MACCIA";
$string2='<b>Name:</b> '.$companyname1.'<br><b>Mobile:</b> '.$mobno.'<br><b>Email:</b> '.$email.'<br><b>Membership Type:</b>'.$memshiptype.'';
$regards2="";
mail_sendto($fromc, $to2, $subject2, $email2, $string2, $regards2);*/
// if ($region == 'North Maharashtra') {
// $to = 'avinash@maccia.org.in,sagar@maccia.org.in,support@ultraliant.com';
$to = 'sagar@maccia.org.in,nitin@maccia.org.in,rashmi@maccia.org.in,prerana@maccia.org.in,support@ultraliant.com';
$subject = 'New membership request for MACCIA';
$message="<table align=\"center\" style=\"border:0px solid #456;border-radius:3px; width:70%; cellpadding:0; cellspacing:0;\">
<tr style=\"\"><td style=\"text-align:center; padding:15px; font-weight:bold; font-size:20px;\"> New membership details</td></tr>
<tr>
<td>
<table cellpadding=\"6\" style=\"width:100%; cellpadding:0; cellspacing:1; border:1px solid #BEC0CC; border-radius:3px 3px 0px 0px; padding-bottom:15px;\">
<tbody>
<tr style=\"padding-bottom:10px;\">
<td style=\" border-color:#BEC0CC; width:20%; font-weight:bold;\">
Name:
</td>
<td>
".$companyname1."
</td>
</tr>
<tr style=\"padding-bottom:10px;\">
<td style=\" border-color:#BEC0CC; width:20%; font-weight:bold;\">
Company Name:
</td>
<td>
".$companyname."
</td>
</tr>
<tr>
<td style=\"width:10%; font-weight:bold;\">
Enquiry For:
</td>
<td style=\" width:100%;\">
<p>".$memshiptype."</p>
</td>
</tr>
<tr>
<td style=\" width:20%; font-weight:bold;\">
Email:
</td>
<td style=\" width:30%;\">
".$email."
</td>
</tr>
<tr>
<td style=\" width:20%; font-weight:bold;\">
Mobile:
</td>
<td style=\" width:30%;\">
".$mobno."
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan=\"2\" style=\" width:20%; font-weight:bold;\">
This is auto generated email, Please do not reply!
</td>
</tr>
</table>";
/*}else {
$to = 'shivani@maccia.org.in,sagar@maccia.org.in,support@ultraliant.com';
} */
$headers = 'From: MACCIA <no-reply@maccia.org.in>' . "\r\n" .
'Reply-To: sagar@maccia.org.in' . "\r\n" .
'Bcc: sagar@maccia.org.in,nitin@maccia.org.in,rashmi@maccia.org.in,prerana@maccia.org.in,support@ultraliant.com' . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
//$emailxy="no-reply@maccia.org.in";
//$headers = 'From: '.$emailxy. "\r\n". 'Reply-To:shivani@maccia.org.in' . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
// mail_sendto($from,$to,$email,$string,$regards);
//header("location:index.php?msg=success");
//$msg="";
//inserting this contact's groups in db
$getid=$conn->insert_id;
if(isset($_POST['grpsrno']) && is_array($_POST['grpsrno'])){
$grpq="INSERT INTO otms_mst_grpcon(grp_sr_no,con_sr_no) VALUES";
foreach($_POST['grpsrno'] as $grpsrno)$grpq.="('$grpsrno','$getid'),";
$grpq=rtrim($grpq,',');
$grpr=$conn->query($grpq);
if($grpr)
$msg="success";
else{
$conn->query("DELETE FROM otms_mst_contact WHERE con_sr_no=".$getid);
echo "An unknown error occured. Please try again.";
}
}
else{
$msg="success";
}
if($msg=='success'){
if(!empty($companyname)){
$companydefault="";
$chkr=$conn->query("SELECT concmpsrno FROM otms_mst_contactcompany WHERE con_sr_no=".$getid);
if($chkr->num_rows==0){
$companydefault="y";
}
$companyemail=filter_var(filter_input(INPUT_POST, 'companyemail', FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL);
$companyphoneno=trim(preg_replace('/[^0-9]+/','',$_POST['companyphoneno']));
$companywebaddr=$_POST['companywebaddr'];
$companyaddr=trim($_POST['companyaddr']);
$addqv="INSERT INTO otms_mst_contactcompany(con_sr_no,companyname,companyemail,companyphoneno,companywebaddr,companyaddr,companydefault,active,create_dt,create_by) VALUES('$getid','$companyname','$companyemail','$companyphoneno','$companywebaddr','$companyaddr','$companydefault',";
$addqv.="'m','".date('Y-m-d H:i:s')."','".$_SESSION['su_sr_no']."')";
$addrv=$conn->query($addqv);
if($addrv)
$msg ="success";
else{
$conn->query("DELETE FROM otms_mst_contact WHERE con_sr_no=".$getid);
$conn->query("DELETE FROM otms_mst_grpcon WHERE con_sr_no=".$getid);
echo "An unknown error occured. Please try again1.";
}
} //else {header("location:membership.php?msg=Thanking you, Form has been submitted succesfully");}
}
echo "success";
//else {header("location:membership.php?msg=Thanking you, Form has been submitted succesfully");}
//}else echo "failed to register. Please try again.";
//}
$selr->free();
$conn->close();
}
?>
xRyukZ - Copyright 2k19