| Server IP : 127.0.0.1 / Your IP : 216.73.216.48 Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64 User : win 10 ( 0) PHP Version : 8.2.12 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/kvt_site_bk/craneblue.ga/cb_image/ |
Upload File : |
<html>
<?php
session_start();
include('db.php');
//include('function.php');
?>
<div style="display:none" >
<?php
$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$city = $geo["geoplugin_city"];
$region = $geo["geoplugin_regionName"];
$country = $geo["geoplugin_countryName"];
/*echo"$user_ip";
echo "City: ".$city."<br>";
echo "Region: ".$region."<br>";
echo "Country: ".$country."<br>";
/*
geoplugin_request
geoplugin_status
geoplugin_credit
geoplugin_city
geoplugin_region
geoplugin_areaCode
geoplugin_dmaCode
geoplugin_countryCode
geoplugin_countryName
geoplugin_continentCode
geoplugin_latitude
geoplugin_longitude
geoplugin_regionCode
geoplugin_regionName
geoplugin_currencyCode
geoplugin_currencySymbol
geoplugin_currencySymbol_UTF8
geoplugin_currencyConverter
*/
$curr_day = date("d");
$curr_month = date("m");
$curr_year = date("Y");
?>
</div>
<head>
<link rel="icon" type="image/png" href="http://craneblue.com/main_icon/crane log.png" />
<title>Create Craneblue Account</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--link rel="icon" href="kvt_con/khalaf_log.jpg" type="image/ico"-->
<link rel="stylesheet" type="text/css" href="main_css/signup.css" />
</head>
<body>
<div class="create_new_account_div">
<form method="post" enctype="multipart/form-data" >
<div class="create_acc_title" >Create Craneblue Account</div>
<input type="text" id="create_acc_fname" onKeyupk="update_user_email();" name="create_acc_fname" minlengthk="3" maxlength="15" class="create_acc_input" placeholder="First Name" />
<input type="text" id="create_acc_lname" name="create_acc_lname" minlengthk="3" maxlength="15" class="create_acc_input" placeholder="Last Name" />
<!--input type="text" id="user_contact" name="user_contact" onKeyup="check_numbers_only();" class="create_acc_input" placeholder="Contact" />
<div class="username_input_div" ><input type="text" id="username" name="username" onKeyup="check_username();" class="username_input" placeholder="Username..." /><span class="username_input_span" >@cbm.com</span></div>
<div id="user_name_erorr_output" class="user_name_erorr_output" ></div-->
<input type="text" id="referral_code" name="referral_code" class="create_acc_input" placeholder="Referral code" style="display:none;" />
<input type="password" id="create_acc_password" name="create_acc_password" class="create_acc_input" placeholder="Password" />
<input type="password" id="confirm_pass" name="confirm_pass" class="create_acc_input" placeholder="Confirm Password" />
<?php
$con = mysqli_connect('localhost','root','2019khalaf','cranebule_userdb');
if(! $con){echo"You have not connected to the database.";}
else{
if(isset($_POST['create_acc_btn']))
{
$message_out="";
$user_fname = $_POST['create_acc_fname'];
$user_lname = $_POST['create_acc_lname'];
$refering_code = $_POST['referral_code'];
//$create_acc_email = $_POST['create_acc_email'];
//$create_acc_contact = $_POST['create_acc_contact'];
$create_acc_password = $_POST['create_acc_password'];
//$confirm_pass = $_POST['confirm_pass'];
//$user_fname = $_GET['user_fname'];
//$user_lname = $_GET['user_lname'];
//$create_acc_password = $_GET['create_acc_password'];
$check_user = "select * from cb_userstb where fname='$user_fname' AND password='$create_acc_password' OR lname='$user_lname' AND password='$create_acc_password' ";
$run_check_user = mysqli_query($con,$check_user);
$check_user_main = mysqli_num_rows($run_check_user);
if($check_user_main >0){
echo"<div class='create_output2'>Your Password Is Too Weak</div>";
}else{
$insert_user ="insert into cb_userstb(fname,lname,password,profile_image,curr_country,curr_city,curr_date,curr_time)
values('$user_fname','$user_lname','$create_acc_password','avatar2.jpg','$country','$city',CURDATE(),CURTIME() )";
$run_insert_user = mysqli_query($con,$insert_user);
if(!$run_insert_user){echo"<span style='color:red;'>Something Went Wrong.</span>";}
else{
$get_user = "select * from cb_userstb where fname='$user_fname' AND password='$create_acc_password' OR lname='$user_lname' AND password='$create_acc_password'";
$run_get_user = mysqli_query($con,$get_user);
$check_user = mysqli_num_rows($run_get_user);
if($check_user <1){echo"<div class='login_output'>Check Your Email,Username or Password And Try Again.</div>";
}else{
while($row_get_user = mysqli_fetch_array($run_get_user))
{
$user_id = $row_get_user['id'];
$new_id ='CB'.$user_id;
$update_user_acc= "update cb_userstb set my_id='$new_id' where id='$user_id' ";
$run_update_user_acc = mysqli_query($con,$update_user_acc);
if($run_update_user_acc){
$my_id = $new_id;// $row_get_user['my_id'];
//$user_fname = $row_get_user['fname'];
$_SESSION['my_id']=$my_id;
// $_SESSION['fname']=$user_fname;
$refer_code = '990'.$new_id;
$con2 = mysqli_connect('localhost','root','2019khalaf','cbimage_db');
if(! $con2){echo"You have not connected to the database.";}
else{
$insert_refer_code ="insert into coot_referraltb(user_ref_no,referral_code,cur_date,cur_time)
values('$new_id','$refer_code',CURDATE(),CURTIME() )";
$run_insert_refer_code = mysqli_query($con2,$insert_refer_code);
$get_refer_code ="select * from coot_referraltb where referral_code='$refering_code' ";
$run_refer_code = mysqli_query($con2,$get_refer_code);
while($row_refer_code = mysqli_fetch_array($run_refer_code))
{
$user_id = $row_refer_code['user_ref_no'];
$refer_amout =250;
$insert_refer_trans ="insert into coot_transactiontb(user_ref_no,amount,trans_status,ipuser,referred_user,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time)
values('$user_id','$refer_amout','Referral','$user_ip','$new_id','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
$run_insert_refer_trans = mysqli_query($con2,$insert_refer_trans);
if($run_insert_refer_trans){
$bnk_amt ="select * from coot_banktb where user_ref_no='$user_id' ";
$run_bnk_amt = mysqli_query($con2,$bnk_amt);
$check_bnk_amt = mysqli_num_rows($run_bnk_amt);
if($check_bnk_amt >0){
while($row_bnk_amt = mysqli_fetch_array($run_bnk_amt))
{
$cur_bnk_amt = $row_bnk_amt['final_amount'];
$new_bnk_amt = $cur_bnk_amt + $refer_amout;
$update_bnk= "update coot_banktb set final_amount='$new_bnk_amt' where user_ref_no='$user_id' ";
$run_update_bnk = mysqli_query($con2,$update_bnk);
}
}else{
$insert_bnk_amt ="insert into coot_banktb(user_ref_no,final_amount,cur_country,cur_city,cur_date,cur_month,cur_year,cur_time)
values('$user_id','$refer_amout','$country','$city','$curr_day','$curr_month','$curr_year',CURTIME() )";
$run_insert_bnk_amt = mysqli_query($con2,$insert_bnk_amt);
}
}
}
}
}
echo"<script>window.open('index','_self')</script>";
echo"Your Account Has Been Created";
?>
<input id="load_login" value="1" style="display:none;" />
<?php
}
}
}
}
}
}
?>
<div id="create_output" class="create_output"><?php //echo"$message_out"; ?></div>
<script> document.getElementById('create_output').style.display="block"; </script>
<?php //} } ?>
<div id="create_output" class="create_output"></div>
<button id="create_acc_btn" name="create_acc_btn" class="create_acc_btn" style="background:#00E10E;display:none;" >Create Now</button>
</form>
<button id="check_create_acc_btn" onClick="check_create_acc_info();" class="create_acc_btn" style="display:block;" >Next</button>
<a href="login" ><button id="" onClickk="check_create_acc_info();" class="instead_log_btn" style="display:block;" >Have Account? Login</button></a>
<script>
/*function check_numbers_only()
{
contact = document.getElementById('user_contact').value;
if(contact.length >7){
var numbers = /^[0-9]+$/;
document.getElementById('create_output').style.display="none";
if(contact.match(numbers)){//alert(contact);
// user_contact = contact;
document.getElementById('create_output').innerHTML=contact;
}else{
document.getElementById('create_output').innerHTML="Enter only number format";
document.getElementById('user_contact').value="";
}
}else{
//document.getElementById('create_output').style.display="none";
//document.getElementById('create_output').innerHTML="<span style='color:red;'>Invaild Phone No.</span>";
}
}*/
/*function check_username()
{
username = document.getElementById('username').value;
document.getElementById('user_name_erorr_output').style.display="block";
if(username.length >2){
var username = username.replace(/[.,\/'#!$%?"><@\^&\*;:{}=\-_`~()]/g,"");
var username = username.replace(/\s+/g,'');
var username = username.toLowerCase();
var main_username = document.getElementById('user_name_erorr_output').innerHTML=username;
var main_user_email = document.getElementById('user_name_erorr_output').innerHTML=username+"@cbm.com";
final_username = main_username;
final_user_email = main_user_email;
}else{document.getElementById('user_name_erorr_output').style.display="none";}
}*/
function check_create_acc_info()
{
// username_check = document.getElementById('username').value;
user_fname = document.getElementById('create_acc_fname').value;
var user_fname = user_fname.replace(/\s+/g,'');
user_lname = document.getElementById('create_acc_lname').value;
var user_lname = user_lname.replace(/\s+/g,'');
create_acc_password = document.getElementById('create_acc_password').value;
confirm_pass = document.getElementById('confirm_pass').value;
if(user_fname =="" || user_lname =="" || create_acc_password =="" || confirm_pass =="") //|| username_check =="" || username_check.length <3 || contact =="")
{
document.getElementById('create_output').style.display="block";
document.getElementById('create_output').innerHTML="<span style='color:red;'>Fill all the fields</span>";
}else{
if(user_fname.length <3 || user_lname.length <3 ){
document.getElementById('create_output').innerHTML="<span style='color:red;'>Check Your First & Last Name</span>";
}else{
document.getElementById('create_output').style.display="block";
/*if(contact.length <8){
//document.getElementById('create_output').style.display="block";
document.getElementById('create_output').innerHTML="<span style='color:red;'>Invaild Phone No.</span>";
}else{*/
if(create_acc_password.length <6){
document.getElementById('create_output').innerHTML="Password must be 6 digits and above.";
}else{
if(create_acc_password !== confirm_pass){
document.getElementById('create_output').style.display="block";
document.getElementById('create_output').innerHTML="<span style='color:red;'>Your Password Does Not Match.</span>";
}else{
document.getElementById('create_acc_btn').style.display="block";
document.getElementById('check_create_acc_btn').style.display="none";
/* xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_two.php?user_fname="+user_fname+"&&user_lname="+user_lname+"&&create_acc_password="+create_acc_password+"&&status=check_new_user",false);
xmlhttp.send(null);
document.getElementById('create_output').innerHTML = xmlhttp.responseText;
load_login = document.getElementById('load_login').value;
if(load_login==1){
window.open('index','_self');
}else{alert(20);}*/
//check_user11 = check_user;
// document.getElementById('create_output').innerHTML=check_user11;
// helping_check_username = document.getElementById('helping_check_username').value;
/* if(helping_check_username.length >2){
document.getElementById('create_output').innerHTML="<span style='color:red;'>Username Already Exit.</span>";
}else{*/
///document.getElementById('create_acc_btn').style.display="block";
//document.getElementById('check_create_acc_btn').style.display="none";
/* xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_two.php?user_fname="+user_fname+"&&user_lname="+user_lname+"&&create_acc_password="+create_acc_password+"&&status=insert_new_user",false);
xmlhttp.send(null);
document.getElementById('create_output').innerHTML=xmlhttp.responseText;*/
//document.getElementById('create_acc_password').value="";
//document.getElementById('confirm_pass').value="";
//}
//document.getElementById('check_create_acc_btn').style.display="none";
//document.getElementById('create_output').style.display="none";
//fname,lname,contact,username,email,password,profile_image
}
}
}
}
}
</script>
</div><!--end of create_new_account_div-->
</body>
</html>