DS Data Quality"){
error_reporting(E_ALL ^ E_DEPRECATED);
$host = '205.178.146.114';
$userName = 'cygnus';
$password = 'Cygnus2016';
$DBName = 'userverification';
$connection = mysql_connect($host, $userName,$password) or die(mysql_error()); // Connect to database server(localhost) with username and password.
mysql_select_db($DBName) or die(mysql_error()); // Select registrations database.
$productName= "accel<>DS Data Quality";
// Form Submited
$firstName = mysql_escape_string($_POST['firstName']); // Turn our post into a local variable
$lastName = mysql_escape_string("NA"); // Turn our post into a local variable
$email = mysql_escape_string($_POST['email']); // Turn our post into a local variable
$contactNo = $_POST['contactNo']; // Turn our post into a local variable
$companyName = $_POST['companyName']; // Turn our post into a local variable
$location = "NA"; // Turn our post into a local variable
$yourMessage = "NA"; // Turn our post into a local variable
$title ="NA"; // Turn our post into a local variable
$hashCode = md5( rand(0,1000) ); // Generate random 32 character hash and assign it to a local variable. // Example output: f4552671f8909587cf485ea990207f3b
$numberOfDigits = 4;//want number of digits for the random number
$sum = 0;
for($i=0;$i<$numberOfDigits;$i++)
{
$sum = $sum + rand(1,9)*pow(10,$i);
}
mysql_query("INSERT INTO userdetails (PRODUCTNAME,MAILID, HASHCODE, UNIQCODE, ACTIVE, FIRSTNAME, LASTNAME, CONTACT, ACTIVEDATE, COMPANYNAME,LOCATION, TITLE, YOURMESSAGE,MAIL_STATUS,USER_DOWNLOAD_TIME,USER_DOWNLOAD_STATUS) VALUES(
'". mysql_escape_string($productName) ."',
'". mysql_escape_string($email) ."',
'". mysql_escape_string($hashCode) ."',
'". mysql_escape_string($sum) ."',
'". mysql_escape_string(0) ."','". mysql_escape_string($firstName) ."','". mysql_escape_string($lastName) ."','$contactNo',now(),'".mysql_escape_string($companyName)."','".mysql_escape_string($location)."','". mysql_escape_string($title) ."','". mysql_escape_string($yourMessage)."','NA','0000-00-00 00:00:00','No') ",$connection) or die(mysql_error());
$sql = "SELECT ACTIVEDATE FROM userdetails where MAILID='".$email ."' and HASHCODE='".$hashCode."' and UNIQCODE='".$sum."'";
$retval = mysql_query( $sql, $connection );
while($row = mysql_fetch_assoc($retval))
{
$activeDate = $row['ACTIVEDATE'];
}
$name = $firstName;
//$supportmail = "vijay@cygnussoftwares.com";
//$to="vijay@cygnussoftwares.com";
$supportmail = "bharath@cygnussoftwares.com";
$to="support@prodentechnologies.net";
$support_subject = "Proden Technologies - $productName - User ($name) Contact registered successfully" ;
$support_headers = 'From: Proden Technologies
' . "
" ;
$support_headers .='Bcc: '. $supportmail . "
" ;
$support_headers .='X-Mailer: PHP/' . phpversion();
$support_headers .= "MIME-Version: 1.0
";
$support_headers .= "Content-type: text/html; charset=iso-8859-1
";
$subject = "Proden Technologies - $productName - Download Instructions";
$message = "
Thank you for your interest in our ".$productName.".
Your Activation Code: ".$sum."
Please note that this activation code is valid for 24 hours from the time you received the code.
Please click the following link and enter the activation code to download ".$productName." Standard Edition:
https://www.prodentechnologies.net/Verification.php?productName='".$productName."'&email='".$email."'&hash='".$hashCode."'
";
// Always set content-type when sending HTML email
$headers = 'From: Proden Technologies ' . "
" ;
$headers .='Reply-To: '. $to . "
" ;
$headers .='X-Mailer: PHP/' . phpversion();
$headers .= "MIME-Version: 1.0
";
$headers .= "Content-type: text/html; charset=iso-8859-1
";
$statusMail=$productnameval;
if($statusMail)
{
//echo "
// |
//Your contact informations are successfully submited. |
//
//
";
//echo " An activation code is sent to the e-mail ID you have provided (" . $email."). Please check your //e-mail and follow the instructions to download
// " . $productName." Standard Edition.
//
// |
" ;
}
//support Mail
$support_message = '';
$support_message .= '';
$support_message .= '';
$support_message .= "| Product Name: | " . $productName . " |
";
$support_message .= "| First Name: | " . $firstName . " |
";
$support_message .= "| Last Name: | " . $lastName . " |
";
$support_message .= "| Company Name: | " . $companyName. " |
";
$support_message .= "| Location: | " .$location . " |
";
$support_message .= "| Job Title: | " . $title. " |
";
$support_message .= "| E Mail ID: | " . $email . " |
";
$support_message .= "| Contact Phone No: | " . $contactNo . " |
";
$support_message .= "| Registration Date: | " .$activeDate . " |
";
$support_message .= "| Activation Code: | " .$sum. " |
";
$support_message .= "| Registration Status: | Success |
";
$support_message .= "
";
$support_message .= "";
mail($to, $support_subject, $support_message,$support_headers);
//$successmessage="Well done! ";
//$successmessage1 ="Your contact informations are successfully submited. We will callback within 1 or 2 working days ";
//echo "";
}
?>