[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: reg.php
<?php include("header.php"); $show=new Oops($db); ?> <script> $(document).ready(function(){ $('#phn').keyup(function(){ var phn1=$('#phn').val(); $.ajax({ type:"POST", url:"ajax_check_phone.php", data:$('#form').serialize(), success: function (response){ if(response==1){ $('#error').show(); document.getElementById("btn").disabled = true; }else{ $('#error').hide(); document.getElementById("btn").disabled = false; } } }); }); }); $(document).ready(function(){ $('#em').keyup(function(){ var em=$('#em').val(); $.ajax({ type:"POST", url:"ajax_email.php", data:$('#form').serialize(), success: function (response){ if(response==1){ $('#error1').show(); document.getElementById("btn").disabled = true; }else{ $('#error1').hide(); document.getElementById("btn").disabled = false; } } }); }); }); function checkPass() { var pass1 = document.getElementById('pass1'); var pass2 = document.getElementById('pass2'); var message = document.getElementById('error-nwl'); var goodColor = "#66cc66"; var badColor = "#ff6666"; if(pass1.value.length > 7) { message.style.color = goodColor; message.innerHTML = "character number ok!" } else { message.style.color = badColor; message.innerHTML = " you have to enter at least 8 digit!" return; } if(pass1.value == pass2.value) { message.style.color = goodColor; message.innerHTML = "ok!" document.getElementById("btn").disabled = false; } else { message.style.color = badColor; message.innerHTML = " These passwords don't match" document.getElementById("btn").disabled = true; } } </script> <!--// header --> <!-- reg --> <div class="signupform"> <!-- //tittle heading --> <div class="container"> <!-- main content --> <div class="agile_info"> <!-- <div class="w3l_form"> <div class="left_grid_info"> <img src="images/left.png" alt="" /> </div> </div> --> <div class="w3_info"> <h2>Sign up for an Account</h2> <form action="" method="post" id="form"> <div class="input-group"> <span><i class="fa fa-user" aria-hidden="true"></i></span> <input type="text" placeholder="Full Name" name="name" required=""> <input type="hidden" name="tablename" value="client"> </div> <div class="input-group"> <span><i class="fa fa-phone" aria-hidden="true"></i></span> <input type="text" pattern="[0-9]{10}" maxlength="10" title="Please Give correct Format" id="phn" name="phone" placeholder="Contact Number" required=""> <span class='label label-danger' id="error" style="display:none">Phone Number already in use.Please Give another Phone Number</span> </div> <div class="input-group"> <span><i class="fa fa-envelope" aria-hidden="true"></i></span> <input type="email" name="email" id="em" placeholder="Email" required=""> <span class='label label-danger' id="error1" style="display:none">Email already in use.Please Give another Email ID</span> </div> <div class="input-group"> <span class="fa fa-calendar" aria-hidden="true"></span> <input type="text" class="pin" name="pincode" placeholder="Pincode" pattern="[0-9]{6}" title="Please give Correct pincode" required=""> </div> <div class="input-group"> <span class="fa fa-location-arrow" aria-hidden="true"></span> <select class="drop" name="st" id="typ" required="" style=""><option value="">Select</option> <option value="">State</option> <?php $table1='state_list'; $stmt=$show->state($table1); $num=$stmt->rowCount(); if($num>0){ while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ echo "<option value='".$row['state']."'>".$row['state']."</option>"; } } ?> </select> </div> <div class="input-group"> <span class="fa fa-home" aria-hidden="true"></span> <input type="text" class="city" name="city" placeholder="City" required=""> </div> <div class="input-group"> <span class="fa fa-map" aria-hidden="true"></span> <textarea placeholder="Address" name="address" style="" required=""></textarea> </div> <div class="input-group"> <span><i class="fa fa-lock" aria-hidden="true"></i></span> <input type="password" name="password" style="background: none;" title="Must contain atleast a number and an alphabet." id="pass1" onkeyup="checkPass(); return false;" placeholder="Password" required > </div> <div class="input-group"> <span><i class="fa fa-lock" aria-hidden="true"></i></span> <input type="password" name="cpassword1" style="background: none;" title="Must contain atleast a number and an alphabet."id="pass2" onkeyup="checkPass(); return false;" placeholder="Confirm Password" required > <div id="error-nwl"></div> </div> <input type="submit" class="btn btn-danger btn-block" value="Register" name="sub" id="btn"> <input type="reset" class="btn btn-danger btn-block" value="Refresh" onclick="myFunction()"> </form> <p class="account">Already have an account? <a href="login.php"><strong>Login</strong></a></p> </div> </div> <!-- //main content --> </div> <img src="images/gif-reg.gif" alt="" class="reg-imgs" style="" /> <br> <br> </div> <?php if(isset($_POST['sub'])){ // $status='Active'; $uid=$show->getid('ids','USR'); $table='client'; $data = array( 'client_id' => $uid, 'name' => htmlentities(strip_tags($_POST['name'])), 'phone' => htmlentities(strip_tags($_POST['phone'])), 'email' => htmlentities(strip_tags($_POST['email'])), 'password' =>md5($_POST['cpassword1']), 'address'=>htmlentities(strip_tags($_POST['address'])), 'state'=>htmlentities(strip_tags($_POST['st'])), 'city'=>htmlentities(strip_tags($_POST['city'])), 'pincode'=>htmlentities(strip_tags($_POST['pincode'])), 'created_at'=>date('d-m-Y'), 'update_by'=>'SELF', 'status'=>'INACTIVE' ); $no=rand(1,10000); $capcha=$no; print_r($data); $em=htmlentities(strip_tags($_POST['email'])); if($show->insert($table,$data)){ echo '<script> swal({ title: "Thank You!", text: "Your Registration is successful.OTP has been sent to your mail id.Please verify to continue.", type: "success" }) .then((willDelete) => { if (willDelete) { swal("You will be redirected to OTP page"); window.location = "otp.php?id='.base64_encode($capcha).'&uid='.base64_encode($uid).'&m='.base64_encode($em).'"; } }); </script>'; // echo "<script>swal('Thank you','Your registration is complete.Please login to continue.','success');window.location.href='login.php';</script>"; $_SESSION['trans']=$a; $email_subject = "Registration Confirmation"; $em11='<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; $email_content1="<html><head> <style> h2{ color:#000; font-size:26px; } #b{ width:500px; font-size:15px; } th{ background-color:#fff; } body, td, input, textarea, select { font-family:'Podkova', serif; margin: 0; } </style> </head> <body> <table style='border: 20px double #999;' width='800px'> <tr><td style='text-align:center;background: #999;'> <h3 style='text-align: center; color: #fff; font-size: 20px; text-transform: uppercase;'>Welcome to $company_name</h3></td></tr> <tr><td style='text-align:justify;font-size:18px;'><br>Hi Admin,<br><br> New registration is been confirmed. <br> <br><br><br><br> Thanks & Regards,<br> $company_name,<br> Web : $website/<br> Email : $email<br> <br> <br> </td></tr> </tr> </table> </body></html>"; $email_content=" <html><head> <style> h2{ color:#000; font-size:26px; } #b{ width:500px; font-size:15px; } th{ background-color:#fff; } body, td, input, textarea, select { font-family:'Podkova', serif; margin: 0; } </style> </head> <body> <table style='border: 20px double #999;' width='800px'> <tr><td style='text-align:center;background: #999;'> <h3 style='text-align: center; color: #fff; font-size: 20px; text-transform: uppercase;'>Welcome to $company_name</h3></td></tr> <tr><td style='text-align:justify;padding:12px;font-size:18px;'><br>Hi ".$_POST['name'].",<br><br> Your Registration with email id ".$em." has been successful.This is your OTP for verification. <br><br> OTP :$capcha <br> <br><br><br><br> Thanks & Regards,<br> $company_name,<br> Web : $website/<br> Email : $email<br> <br> <br> </td></tr> </tr> </table> </body></html>"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; if(@mail($email,$email_subject,$email_content1,$headers) && @mail($em,$email_subject,$email_content,$headers)) { // echo "<script>window.location.href='otp.php?id=".base64_encode($capcha)."&uid=".base64_encode($id)."&m=".base64_encode($mail_id)."'</script>"; } else { //echo "<script>alert('Registration is Complete. Login to continue shopping.')</script>"; } } } ?> <?php include("footer.php"); ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.72 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619