File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/assets/js/contact.js
Back
function _(el){ return document.getElementById(el); } function validateEmail(email) { var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } function getdata(){ var name=_('name').value; var mail=_('mail').value; var subject=_('subject').value; var mess=_('mess').value; console.log(name); console.log(mail); console.log(subject); console.log(mess); if(name != '' && mail != '' && subject != '' && mess != '' ){ if(validateEmail(mail)){ var fd = new FormData(); fd.append("name",name); fd.append("mail",mail); fd.append("subject",subject); fd.append("mess",mess); var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo").innerHTML = this.responseText; var name=_('name').value=''; var mail=_('mail').value=''; var subject=_('subject').value=''; var mess=_('mess').value=''; } }; xhttp.open("POST", "mailer/contact.php", true); xhttp.send(fd); } else{ alert("Please enter valid Email"); } } else{ alert("Please enter all details"); } } function getdatax(){ var name=_('name').value; var mail=_('mail').value; var mobile=_('mobile').value; var gen=_('gen').value; var sem=_('sem').value; var sem=_('dep').value; console.log(name); console.log(mail); console.log(mobile); console.log(gen); console.log(sem); console.log(dep); if(name != '' && mail != '' && mobile != '' && gen != '' && sem != '' && dep != '' ){ if(validateEmail(mail)){ var fd = new FormData(); fd.append("name",name); fd.append("mail",mail); fd.append("mobile",mobile); fd.append("gen",gen); fd.append("sem",sem); fd.append("dep",dep); var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("demo").innerHTML = this.responseText; var name=_('name').value=''; var mail=_('mail').value=''; var mobile=_('mobile').value=''; var gen=_('gen').value=''; var sem=_('sem').value=''; var dep=_('dep').value=''; } }; xhttp.open("POST", "mailer/contact2.php", true); xhttp.send(fd); } else{ alert("Please enter valid Email"); } } else{ alert("Please enter all details"); } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.09 |
proxy
|
phpinfo
|
Settings