Server IP : 103.53.40.154 / Your IP : 18.188.68.115 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/indiatourbus.com/../adisgauges.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include("site-header.php");?> <?php ///////////////////////////////// SIGN UP START //////////////////// $alert_msg=""; function validate_phone_number($phone) { // Allow +, - and . in phone number $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT); // Remove "-" from number $phone_to_check = str_replace("-", "", $filtered_phone_number); // Check the lenght of number // This can be customized if you want phone number from a specific country if (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) { return false; } else { return true; } } if(isset($_POST['SubmitReg'])) { @extract($_REQUEST); if($reg_name=="") { echo "<script>alert('Please enter your name!');</script>"; }else if (!preg_match("/^[a-zA-Z-' ]*$/",$reg_name)) { echo "<script>alert('Only letters and white space allowed!');</script>"; }else if($reg_email=="") { echo "<script>alert('Please enter an email address!');</script>"; }else if(!filter_var($reg_email, FILTER_VALIDATE_EMAIL)) { echo "<script>alert('Invalid email address!');</script>"; }else if(empty($reg_contact) ) { echo "<script>alert('Please enter a mobile number!');</script>"; }else if (validate_phone_number($reg_contact) != true) { echo "<script>alert('Please enter a valid mobile number!');</script>"; }else { $sql="insert into tbl_registration set reg_name='$reg_name', reg_email='$reg_email', reg_pass='$reg_password', reg_country='$reg_country', reg_mobile_no='$reg_contact', reg_add_date=now()"; if(db_query($sql)) { $im=$site_url."/header_files/".$DATALOGO['header_logo']; ///////////////****** Mailer to client start here **********************////////////// $hostName = $_SERVER['HTTP_HOST']; $msgmail='<html><head><title>'.$compDATA[admin_company_name].'</title></head><body><center><div style="width:710px;padding:2px 2px 2px 2px;font-family:Arial, Helvetica, sans-serif;text-align:left;font-size:14px;border-radius:5px;" ><div style="border: outset thin #dadada70;background-color: #dadada8a;padding: 6px 10px 5px 10px;border-radius: 6px;"> <div style="text-align: left;padding: 14px 0 14px 5px;background-color: black;border-radius: 6px 6px 0 0;color:white;"> <center><img src="'.$im.'" border="0" alt="'.$compDATA[admin_company_name].'" style="width:100px;"></center> </div> <div style="margin-top:20px;"><span style="font-weight:bold;">Dear</span><span style="color:#e8410d;font-weight:bolder;"> '.ucfirst($reg_name).'</span>,</div><br><div style="margin:0px;padding:0px;line-height:20px;">Welcome to '.$compDATA[admin_company_name].'.<br><br></div><div style="border-radius:10px; padding:0 0 0 0;"><div>Your '.$compDATA[admin_company_name].' login details are:</div><br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tbody style="border-radius:10px;"><tr ><td width="100%" style="line-height:25px;font-size: 13px;"><strong>User Name : </strong>'.$reg_email.'<br><strong>Password :</strong> '.$reg_password.'</td></tr></tbody></table></div><br> <div style="padding-top:0;" ><p style="border-top:1px solid #ebebeb;padding-top:10px;"><b>Website</b><br><a href="'.$site_url.'" target="_blank" style="color:#00f;">'.$hostName.'</a><span style="float:right;margin: -20px 0 0 0;"><strong>Email:</strong> <a href="mailto:'.$compDATA['admin_email'].'" style="color:#00f;">'.$compDATA['admin_email'].'</a><br><strong>Mobile:</strong> '.$compDATA['admin_mobile'].'</span></p></div></div></div></center></body></html>'; $msgmail_admin = '<html><head><title>'.$compDATA[admin_company_name].'</title></head><body><center><div style="width:710px;padding:2px 2px 2px 2px;font-family:Arial, Helvetica, sans-serif;text-align:left;font-size:14px;border-radius:5px;" ><div style="border: outset thin #dadada70;background-color: #dadada8a;padding: 6px 10px 5px 10px;border-radius: 6px;"><div style="text-align: left;padding: 14px 0 14px 5px;background-color: black;border-radius: 6px 6px 0 0; color:white;"> <center><img src="'.$im.'" border="0" alt="'.$compDATA[admin_company_name].'" style="width:100px;"></center> </div><div style="margin-top:20px;"></div><br><div style="border-radius:10px; padding:0 0 0 0;"><div>Registration details of <span style="color:#e8410d;font-weight:bolder;"> '.ucfirst($reg_name).'</span>,</div><br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tbody style="border-radius:10px;"><tr ><td width="100%" style="line-height:25px;font-size: 13px;"> <strong>Name : </strong>'.$reg_name.'<br> <strong>Email : </strong>'.$reg_email.'<br> <strong>Mobile : </strong>'.$reg_contact.'<br> <strong>Password :</strong> '.$reg_password.' </td> </tr></tbody></table></div><br> <div style="padding-top:0;" > <p style="border-top:1px solid #ebebeb;padding-top:10px;"> <span style="float:right;margin: -20px 0 0 0;"> <strong>Email:</strong> <a href="mailto:'.$compDATA['admin_email'].'" style="color:#00f;">'.$compDATA['admin_email'].' </a> <br> <strong>Mobile:</strong> '.$compDATA['admin_mobile'].' </span> <br> <strong>Website:</strong> <a href="'.$site_url.'" target="_blank" style="color:#00f;"> '.$hostName.' </a> </span> </p></div></div></div></center></body></html>'; $toEmail = $compDATA['admin_email']; //$toEmail = "rehantki@gmail.com"; $subject = "Registration from $hostName"; $from="$reg_email"; $Headers1 = "From: $reg_name<$from>\n"; $Headers1 .= "X-Mailer: PHP/". phpversion(); $Headers1 .= "X-Priority: 3 \n"; $Headers1 .= "MIME-version: 1.0\n"; $Headers1 .= "Content-Type: text/html; charset=iso-8859-1\n"; @mail("$toEmail", "$subject", "$msgmail_admin","$Headers1","-fenquiry@tradekeyindia.com"); //@mail("amitabh.tradekeyindia@gmail.com", "Subject", "Msg1","$Headers1","-fenquiry@tradekeyindia.com"); $toEmail."<br>"; ///////////////****** Mailer to client end here **********************////////////// ///////////////// Mail To Admin ////////////////////////////////// /* $mail_to_admin="client_enquiry@tradekeyindia.com"; $sub_admin="Business Enquiry From $hostName"; $mail_admin_body = "$msgmail"; $sender_admin =$reg_email; $headers_admin = "MIME-Version: 1.0" . "\r\n"; $headers_admin .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; $headers_admin .= "from: ".$sender_admin."\n"; */ $toEmail = $reg_email; $subject = "Login details from $hostName"; $from="$compDATA[admin_email]"; $Headers1 = "From: $hostName<$from>\n"; $Headers1 .= "X-Mailer: PHP/". phpversion(); $Headers1 .= "X-Priority: 3 \n"; $Headers1 .= "MIME-version: 1.0\n"; $Headers1 .= "Content-Type: text/html; charset=iso-8859-1\n"; @mail("$toEmail", "$subject", "$msgmail","$Headers1","-fenquiry@tradekeyindia.com"); //@mail("amitabh.tradekeyindia@gmail.com", "Subject", "Msg1","$Headers1","-fenquiry@tradekeyindia.com"); $toEmail."<br>"; if($reg_email){ @mail($mail_to_admin,$sub_admin,$mail_admin_body,$headers_admin); $alert_msg="green"; $reg_id=db_scalar("select max(reg_id) from tbl_registration"); $_SESSION['login_id'] = $reg_id; ?> <script type="text/javascript"> swal({title: "Successful", text: "Registration completed successfully", showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "success"}, function(){ window.location.href='<?=$site_url?>/index.html'; } ); </script> <?} ///////////////// Mail To Admin End////////////////////////////////// // $clrerr="green"; // set_session_msg("Enquiry form submitted successfully. We will contact you soon."); // header("Location:$site_url/enquiry.html"); // exit; } else { $alert_msg=""; } } } ?> <style> #error_style_reg{ color:white; font-size:13px; font-family:arial; background-color:#c32323; border-radius:7px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); box-sizing: border-box; padding:7px; margin-top: 5px; } .error_name_reg{ display:none; } .error_email_reg{ display:none; } .error_contact_reg{ display:none; } .error_country_reg{ display:none; } .error_password_reg{ display:none; } .error_con_password_reg{ display:none; } .error_terms_cond_reg{ display:none; } </style> <div class="page-content"> <div class="dlab-bnr-inr overlay-black-middle" style="background:url(<?=$site_url?>/images/inner-banner.jpg) no-repeat center; background-size:cover;"> <div class="container"> <div class="dlab-bnr-inr-entry"> <h1 class="text-white"> Sign Up </h1> <ul class="list-inline"> <li><a href="<?=$site_url?>/index.html">Home</a></li> <li>|</li> <li> Sign Up </li> </ul> </div> </div> </div> <div class="section-full content-inner bg-white contact-style-1"> <div class="container"> <div class="row"> <div class="col-md-3"></div> <div class="col-md-6 "> <div class="p-a30 bg-gray clearfix m-b30 "> <h2>Sign Up</h2> <div class="dzFormMsg"></div> <form action="" method="post" enctype="multipart/form-data" onsubmit="return checkValidationReg();" > <div class="row"> <div class="col-md-12"> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" name="reg_name" id="reg_name" onkeyup="errNameReg();" placeholder="Full Name *"> </div> <p id="error_style_reg" class="error_name_reg" style="width:280px;"></p> </div> </div> <div class="col-md-12"> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" name="reg_email" id="reg_email" onkeyup="errEmailReg();" placeholder="Email *"> </div> <p id="error_style_reg" class="error_email_reg" style="width:230px;"></p> </div> </div> <div class="col-md-6"> <div class="form-group"> <div class="input-group" style="height:50px !important;"> <input type="text" style="height:40px !important; margin-top: 5px !important;" class="form-control" maxlength="10" name="reg_contact" id="reg_contact" onkeyup="errPhoneReg();" placeholder="Mobile No. *"> </div> <p id="error_style_reg" class="error_contact_reg" style="width:270px;"></p> </div> </div> <div class="col-md-6"> <div class="form-group"> <div class="input-group" style="height:50px !important;"> <select name="reg_country" id="reg_country" onchange="errCountryReg();"> <option value=""> --- Select Country * --- </option> <?php $sql_country=db_query("select * from countries order by id asc"); while($country_data=mysql_fetch_array($sql_country)) {?> <option value="<?=$country_data['name']?>" > <?=$country_data['name']?> </option> <?} ?> </select> </div> <p id="error_style_reg" class="error_country_reg" style="width:280px;"></p> </div> </div> <div class="col-md-6"> <div class="form-group"> <div class="input-group"> <input type="password" class="form-control" name="reg_password" id="reg_password" onkeyup="errPasswordReg();" placeholder="Password *"> </div> <p id="error_style_reg" class="error_password_reg" style="width:280px;"></p> </div> </div> <div class="col-md-6"> <div class="form-group"> <div class="input-group"> <input type="password" class="form-control" name="reg_con_password" id="reg_con_password" onkeyup="errConPasswordReg();" placeholder="Confirm Password *"> </div> <p id="error_style_reg" class="error_con_password_reg" style="width:280px;"></p> </div> </div> <div class="col-md-6"> <p> Already have an account? <a href="<?=$site_url?>/login.html">Login Now</a> </p> </div> <div class="col-md-6"> </div> <div class="col-md-12"> <button name="SubmitReg" id="SubmitReg" type="submit" value="Sign Up" class="site-button "> <span>Sign Up</span> </button> </div> </div> </form> </div> </div> </div> </div> </div> </div> <?php include("site-footer.php");?> </div> </div> <!-- --------------------------------------------------SIGNUP START --> <script> function trimfield(str) { return str.replace(/^\s+|\s+$/g,''); } function checkValidationReg(){ var name=document.getElementById("reg_name"); var email=document.getElementById("reg_email"); var contact=document.getElementById("reg_contact"); var country=document.getElementById("reg_country"); var password=document.getElementById("reg_password"); var con_password=document.getElementById("reg_con_password"); if(name.value==""){ $('#reg_name').css({"border-color":"red"}); name.focus(); $('.error_name_reg').fadeIn('slow'); $(".error_name_reg").html("Please enter your name !"); return false; } if(name.value.length<=3){ $('#reg_name').css({"border-color":"red"}); name.focus(); $(".error_name_reg").html("Name should be greater than 3 alphabet !"); $('.error_name_reg').fadeIn('slow'); return false; } if (/[0-9]/g.test(name.value)) { $('#reg_name').css({"border-color":"red"}); name.focus(); $(".error_name_reg").html("Use alphabet only !"); $('.error_name_reg').fadeIn('slow'); return false; } if(email.value==""){ $('#reg_email').css({"border-color":"red"}); email.focus(); $(".error_email_reg").html("Please enter your email !"); $('.error_email_reg').fadeIn('slow'); return false; } if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email.value)){ $('#reg_email').css({"border-color":"red"}); email.focus(); $(".error_email_reg").html("Please enter valid email address !"); $('.error_email_reg').fadeIn('slow'); return false; } if(contact.value==""){ $('#reg_contact').css({"border-color":"red"}); contact.focus(); $(".error_contact_reg").html("Please enter contact number !"); $('.error_contact_reg').fadeIn('slow'); return false; } if(isNaN(contact.value)){ $('#reg_contact').css({"border-color":"red"}); contact.focus(); $(".error_contact_reg").html("Please enter numeric value only !"); $('.error_contact_reg').fadeIn('slow'); return false; } if(contact.value.length<10 || contact.value.length>10){ $('#reg_contact').css({"border-color":"red"}); contact.focus(); $(".error_contact_reg").html("Contact number should be 10 digit long !"); $('.error_contact_reg').fadeIn('slow'); return false; } if(country.value==""){ $('#reg_country').css({"border-color":"red"}); contact.focus(); $(".error_country_reg").html("Please select country !"); $('.error_country_reg').fadeIn('slow'); return false; } if(password.value==""){ $('#reg_password').css({"border-color":"red"}); password.focus(); $('.error_password_reg').fadeIn('slow'); $(".error_password_reg").html("Please enter password !"); return false; } if(password.value.length<8){ $('#reg_password').css({"border-color":"red"}); password.focus(); $(".error_password_reg").html("Passwrod should be greater than 8 digit !"); $('.error_password_reg').fadeIn('slow'); return false; } if(con_password.value==""){ $('#reg_con_password').css({"border-color":"red"}); con_password.focus(); $('.error_con_password_reg').fadeIn('slow'); $(".error_con_password_reg").html("Please enter confirm password !"); return false; } if(con_password.value!=password.value){ $('#reg_con_password').css({"border-color":"red"}); $('#reg_password').css({"border-color":"red"}); con_password.focus(); $('.error_con_password_reg').fadeIn('slow'); $(".error_con_password_reg").html("Password does not match !"); return false; } } function errNameReg(){ $('#reg_name').css({"border-color":"#A89842"}); $('.error_name_reg').css({"display":"none"}); } function errEmailReg(){ $('#reg_email').css({"border-color":"#A89842"}); $('.error_email_reg').css({"display":"none"}); } function errPhoneReg(){ $('#reg_contact').css({"border-color":"#A89842"}); $('.error_contact_reg').css({"display":"none"}); } function errCountryReg(){ $('#reg_country').css({"border-color":"#A89842"}); $('.error_country_reg').css({"display":"none"}); } function errPasswordReg(){ $('#reg_password').css({"border-color":"#A89842"}); $('.error_password_reg').css({"display":"none"}); } function errConPasswordReg(){ $('#reg_con_password').css({"border-color":"#A89842"}); $('.error_con_password_reg').css({"display":"none"}); } </script> <script> $(document).ready(function(){ $('#reg_email').change(function(){ var email=$('#reg_email').val(); $.ajax({ url:"check-duplicate.php", type:"POST", data:{email:email}, success:function(data){ if(data==1){ swal({title: "Email address is already exist !", text: "", showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "warning"}, function(){ $('#SubmitReg').attr("disabled","disabled"); $('#SubmitReg').css({"cursor":"no-drop"}); $('#SubmitReg').css({"background-color":"black"}); } ); }else{ $('#SubmitReg').attr("disabled",false); $('#SubmitReg').css({"cursor":"pointer"}); } } }); }); }); </script> <!-- --------------------------------------------------SIGNUP END --> <script src="<?=$site_url?>/js/jquery.min.js"></script> <script src="<?=$site_url?>/js/bootstrap.min.js"></script> <script src="<?=$site_url?>/js/bootstrap-select.min.js"></script> <script src="<?=$site_url?>/js/jquery.bootstrap-touchspin.js"></script> <script src="<?=$site_url?>/js/magnific-popup.js"></script> <script src="<?=$site_url?>/js/waypoints-min.js"></script> <script src="<?=$site_url?>/js/imagesloaded.js"></script> <script src="<?=$site_url?>/js/masonry-3.1.4.js"></script> <script src="<?=$site_url?>/js/masonry.filter.js"></script> <script src="<?=$site_url?>/js/owl.carousel.js"></script> <script src="<?=$site_url?>/js/custom.js"></script> <script src="<?=$site_url?>/js/dz.carousel.js"></script> <script src="<?=$site_url?>/js/switcher.min.js"></script> </body> </html>