Monkey Albino

Linux altar53.supremepanel53.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
/ home/ bdapparelinfo/ www/

/home/bdapparelinfo/www/send_inquery - old.php

<?php


/**   
 */
    //connect to the database 
    include_once ('config.php'); 
	$sq=$_REQUEST["id"]; 
	$query = "SELECT * FROM add_list WHERE id ='$sq'";
	$result = mysql_query($query) or die(mysql_error());
	$num_rows = mysql_fetch_array($result);
	$Company_Name = $num_rows["company_name"];
	$Email = $num_rows["email"];
	///////////////////////////////////////
session_name("fancyform");
session_start();


$_SESSION['n1'] = rand(1,20);
$_SESSION['n2'] = rand(1,20);
$_SESSION['expect'] = $_SESSION['n1']+$_SESSION['n2'];


$str='';
if($_SESSION['errStr'])
{
	$str='<div class="error">'.$_SESSION['errStr'].'</div>';
	unset($_SESSION['errStr']);
}

$success='';
if($_SESSION['sent'])
{
	$success='<h1>Thank you!</h1>';
	
	$css='<style type="text/css">#contact-form{display:none;}</style>';
	
	unset($_SESSION['sent']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> 
<title>demo</title>
<meta name="keywords"
content="Bdtrade" />
<meta name="description" content="Bdtrade" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

		<link rel="stylesheet" type="text/css" href="css/style.css" />
		<!--================pasignation===================-->
	<link href="pasignation/pagination.css" rel="stylesheet" type="text/css" />
	<link href="pasignation/B_blue.css" rel="stylesheet" type="text/css" />
			<!--================end link pasignation===================-->
	<script language="JavaScript" src="script/gen_validatorv4.js" type="text/javascript" xml:space="preserve"></script>
	<!---============================================--->
	
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="jqtransformplugin/jquery.jqtransform.js"></script>
<script type="text/javascript" src="formValidator/jquery.validationEngine.js"></script>

<script type="text/javascript" src="script.js"></script>
			<!--================end Form Validation===================-->
</head>
<body>


<div id="top">
  <div class="cont"> 
    <!--<ul id="user" style="float:left">
      <li id="welcome_logon_span">&nbsp;</li>
      <li id="new_user"> New user? </li>
      <li id="join_now_span" style="display: inline;">
        <a rel="nofollow" href="#/join/">Join Now</a> |
      </li>
    </ul>--> 
  </div><!--end cont-->
</div><!--end top-->
<?php //include 'top.php';?>

<?php include 'header.php';?>



<div id="main">
  <?php //include 'left_menu.php';?>
	  <!--<div id="content">-->
		<div class="conL" style="width:99.5%; border:1px solid #D0DBED">   
		<h5> Send Inquery To <b><?php echo $Company_Name;?></b></b>
		<b style="float:right">Note: 1) Please write in English    2)* indicates required fields</b>  </h5> 
		
	 <link type="text/css" href="admin/css/jquery.cleditor.css" rel="stylesheet" />
	<script type='text/javascript' src='admin/js/jquery-1.4.2.min.js'></script>	<!-- jquery library -->
	<script type='text/javascript' src='admin/js/jquery-ui-1.8.5.custom.min.js'></script> <!-- jquery UI -->
	<script type='text/javascript' src='admin/js/cufon-yui.js'></script> <!-- Cufon font replacement -->
	<script type='text/javascript' src='admin/js/ColaborateLight_400.font.js'></script> <!-- the Colaborate Light font -->
	<script type='text/javascript' src='admin/js/easyTooltip.js'></script> <!-- element tooltips -->
	<script type='text/javascript' src='admin/js/jquery.tablesorter.min.js'></script> <!-- tablesorter -->
	
	<!--[if IE 8]>
		<script type='text/javascript' src='admin/js/excanvas.js'></script>
		<link rel="stylesheet" href="admin/css/IEfix.css" type="text/css" media="screen" />
	<![endif]--> 
 
	<!--[if IE 7]>
		<script type='text/javascript' src='admin/js/excanvas.js'></script>
		<link rel="stylesheet" href="admin/css/IEfix.css" type="text/css" media="screen" />
	<![endif]--> 
	
	<script type='text/javascript' src='admin/js/visualize.jQuery.js'></script> <!-- visualize plugin for graphs / statistics -->
	<script type='text/javascript' src='admin/js/iphone-style-checkboxes.js'></script> <!-- iphone like checkboxes -->
	<script type='text/javascript' src='admin/js/jquery.cleditor.min.js'></script> <!-- wysiwyg editor -->
	<script type='text/javascript' src='admin/js/custom.js'></script> <!-- the "make them work" script -->
 <style type="text/css" xml:space="preserve">
.error_strings{ font-size:14px; color:#CC0000; font-weight:bold; line-height:25px;}
</style>
<?php
if(isset($_POST['email'])) {
    // EDIT THE 2 LINES BELOW AS REQUIRED
	
    $email_to = "md.wasim0@gmail.com";
    $email_subject = "  $test $Company_Name subject line";
     
     
    function died($error) {
        // your error code can go here
        echo "<div class=\"list_box\">We are very sorry, but there were error(s) found with the form you submitted. ";
        echo "These errors appear below.<br /><br />";
        echo $error."<br /><br />";
        echo "Please go back and fix these errors.</div>";
        die();
    }
    // validation expected data exists
    if(!isset($_POST['first_name']) ||
        !isset($_POST['sub_name']) ||
        !isset($_POST['email']) ||
        !isset($_POST['telephone']) ||
        !isset($_POST['comments'])) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');      
    }
    $first_name = $_POST['first_name']; // required
    $sub_name = $_POST['sub_name']; // required
    $email_from = $_POST['email']; // required
    $telephone = $_POST['telephone']; // not required
    $comments = $_POST['comments']; // required
     
    $error_message = "";
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  if(!preg_match($email_exp,$email_from)) {
    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
  }
    $string_exp = "/^[A-Za-z .'-]+$/";
  if(!preg_match($string_exp,$first_name)) {
    $error_message .= 'The First Name you entered does not appear to be valid.<br />';
  }
  if(!preg_match($string_exp,$sub_name)) {
    $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
  }
  if(strlen($comments) < 2) {
    $error_message .= 'The Comments you entered do not appear to be valid.<br />';
  }
  if(strlen($error_message) > 0) {
    died($error_message);
  }
    $email_message = "Form details below.\n\n";
     
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }
     
    $email_message .= "First Name: ".clean_string($first_name)."\n";
    $email_message .= "Email: ".clean_string($email_from)."\n";
    $email_message .= "Telephone: ".clean_string($telephone)."\n";
    $email_message .= "Subject: ".clean_string($sub_name)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";
     
     
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers); 
?>
 
<!-- include your own success html here -->
 
<strong style="margin:10px 10px; color:#C00; font-size:15px;">Thank you for contacting us. We will be in touch with you very soon.</strong><br>
 
<?php
}
?>
<form name="contactform" method="post" action="send_inquery.php">
<table width="90%"  align="center" style="margin:auto">
<tr>
 <td valign="top">
  <label for="first_name">First Name *</label>
 </td>
 <td valign="top">
  <input  type="text" name="first_name" maxlength="50" size="30">
 </td>
</tr>
<tr>
 <td valign="top">
  <label for="email">Email Address *</label>
 </td>
 <td valign="top">
  <input  type="text" name="email" maxlength="80" size="30">
 </td>
</tr>
<tr>
 <td valign="top">
  <label for="telephone">Telephone Number</label>
 </td>
 <td valign="top">
  <input  type="text" name="telephone" maxlength="30" size="30">
 </td>
</tr>
<tr>
 <td valign="top">
  <label for="last_name">Subject *</label>
 </td>
 <td valign="top">
  <input  type="text" name="sub_name" value="Inquire about  <?php echo $Company_Name;?>" maxlength="50" size="30">
 </td>
</tr>
<tr>
 <td valign="top">
  <label for="comments">Comments *</label>
 </td>
 <td valign="top"> </td>
</tr>
<tr>
 <td valign="top" colspan="2">
  <textarea  name="comments" maxlength="1000" class="editor" cols="25" rows="6"></textarea>
 </td>
</tr>
<tr>
 <td colspan="2" style="text-align:center">
  <input type="submit" value="Submit"> 
 </td>
</tr>
</table>
</form>


					 
  </div> <!--end conL--><!--end conL-->
		
	  <?php //include 'right.php';?>
   <!--</div>end content-->
</div> <!--end main-->

     <?php include 'footer.php';?>