| 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['my_id']))
{
$my_id = $_SESSION['my_id'];
}
?>
<head>
<title>CrinePay</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main_css/send_money.css?v2" />
</head>
<body >
<input id="my_id" style="display:none;" value="<?php echo"$my_id";?>" />
<?php if(!isset($_SESSION['my_id'])){ echo"<script>window.open('login', '_self')</script>"; ?>
<?php }else{ ?>
<div class="main_content_div" >
<div class="home_div" >
<img onclick="history.back()" src="main_icon/bk.png" class="back_btn_img" />
<span class="send_m_title">Send Money</span>
<!--img src="main_icon/sm2.png" class="back_btn_img" /-->
</div>
<div class="send_money_div">
<span class="send_input_lebal">Transaction type</span>
<select id="trans_type" class="send_input">
<option class="send_input">select</option>
<option class="send_input">CrinePay</option>
<!--option class="send_input">Mobile money</option-->
</select>
<button id="check_next_btn" onclick="show_input_area();" class="check_next_btn" >Next</button>
<div id="helping_div1" style="display:none;">
<div id="send_tip_lebal" class="send_tip_lebal"></div>
<span class="send_input_lebal">Mobile - Acc no.</span>
<span id="c_code" class="c_code" style="display:none;"></span>
<input id="to_mob_acc_no" class="send_input" minlength="10" maxlength="10" type="number" />
<span id="to_name_lebal" class="send_input_lebal" style="display:none;">Mobile - Acc no </span>
<input id="to_name" class="send_input" value="" style="display:none;" />
<span class="send_input_lebal">Amount ugx</span>
<input id="amount" type="number" class="send_input" />
<span id="send_fee_lebal" class="send_input_lebal" style="display:none;">Charges</span>
<input id="send_fee" type="number" class="send_input" disabled style="display:none;" />
<button id="send_btn" onclick="check_send();" class="send_btn">Send</button>
</div>
<div id="report_output" class="report_output" ></div>
</div>
<div id="comfirm_trans" class="comfirm_trans">
<div class="comfirm_title">Comfirm Transaction</div>
<button onclick="cancel_send_trans();" class="send_comfirm_btn" style="background:#fff;color:red;">Cancel</button>
<button id="send_comfirm_btn" class="send_comfirm_btn" onclick="comfirmed_send();" style="background:#fff;color:green;">Send</button>
</div>
</div>
<script>
function show_input_area()
{
cur_trans_type = document.getElementById('trans_type').value;
if(cur_trans_type =='CrinePay'){
document.getElementById('trans_type').disabled=true;
document.getElementById('helping_div1').style.display="block";
document.getElementById('check_next_btn').style.display="none";
document.getElementById('c_code').innerHTML="Acc no.";
document.getElementById('report_output').innerHTML="";
}else if(cur_trans_type == 'Mobile money'){
document.getElementById('report_output').innerHTML ='Fill all the filds.';
document.getElementById('trans_type').disabled=true;
document.getElementById('helping_div1').style.display="block";
//document.getElementById('to_name_lebal').style.display="block";
//document.getElementById('to_name').style.display="block";
document.getElementById('check_next_btn').style.display="none";
document.getElementById('c_code').innerHTML="+256";
}else{document.getElementById('report_output').innerHTML ="Select transaction type";}
}
function check_send()
{
var char_me_level = 10001;
var char_me_level2 = 25001;
var char_me_level3 = 60001;
var char_me_level4 = 5000000;
my_id = document.getElementById('my_id').value;
trans_type = document.getElementById('trans_type').value;
to_mob_acc_no = document.getElementById('to_mob_acc_no').value;
to_name = document.getElementById('to_name').value;
amount = document.getElementById('amount').value;
send_fee = document.getElementById('send_fee').value;
if(trans_type =="select" || to_mob_acc_no =="" || amount ==""){
document.getElementById('report_output').innerHTML ='Fill all the filds.';
}else{
if(amount < char_me_level ){cur_charj = 60;}else if(amount < char_me_level2 ){cur_charj = 150;}else if(amount < char_me_level3){cur_charj = 240;}else if(amount < char_me_level4){cur_charj = 650;}
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&amount="+amount+"&&to_mob_acc_no="+to_mob_acc_no+"&&cur_charj="+cur_charj+"&&status=check_send",false);
xmlhttp.send(null);
document.getElementById('report_output').innerHTML =xmlhttp.responseText;
to_account_name = document.getElementById('to_account_name').value;
account_no = document.getElementById('account_no').value;
total_amt = document.getElementById('total_amt').value;
if(account_no == to_mob_acc_no && trans_type =='CrinePay'){document.getElementById('report_output').innerHTML ='Not allowed to send to this account.';}else{
cur_amount = Number(total_amt);
final_amt = cur_amount-cur_charj;
if(final_amt < amount ){
document.getElementById('report_output').innerHTML ='Insufficient balance '+total_amt+'/=';
}else{
document.getElementById('comfirm_trans').style.display="block";
document.getElementById('send_btn').style.display="none";
document.getElementById('to_name').value=to_account_name;
document.getElementById('to_name').style.display="block";
document.getElementById('to_name_lebal').style.display="block";
document.getElementById('send_fee').value=cur_charj;
document.getElementById('send_fee').style.display="block";
document.getElementById('send_fee_lebal').style.display="block";
document.getElementById("amount").disabled = true;
document.getElementById("to_mob_acc_no").disabled = true;
document.getElementById("trans_type").disabled = true;
document.getElementById("to_name").disabled = true;
//alert(to_account_name);
}
}
}
}
function comfirmed_send()
{
my_id = document.getElementById('my_id').value;
trans_type = document.getElementById('trans_type').value;
to_mob_acc_no = document.getElementById('to_mob_acc_no').value;
to_name = document.getElementById('to_name').value;
amount = document.getElementById('amount').value;
send_charj = document.getElementById('send_charj').value;
//alert(send_charj);
document.getElementById('send_comfirm_btn').style.display='none';
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&trans_type="+trans_type+"&&to_mob_acc_no="+to_mob_acc_no+"&&to_name="+to_name+"&&amount="+amount+"&&send_charj="+send_charj+"&&status=save_sent_money",false);
xmlhttp.send(null);
//document.getElementById('error_output').innerHTML =xmlhttp.responseText;
//document.getElementById('search_rept_output').style.display="none";
document.getElementById('trans_type').value="select";
document.getElementById('to_mob_acc_no').value="";
document.getElementById('to_name').value="";
document.getElementById('amount').value="";
window.open('transaction', '_self');
//alert(3232);
}
function cancel_send_trans()
{
window.open('send_money','self');
}
</script>
<?php } ?>
</body>
</html>