OverLord Shell

Path : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/
File Upload :
Current File : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/register_save.php

<?php 
session_start();
require_once("db/conn.php");
//var_dump($_POST);exit;
if (trim($_SESSION['captchaa'])!=trim($_POST['captcha_code'])){  
	echo "<p style='color:red !important;'>The captcha code does not match!</p>";// Captcha verification is incorrect.

}else
{ 



$con_sr_no=$_POST['con_sr_no'];
$mem_code=$_POST['mem_code'];
$regsrno=$_POST['regsrno'];
$regdistsrno=$_POST['regdistsrno'];
	$company_name=$_POST['first_Name'];
	
	$sasa=explode("~",$_POST['country_id']);
	$sasa[1]='India';
	$cname=$sasa[1];
	$sasa1=explode("~",$_POST['state_id']);
	$sname=$sasa1[1];
	$sasa2=explode("~",$_POST['dist_id']);
	$dname=$sasa2[1];
	$sasa[0]='101';
	if($sasa[0]!='101'){
		$sname_main=$_POST['company_other_state'];
		$dist_main=$_POST['company_other_state'];
	}else
	{
		$sname_main=$sname;
		$dist_main=$dname;
	}
	$company_pinno=$_POST['company_pinno'];
    $role=$_POST['role'];
	$company_email=$_POST['company_email'];
	$username=$_POST['company_email'];
	$company_city=htmlentities($_POST['company_city'],ENT_QUOTES);
	$company_mobile=htmlentities($_POST['company_mobile'],ENT_QUOTES);
	$passwordsend=substr(md5(time()),3,8);
	$password=md5($passwordsend);
	
 

	$selr1=$connection->query("SELECT company_id FROM busdir_mst_jobprofile WHERE company_email='".$company_email."' or company_mobile='".$company_mobile."'");

     $selr2=$connection->query("SELECT company_id FROM busdir_mst_company WHERE company_email='".$company_email."' or company_mobile='".$company_mobile."'");
if( ($selr1->num_rows!=0) || ($selr1->num_rows!=0))echo "Duplicate mobile or email address.";
	else{
         if($_POST['role']=='jb'){
              $addq="INSERT INTO busdir_mst_jobprofile";
         }else{
			 
			if(!isset($_POST['role'])){
			$_POST['role']='bs';
			}
               $addq="INSERT INTO busdir_mst_company";
         }
       
       $addq.="(company_name,company_country,company_state,company_district,company_city,company_pinno,company_email,username,company_mobile,role,password,createdon,mem_srno,membership_no,regsrno,regdistsrno)VALUES
		                                      ('".$company_name."','".$cname."','".$sname_main."','".$dist_main."','".$company_city."','".$company_pinno."','".$company_email."','".$username."','".$company_mobile."','".$role."','".$password."','".date('Y-m-d H:i:s')."','$con_sr_no','$mem_code','$regsrno','$regdistsrno')";
		$addr=$connection->query($addq);
					if($addr){
					if($_POST['role']=='jb'){
					$to = $company_email;
					}
					else{
						 
						  $qdata=" update otms_mst_contact set business='y' where con_sr_no = '".$con_sr_no."' ";
						 $add11r=$connection_jc->query($qdata);
						 $to = $company_email;

			
					 }
			//sending welcome email
			
		  $subject="MACCIA Business Network Registration";
			$headers  = 'From: business.maccia.org.in' . "\r\n" .
											'Reply-To: no-reply@business.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();
			$message="Congratulations, ".$First_name."!!! You have registered at MACCIA Business Network !!!<br><br>Please keep this e-mail for your records and keep it confidential. Your account information is as follows:<br><br>------------------------------<br>Username: ".$company_email."<br>Password: ".$passwordsend."<br>------------------------------<br><br>Please visit the following link in order to login into your account:<br><br><a href=\"http://businessforum.maccia.org.in/login/\" target=\"_blank\">http://businessforum.maccia.org.in</a><br><br>Thank you for registering.<br><br>-------------------------------------------------------<br><strong>This is an automated message, please do not reply.</strong>";
		$mresponse = mail($to,$subject,$message,$headers);
			echo "success";
		}
		else echo "An unknown error occured. Please try again.";
	}
	$selr1->free();
	$connection->close();
}


?>

xRyukZ - Copyright 2k19