| 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:/xampp/htdocs-coblaa/CrinePay/ |
Upload File : |
<html>
<?php
include('db.php');
session_start();
if(isset($_SESSION['id']))
{
$my_id = $_SESSION['id'];
}
if(isset($_GET['dep']))
{
$inlet = $_GET['dep'];
//$dur = $_GET['dur'];
//$sek = $_GET['sek'];
}
$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$city = $geo["geoplugin_city"];
$country = $geo["geoplugin_countryName"];
$cur_date = date("d");
$cur_month = date("M");
$cur_year = date("Y");
?>
<head>
<title>Stock</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main_css/deposit.css" />
</head>
<body onclick="get_focused();" >
<?php if(!isset($_SESSION['id'])){echo"<script>window.open('login', '_self')</script>";}else{?>
<div class="main_content_div" >
<!--div class="main_home_tile" >Craneblue</div-->
<div class="main_home_tile" ><img src="main_icon/bk.png" onclick="history.back()" class="main_icon_img" />Deposit</div>
<div class="acc_div" >
<div class="acc_div_left" >
<span class="acc_title" >Account no.</span>
<?php
$get_user_login ="select * from crane_pay_usertb where id='$my_id'";
$run_get_user_login = mysqli_query($con,$get_user_login);
while($row_get_user_login = mysqli_fetch_array($run_get_user_login))
{
$user_acc = $row_get_user_login['user_phone_no'];
?>
<span class="acc_namba" ><?php echo"$user_acc"; ?></span>
<?php } ?>
</div>
<div class="acc_div_right" >
<span class="amt_title" >Available balance</span>
<?php
$get_banktb ="select * from banktb where my_id='$my_id'";
$run_get_bank = mysqli_query($con,$get_banktb);
while($row_get_bank = mysqli_fetch_array($run_get_bank))
{
$user_amt = $row_get_bank['acc_amount'];
//$profit_amt = $row_get_bank['profit_gain'];
//$total_amt = $user_amt + $profit_amt;
$total_amt = $user_amt;
?>
<span class="amt_avail" ><?php echo"$total_amt/="; ?></span>
<?php } ?>
</div> </div>
<div class="deposit_tips_div" >
<!--span class="deposit_tip" >Depost from CrinePay agent</span-->
<span class="deposit_title" >You can deposit from CrinePay agent</span>
</div>
<span class="deposit_tip" >OR</span>
<div class="deposit_tips_div" >
<span class="deposit_title" >Deposit from mobile money</span>
<button class="dp_cancel_btn" >No</button>
<button class="dp_next_btn" >Yes</button>
</div>
<div class="deposit_tips_div" >
<span class="deposit_tip" >Send money to CrinePay</span>
<span class="deposit_title" >0751045153</span>
<span class="deposit_tip" >Danny M</span>
</div>
<div id="deposit_div" class="deposit_div" >
<form method="post">
<span class="deposit_lebal" >Trans type</span>
<select name="trans_type" type="number" minlength="11" maxlength="11" class="deposit_input" >
<option class="deposit_input" >Select</option>
<option class="deposit_input" >Airtel money</option>
<option class="deposit_input" >Mtn m money</option>
</select>
<span class="deposit_lebal" >Enter Trans-Id from mobile money sms</span>
<input name="trans_id" type="number" minlength="11" maxlength="11" class="deposit_input" />
<span class="deposit_lebal" >Enter Amount Deposited</span>
<input name="deposit_amount" type="number" class="deposit_input" />
<?php
if(isset($_POST['deposit_btn']))
{
$trans_type = $_POST['trans_type'];
$trans_id = $_POST['trans_id'];
$deposit_amount = $_POST['deposit_amount'];
$transid_leng = strlen($trans_id);
if($transid_leng !==11){echo"<div style='float:left;width:100%;height:30px;line-height:30px;text-align:center;font-size:1.1em;color:red;' >Invalid Trans-Id</div>";}else{
$get_user_login ="select * from crane_pay_usertb where id='$my_id'";
$run_get_user_login = mysqli_query($con,$get_user_login);
while($row_get_user_login = mysqli_fetch_array($run_get_user_login))
{
$user_acc = $row_get_user_login['user_phone_no'];
$fname = $row_get_user_login['fname'];
$lname = $row_get_user_login['lname'];
if($trans_id =="" or $deposit_amount =="" or $trans_type=='Select' ){
echo"<div style='float:left;width:100%;height:40px;line-height:40px;text-align:center;color:red;'> Fill all the fields and select translation type</div>";
}else{
$check_bank ="select * from pending_withdrawtb where trans_id='$trans_id'";
$run_check_bank = mysqli_query($con,$check_bank);
//while($row_get_check_bank = mysqli_fetch_array($run_check_bank))
$check_old_bank = mysqli_num_rows($run_check_bank);
if($check_old_bank >0){
echo"<div style='float:left;width:100%;height:auto;line-height:30px;background:#fff;text-align:center;color:red;'>Something went wrong, Check your TransID.</div>";
}else{
//$old_transid = $row_get_check_bank['trans_id'];
//$insert_new_dep ="insert into pending_withdrawtb(my_id,account_no,amount,trans_id,description,status,user_county,user_city,cur_date,cur_month,cur_year,cur_time)
//values('$my_id','$user_acc','$deposit_amount','$trans_id','Deposit','Pending','$country','$city','$cur_date','$cur_month','$cur_year',CURTIME())";
$insert_new_dep="insert into bank_transtb(my_id,receive_account,receive_name,amount,transaction_type,charges,DP_trans_id,description,status,user_country,user_city,cur_date,cur_month,cur_year,curtime)
values('$my_id','$user_acc','$fname $lname','$deposit_amount','Crane pay','0','$trans_id','Deposit','Pending','$country','$city','$cur_date','$cur_month','$cur_year',CURTIME())";
$run_new_dep = mysqli_query($con,$insert_new_dep);
if(!$run_new_dep){
echo"<div style='float:left;width:100%;height:40px;line-height:40px;text-align:center;color:red;'>Something went wrong, Try again later.</div>";
}else{
echo"<div style='float:left;width:100%;height:auto;line-height:30px;background:#fff;text-align:center;color:green;'>Transaction successfully completed, Your Account will be updated within 24hrs.</div>";
?>
<script>
document.getElementById('deposit_btn').style.display="none";
</script>
<?php
}
}
}
}
}
}
?>
<button id="deposit_btn" name="deposit_btn" class="deposit_btn" >Finish</button>
</form>
</div>
</div>
<script>
function show_more_detail(smd)
{
invest_detail_div1 = 'invest_detail_div'+smd;
clear_invest_btn1 = 'clear_invest_btn'+smd;
show_invest_btn1 = 'show_invest_btn'+smd;
document.getElementById(invest_detail_div1).style.display="block";
document.getElementById(clear_invest_btn1).style.display="block";
document.getElementById(show_invest_btn1).style.display="none";
//alert(4);
}
function clear_more_detail(cmd)
{
invest_detail_div1 = 'invest_detail_div'+cmd;
clear_invest_btn1 = 'clear_invest_btn'+cmd;
show_invest_btn1 = 'show_invest_btn'+cmd;
document.getElementById(invest_detail_div1).style.display="none";
document.getElementById(clear_invest_btn1).style.display="none";
document.getElementById(show_invest_btn1).style.display="block";
//alert(4);
}
function close_all_open_div()
{
document.getElementById(invest_detail_div1).style.display="none";
document.getElementById(clear_invest_btn1).style.display="none";
document.getElementById(show_invest_btn1).style.display="block";
}
function show_depositing_div(sdd)
{
document.getElementById('deposit_div').style.display="block";
document.getElementById('stake_lebal_div').style.display="none";
document.getElementById('main_content').style.display="none";
document.getElementById('main_button_div').style.display="none";
alert(sdd);
}
</script>
<?php } ?>
</body>
</html>