|
if($_POST[submit]!="") {
if($other2 != "") { $ot = "$other2" ; } else { $ot = "" ; }
$count=count($segments);
for ($i=0; $i<$count; $i++) {
$seg .= "$segments[$i]".",";
}
//echo $segments;
$insert_query = "insert into `ynfx_revamp`.`ynfx_storefront_enquiry`( `id` , `login` , `company` , `subject` , `message` , `activity` , `segments` , `companyname` , `contactperson` , `designation` , `address1` , `address2` , `city` , `state` , `zip` , `country` , `telephone` , `cell` , `fax` , `email` , `website` , `about` , `enqdate` , `status` , `comment` , `commentdate` ) values('', '$login', '$for_company','$subject','$message','$activity', '$seg$ot','$company', '$person', '$designation', '$add1','$add2','$city','$zip','$state','$country','$tel','$cell', '$fax', '$email','$website','$abt_comp',CURRENT_DATE(),'', '', '0000-00-00')";
$insert = mysql_query($insert_query);
if($insert) {
//echo $insert_query;
if($profile) {
$update_sel = "update member set `companyname` ='$company', `contactperson` ='$person', `address1` ='$add1', `address2` ='$add2', `city` ='$city', `state` ='$state', `zip` ='$zip', `country` ='$country', `telephone` ='$tel', `fax` ='$fax', `email` ='$email', `website` = '$website', `about` = '$abt_comp' where `login` = '$login'";
$update = mysql_query($update_sel);
//if($update) {echo $update_sel; } else echo mysql_error();
}
$sub = "YarnsandFibers Business Confidence Survey Report - June 2007";
$message1= "Dear Sir/Madam,
Thank you for your interest in BCI.
Our team will be in touch with you shortly.
Best Regards,
Team YarnsandFibers
==========================================
http://www.YarnsandFibers.com
Tel : +9122 6629 1000
Fax : +9122 2202 3563
==========================================
";
$message2= "Dear Sir,
Infomration about the user who is interested ".$for_company."
Person name : ".$person."
Member : ".$member."
Subject : ".$sub."
Message : ".$message."
Company name : ".$company."
Designation : ".$designation."
Telephone No : ".$tel."
Fax : ".$fax."
Cell : ".$cell."
Email : ".$email."
Website : ".$website."
Activity : ".$activity."
Segments : ".$seg.$ot."
About Company : ".$abt_comp."
Address :
".
$add1." ".$add2."
".
$city."-".$zip."
".
$state."
".
$country."
"."
Best Regards,
Team YarnsandFibers
==========================================
http://www.YarnsandFibers.com
Tel : +9122 6629 1000
Fax : +9122 2202 3563
==========================================
";
$header = "From: Yarnsandfibers\r\nBCC: [email protected]\r\n";
$to1 = "$email";
$to2 = "[email protected]";
$to3 = "[email protected]";
$to4 = "[email protected]";
$to5 = "[email protected]";
$to6 = "[email protected]";
$to7 = "[email protected]";
$to8 = "[email protected]";
$mail1 = mail($to1,$sub,$message1,$header);
//$mail1 = mail($email,'hi','bye');
$mail2 = mail($to2,$sub,$message2,$header);
$mail3 = mail($to3,$sub,$message2,$header);
$mail4 = mail($to4,$sub,$message2,$header);
$mail5 = mail($to5,$sub,$message2,$header);
$mail6 = mail($to6,$sub,$message2,$header);
$mail7 = mail($to7,$sub,$message2,$header);
$mail8 = mail($to8,$sub,$message2,$header);
if($mail1 && $mail2 && $mail3 && $mail4 && $mail5 && $mail6 && $mail7 && $mail8) {
//echo "Mail sent";
echo "
Dear Sir/Madam,
Thank you for your interest in BCI.
Our team will be in touch with you shortly.
Best Regards,
Team YarnsandFibers
==========================================
http://www.YarnsandFibers.com
Tel : +9122 6629 1000
Fax : +9122 2202 3563
==========================================
";
} else {
echo "Error while sending mail";
echo mysql_error();
}
?>
} else { echo "Sorry!"; echo mysql_error(); } // Checking of insert query is end
} else { // before submitting the form
?>
|
|
//echo "Count is $count";
if ($count!=0 || $user == '1') {
$pp = "check_profile";
if ($count!=0) {
$login = stripslashes(mysql_result($result,0,0));
}
if($user == '1') {
$login = $login;
}
//echo "$login";
$memeber_query = "select id,companyname,contactperson,address1,address2,
city,state,zip,country,telephone,fax,email,website,about,title from $DATABASE.member where `login` = '$login'";
$member_result = mysql_query($memeber_query);
$num = mysql_num_rows($member_result);
$id = mysql_result($member_result,0,0);
$companyname = mysql_result($member_result,0,1);
$contactperson = mysql_result($member_result,0,2);
$address1 = mysql_result($member_result,0,3);
$address2 = mysql_result($member_result,0,4);
$city = mysql_result($member_result,0,5);
$state = mysql_result($member_result,0,6);
$zip = mysql_result($member_result,0,7);
$country = mysql_result($member_result,0,8);
$telephone = mysql_result($member_result,0,9);
$fax = mysql_result($member_result,0,10);
$email = mysql_result($member_result,0,11);
$website = mysql_result($member_result,0,12);
$about = mysql_result($member_result,0,13);
$title = mysql_result($member_result,0,14);
?>
if($request == 'specific') {
echo "
Do you have a specific requirement to buy/sell use machineries, Please Let us know
|
";
}
?>
Welcome echo "$contactperson"; ?>,
To receive your free copy of the BCI Report, please fill in the below form. |
|
include("registration_information.php"); ?> |
} else { //If not login ?>
//If user clicks on Yes button of radio button
/*if($login=="show")
include("radio_form.htm");
else
include("login_information.php");*/
//If user clicks on No button of radio button
/*if($registration =="show")
include("registration_information.php");
else
include("radio_form.htm");*/
if($login=="show")
include("login_information.php");
else if($registration =="show") {?>
|
if($request == 'specific') {
echo "Do you have a specific requirement to buy/sell use machineries, Please Let us know ";
} else {
?>
In order to receive your free copy of the BCI Report, please fill in the below form
}?>
include("registration_information.php");
} else
include("radio_form.php");
?>
|
} // Not login Ends here
} // Form ends here
?>
|