MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 52.14.100.101
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/generalmotorsju.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/generalmotorsju.com/index-contact.php
<script language="javascript">
function getXMLHTTP() { //fuction to return the xml http object
var xmlhttp=false;	
try{
xmlhttp=new XMLHttpRequest();
}
catch(e){		
try{			
xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
try{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e1){
xmlhttp=false;
}
}
}
return xmlhttp;
}
function QuickEnqValidate(){   
var myname=document.getElementById('uname').value;
var mymobile=document.getElementById('umobile').value;
var myemail=document.getElementById('uemail').value;
var mymsg=document.getElementById('umsg').value;
error=1;
function trim(str){				
	 return str.replace(/^\s*|\s*$/g,'');
	}	
if(trim(document.getElementById('uname').value)==0){		
alert("Enter Your Name !");
document.getElementById('uname').focus();
error++;
return false;
}	
if (!myname.match(/^[a-zA-Z-,]+(\s{0,1}[a-zA-Z-, ])*$/))
{
alert("Please enter only alphabets !");
document.getElementById('uname').value='';
document.getElementById('uname').focus();
error++;
return false;
}
var mobno=trim(document.getElementById('umobile').value);
if(trim(document.getElementById('umobile').value)==0){
	alert("Enter your mobile no.!");
	document.getElementById('umobile').focus();
	error++;
	return false;
}
if(isNaN(document.getElementById('umobile').value)){
	alert("Mobile no. should be no.!");
	document.getElementById('umobile').focus();
	error++;
	return false;
}
if(mobno.length < 10){
    alert("Mobile no. should be 10 digit long !");
	document.getElementById('umobile').focus();
	error++;
	return false;
}
var email=trim(document.getElementById('uemail').value);
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if(email==''){
	  alert('Please Enter Email Id');
	  document.getElementById('uemail').focus();
	  return false;
  }else if(!email.match(mailformat)){
alert("You have entered an invalid email address!");
document.getElementById('uemail').focus();
return false;
}
if(trim(document.getElementById('umsg').value)==0){
	alert("Enter your message !");
	document.getElementById('umsg').focus();
	error++;
	return false;
 }
if(error==1){
var req=new getXMLHTTP();
var str="<?=$site_url?>/insert_qenq_detail.php?username="+myname+"&usermobile="+mymobile+"&useremail="+myemail+"&usermsg="+mymsg;
//alert(str);
req.onreadystatechange = function() {
if(req.readyState==4){
if(req.status==200){
document.getElementById('msgami').innerHTML="YOUR ENQUIRY HAS BEEN SENT SUCCESSFULLY.";
  } 
 }
}
req.open("GET",str,true);
req.send(null);
return false;
}
}
</script>
<section class="quote-section">
    <div class="amibg"></div>
    <div class="container">
      <div class="row">
        <div class="col-sm-5 col-sm-offset-7">
          <div class="quote-box">
            <h1>Free quote to contact us</h1>
             <form id="contact-form" name="form2" method="post" action="" onsubmit="return QuickEnqValidate()">
              <input name="uname" id="uname" type="text" placeholder="Name">
              <input id="umobile" name="umobile" type="text" placeholder="Mobile">
              <input name="uemail" id="uemail" type="text" placeholder="Email">              
              <textarea name="umsg" id="umsg" placeholder="Message"></textarea>
              <input type="submit" name="QuickSubmit" value="Send Message">
              <div id="msgami" class="message"></div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </section>

MMCT - 2023