| 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:/xamppkk/htdocs-coblaa/cranepay/ |
Upload File : |
<html>
<?php
include('db.php');
session_start();
if(isset($_SESSION['id']))
{
$my_id = $_SESSION['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/agent_page.css" />
<meta name="google-adsense-account" content="ca-pub-4728417548940171"><!--gog ads -->
</head>
<body id="body" >
<input id="my_id" style="display:none;" value="<?php echo"$my_id";?>" />
<?php if(!isset($_SESSION['id'])){ echo"<script>window.open('login', '_self')</script>"; ?>
<?php }else{ ?>
<div id="main_content_div" class="main_content_div" >
<?php
$get_agt ="select * from agenttb where my_id='$my_id' ";
$run_agt = mysqli_query($con,$get_agt);
$chk_agt = mysqli_num_rows($run_agt);
if($chk_agt <1){ ?>
<div class="sub_content_div" >
<div id="agt_list_div" class="" >
<div class="agt_list_title" >Agent List</div>
<div class="agt_list_lebal_div" >
<span class="agt_list_lebal_n" >Agent Name</span>
<span class="agt_list_lebal" >Payment</span>
<span class="agt_list_lebal_action" >Action</span>
</div>
<?php
$get_agt ="select * from agenttb ";
$run_agt = mysqli_query($con,$get_agt);
while($row_agt =mysqli_fetch_array($run_agt))
{
$agt_name = $row_agt['fname'];
$agt_di = $row_agt['my_id'];
$cur_address = $row_agt['cur_address'];
$pay_method = $row_agt['pay_method'];
?>
<div class="agt_list_out_div" >
<span class="agt_list_out_n" ><?php echo $agt_name; ?></span>
<span class="agt_list_out" ><?php echo $pay_method; ?></span>
<a href="agent_page?request_dp=<?php echo $agt_di; ?>"><button class="agt_request_btn" >Deposit</button></a>
<span class="location_icon_span" >
<img src="main_icon/loct2.png" class="main_icon_img" />
<span class="location_lebal" ><?php echo $cur_address; ?></span>
<span class="online_status" >Online</span>
</span>
</div>
<?php } ?>
</div>
<a href="agent_page?agt_start=new" id="become_agt_btn" ><button class="become_agt_btn" >Become an Agent</button></a>
<?php if(isset($_GET['agt_start'])){ ?>
<div id="add_agt_div" >
<div class="home_div" >
<img onclick="history.back()" src="main_icon/bk.png" class="back_btn_img" />
<span class="send_m_title">Agent Form</span>
<!--img src="main_icon/sm2.png" class="back_btn_img" /-->
</div>
<div class="agent_tip" >
To become a CrinePay Agent you need to have a fully registered Ugandan phone number in the names you will provide as your CrinePay account names.
If your CrinePay account names don't match your phone number registration names, It will not be verified.
</div>
<div class="send_money_div">
<div id="send_tip_lebal" class="send_tip_lebal"></div>
<span class="send_input_lebal">First name</span>
<input id="agt_fname" class="send_input1" minlength="4"type="text" />
<span class="send_input_lebal">Last name</span>
<input id="agt_lname" class="send_input1" minlength="4"type="text" />
<span class="send_input_lebal">Current address</span>
<input id="agt_cur_address" class="send_input1" minlength="4"type="text" />
<span class="send_input_lebal">Place of birth</span>
<input id="agt_place_birth" class="send_input1" minlength="4"type="text" />
<div id="report_output" class="report_output" ></div>
<button id="agent_save_btn" onclick="agent_save();" class="send_btn">Finish</button>
</div>
<script>
document.getElementById('become_agt_btn').style="display:none";
document.getElementById('agt_list_div').style="display:none";
</script>
</div>
<?php } ?>
<?php if(isset($_GET['request_dp'])){
$agt_di = $_GET['request_dp'];
$get_user_agt ="select * from banktb where my_id='$agt_di' ";
$run_user_agt = mysqli_query($con,$get_user_agt);
while($row_user_agt = mysqli_fetch_array($run_user_agt))
{
$capt_agt = $row_user_agt['acc_amount'];
$acc_agt = $row_user_agt['account_no'];
$get_agt ="select * from agenttb where my_id='$agt_di' ";
$run_agt = mysqli_query($con,$get_agt);
while($row_agt =mysqli_fetch_array($run_agt))
{
$agt_name = $row_agt['fname'];
$pay_method = $row_agt['pay_method'];
?>
<div id="req_deposit_div" class="req_deposit_div" stylek="display:none" >
<!--img onclick="history.back()" src="main_icon/bk.png" class="back_req_btn_img" /-->
<span class="rqu_nw_dp_title">Requesting for deposit </span>
<span class="rqu_nw_dp_title">Agent <span style="color:#D0790A"><?php echo $agt_name ?></span> </span>
<span id="pay_method" class="req_pay_method"><?php echo $pay_method ?></span>
<span class="max_agt_dp" >Capital: <span id="agt_capt" ><?php echo $capt_agt ?></span>/=</span>
<div idk="check_agt_online_div" class="check_agt_online_div" >
<span class="check_agt_online_lebal" >Check if Agent is online, requesting deposit from an Agent online makes the transaction faster.</span>
<div class="single_agt_online_sms_div" >
<span id="check_agt_sms" class="check_agt_online_sms" >Hello, are you Online?</span>
<button id="check_agt_online_btn" onclick="check_agt_online();" class="check_agt_online_btn" >Send</button>
<input id="waiting_timer" class="hlp_inpt" value="1" />
</div>
</div>
<span id="wait_respond2" class="wait_respond2" ></span>
<div id="req_dp_hp_div" class="req_dp_hp_div" >
<span class="send_input_lebal">Request Amount</span>
<input id="request_amount" class="send_input1" type="text" />
<span id="req_error" class="req_error" ></span>
<button id="agt_dp_req_btn" onclick="trans_compeleted();" class="agt_dp_req_btn" style="color:red;" >Cancel</button>
<button id="agt_dp_req_btn" onclick="request_depost();" class="agt_dp_req_btn" style="color:green;">Request</button>
<input id="acc_agt" value="<?php echo $acc_agt ?>" class="acc_agt_help" />
<input id="agt_di" value="<?php echo $agt_di ?>" class="acc_agt_help" />
</div>
<!--div class="check_agt_online_div" >
<span class="check_agt_online_lebal" >Check if Agent is online, requesting deposit from an Agent online makes the transaction faster.</span>
<div class="single_agt_online_sms_div" >
<span id="check_agt_sms" class="check_agt_online_sms" >Hello, are you Online?</span>
<button onclick="check_agt_online();" class="check_agt_online_btn" >Send</button>
</div>
</div-->
</div>
<?php } } ?>
<div id="waiting_agt_respo_div" class="waiting_agt_respo_div">
<span id="check_agt_tip" class="wait_respond" >Waiting agent to respond...</span>
<span id="chk_screen" class="wait_respond" style="color:#C5067D;" ></span>
<button onclick="history.back();" id="sel_other_agt_btn" class="sel_other_agt_btn" >Ok</button>
</div>
<div id="agt_receive_details" class="agt_receive_details" stylek="display:none" >
<span id="loading_info" class="agt_details" style="display:none" >Please wait...</span>
<div id="sub_agt_receive_details" class="agt_receive_details" style="display:none" >
<span id="check_agt_tip" class="agt_details_rec" style="" >Receiving Details</span>
<div id="agt_details_out" ></div>
<span id="check_agt_tip" class="agt_sent_details" >After sending enter the transaction id sent from the Mobile dealer</span>
<input id="Comfirm_user_trans" class="trans_id_agt" placeholder="Enter transaction id..." minlength="11" />
<span id="error_outPut" class="error_outPut" ></span>
<button onclick="Comfirm_user_sent_trans();" class="user_confirm_trans_btn" >Comfirm</button>
</div>
</div>
<div id="user_wait_confm_div" class="agt_confirmation_div" style="display:none" >
<span id="confm_title" class="confm_title" >Please wait...</span>
<div id="sub_user_wait_confm_div" class="sub_user_wait_confm_div" >
<span class="trans_finish" >Transaction successful</span>
<img src="main_icon/suc_icon.png" class="trans_finish_icon" />
<button onclick="trans_compeleted();" class="trans_finish_btn" >Done</button>
</div>
</div>
<div id="erorr_out"></div>
<script>
document.getElementById('agt_list_div').style="display:none";
document.getElementById('become_agt_btn').style="display:none";
function check_agt_online()
{
my_id = document.getElementById('my_id').value;
agt_di = document.getElementById('agt_di').value;
check_agt_sms = document.getElementById('check_agt_sms').innerHTML;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&agt_di="+agt_di+"&&check_agt_sms="+check_agt_sms+"&&status=insert_check_agt_online",false);
xmlhttp.send(null);
document.getElementById('erorr_out').innerHTML =xmlhttp.responseText;
busy_o_not = document.getElementById('busy_o_not').value;
if(busy_o_not=='busy'){
alert('Agent busy please wait.');
}else{
document.getElementById('waiting_agt_respo_div').style="display:block";
document.getElementById('req_deposit_div').style="display:none";
}
}
i = 60;
var x = setInterval(function() {
waiting_timer = document.getElementById('waiting_timer').value;
if( waiting_timer == 1 ){
curr = document.getElementById('chk_screen').innerHTML = i--;
if(curr ==0){
clearInterval(x);
document.getElementById('chk_screen').innerHTML ="Agent did not respond.";
document.getElementById('check_agt_tip').innerHTML ="Select another agent.";
document.getElementById('sel_other_agt_btn').style="display:block";
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&agt_di="+agt_di+"&&status=clear_check_agt_online",false);
xmlhttp.send(null);
}
}else{ clearInterval(x); }
},1000);
function request_depost()
{
my_id = document.getElementById('my_id').value;
agt_di = document.getElementById('agt_di').value;
acc_agt = document.getElementById('acc_agt').value;
request_amount = document.getElementById('request_amount').value;
agt_capt = document.getElementById('agt_capt').innerHTML;
pay_method = document.getElementById('pay_method').innerHTML;
agt_capt = Number(agt_capt);
if(request_amount < 500){
document.getElementById('req_error').innerHTML="Amount must be above 500/=";document.getElementById('req_error').style="color:red;";
}else if(request_amount > agt_capt){document.getElementById('req_error').innerHTML="Amount above Agent capital";document.getElementById('req_error').style="color:red;";
}else{
document.getElementById('waiting_timer').value=2;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&agt_di="+agt_di+"&&acc_agt="+acc_agt+"&&request_amount="+request_amount+"&&agt_capt="+agt_capt+"&&pay_method="+pay_method+"&&status=insert_req_dp",false);
xmlhttp.send(null);
document.getElementById('req_error').style="color:red;";
document.getElementById('req_error').innerHTML =xmlhttp.responseText;
document.getElementById('agt_receive_details').style="display:block";
document.getElementById('loading_info').style="display:block";
document.getElementById('req_deposit_div').style="display:none";
}
}
iv = 180;
var x2 = setInterval(function() {
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=disp_notif_resp",false);
xmlhttp.send(null);
document.getElementById('erorr_out').innerHTML =xmlhttp.responseText;
resp_notif = document.getElementById('resp_notif').value;
if(resp_notif ==2){
clearInterval(x2);
document.getElementById('check_agt_sms').innerHTML="Request will expire within 3m ";
document.getElementById('check_agt_online_btn').style="display:none";
document.getElementById('req_dp_hp_div').style="display:block";
document.getElementById('req_deposit_div').style="display:block";
document.getElementById('waiting_agt_respo_div').style="display:none";
//alert(2);
var x3 = setInterval(function() {
curr2 = document.getElementById('wait_respond2').innerHTML = iv--;
if(curr2 ==0){
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=clear_check_agt_online",false);
xmlhttp.send(null);
clearInterval(x3);
history.back();
window.open('agent_page','_self');
}
},1000);
}else{alert(3);}
},3000);
var x5 = setInterval(function() {
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=check_agt_accept_trans",false);
xmlhttp.send(null);
document.getElementById('erorr_out').innerHTML =xmlhttp.responseText;
agt_accept_now = document.getElementById('agt_accept_now').value;
if(agt_accept_now == 'accept_now'){
document.getElementById('sub_agt_receive_details').style="display:block";
document.getElementById('loading_info').style="display:none";
clearInterval(x5);
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=disp_agt_details",false);
xmlhttp.send(null);
document.getElementById('agt_details_out').innerHTML =xmlhttp.responseText;
}
},3000);
function Comfirm_user_sent_trans()
{
my_id = document.getElementById('my_id').value;
agent_acc = document.getElementById('agent_acc').innerHTML;
agent_name = document.getElementById('agent_name').innerHTML;
request_amt = document.getElementById('request_amt').innerHTML;
receive_acc = document.getElementById('receive_acc').innerHTML;
receive_name = document.getElementById('receive_name').innerHTML;
Comfirm_user_trans = document.getElementById('Comfirm_user_trans').value;
Comfirm_user_trans_leg = Comfirm_user_trans;
var char_me_level = 10001;
var char_me_level2 = 25001;
var char_me_level3 = 60001;
var char_me_level4 = 5000000;
if(request_amt < char_me_level ){ cur_charj = 60;}else if(request_amt < char_me_level2 ){cur_charj = 120;}else if(request_amt < char_me_level3){cur_charj = 240;}else if(request_amt < char_me_level4){cur_charj = 650;}
var agt_comi = Number(cur_charj) * 30 /100 ;
if(Comfirm_user_trans_leg.length !==11){
document.getElementById('error_outPut').innerHTML ="Invalid transaction id.";
document.getElementById('error_outPut').style="display:block;color:red;";
}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&Comfirm_user_trans="+Comfirm_user_trans+"&&receive_acc="+receive_acc+"&&receive_name="+receive_name+"&&agent_name="+agent_name+"&&agent_acc="+agent_acc+"&&request_amt="+request_amt+"&&agt_comi="+agt_comi+"&&status=Comfirm_user_sent_trans",false);
xmlhttp.send(null);
document.getElementById('erorr_out').innerHTML =xmlhttp.responseText;
document.getElementById('agt_receive_details').style="display:none";
document.getElementById('user_wait_confm_div').style="display:block";
document.getElementById('confm_title').style="display:block";
}
}
//function check_agt_approv_trans()
var x6 = setInterval(function()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=check_agt_approv_trans",false);
xmlhttp.send(null);
document.getElementById('erorr_out').innerHTML =xmlhttp.responseText;
in_approved = document.getElementById('approved').value;
if(in_approved=='approved'){
document.getElementById('agt_receive_details').style="display:none";
document.getElementById('user_wait_confm_div').style="display:block";
document.getElementById('confm_title').style="display:none";
document.getElementById('sub_user_wait_confm_div').style="display:block";
}
//alert(approved);
},3000);
function trans_compeleted()
{
acc_agt = document.getElementById('acc_agt').value;
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&acc_agt="+acc_agt+"&&status=trans_compeleted",false);
xmlhttp.send(null);
document.getElementById('erorr_out').innerHTML =xmlhttp.responseText;
reloadp = document.getElementById('reloadp').value;
if(reloadp=='reloadp'){
window.open('index','_self');
}
}
document.getElementById('main_content_div').style="background:#ededed";
document.getElementById('body').style="background:#ededed;";
</script>
<?php } ?>
</div>
<script>
function agent_save()
{
my_id = document.getElementById('my_id').value;
agt_fname = document.getElementById('agt_fname').value;
agt_lname = document.getElementById('agt_lname').value;
agt_cur_address = document.getElementById('agt_cur_address').value;
agt_place_birth = document.getElementById('agt_place_birth').value;
if(agt_fname=="" || agt_lname=="" || agt_cur_address=="" || agt_place_birth=="" ){
document.getElementById('report_output').innerHTML="Please fill all the fields";
document.getElementById('report_output').style="display:block";
}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&agt_fname="+agt_fname+"&&agt_lname="+agt_lname+"&&agt_cur_address="+agt_cur_address+"&&agt_place_birth="+agt_place_birth+"&&status=insert_agent",false);
xmlhttp.send(null);
document.getElementById('report_output').innerHTML =xmlhttp.responseText;
window.open('agent_page?agt_start=new','_self');
document.getElementById('agt_fname').value="";
document.getElementById('agt_lname').value="";
document.getElementById('agt_cur_address').value="";
document.getElementById('agt_place_birth').value="";
}
}
</script>
<?php }else{ ?>
<div class="sub_content_div2" >
<?php
$get_agt2 ="select * from agenttb where my_id='$my_id' AND account_type='Verified' ";
$run_agt2 = mysqli_query($con,$get_agt2);
$chk_agt2 = mysqli_num_rows($run_agt2);
if($chk_agt2 <1){ ?>
<div class="agt_pending_div" >
<span class="agt_pending_span1" >Agent account is being reviewed</span>
<span class="agt_pending_span2" >Please wait...</span>
</div>
<button onclick="history.back()" class="agt_pending_bk_btn" >Go back</button>
<?php }else{ ?>
<div class="sub_home_agt_title" >Agent dashboard</div>
<div class="sub_home_agt" >
<span class="agt_id_lebal" >Account no</span>
<div class="agt_status_div" >
<?php
$get_user ="select * from crane_pay_usertb where id='$my_id' ";
$run_get_user = mysqli_query($con,$get_user);
while($row_get_user = mysqli_fetch_array($run_get_user))
{ $my_acc = $row_get_user['user_phone_no']; ?>
<span class="agt_id_output" ><?php echo $my_acc; ?> </span><span class="agt_status" >Verified</span>
<?php } ?>
</div>
<div class="estimate_div" >
<span class="estimate_lebal" >Earnings </span><span id="cal_agt_comi_output" class="estimate_out" ></span>/=
<button onclick="agt_earn_transf();" class="agt_comi_transf" >Transfer</button>
</div>
</div>
<div id="agt_action_div" class="agt_action_div" >
<button onclick="history.back();" class="agt_action_btn" >Home</button>
<a href="transaction"><button class="agt_action_btn" >History</button></a>
</div>
<div id="timer_output" class="timer_output" ></div>
<div id="notif_req_dp_div" class="notif_req_dp_div" >
<div id="single_notif" class="single_notif_req_dp" >
<span class="single_notif_text" >New transaction request</span>
<button onclick="yes_agt_online();" class="nw_trans_yes" >Yes</button>
<button onclick="trans_compeleted2();" class="nw_trans_no" >No</button>
</div>
<div id="incoming_trans" class="single_notif_req_dp" style="color:green;display:none;" >
<span class="single_notif_text" >Incoming transaction wait... </span>
</div>
</div>
<div id="req_dp_div" class="req_dp_div" >
<div id="disp_pending_dp_req_output"></div>
<div id="agt_wait_confm" class="agt_wait_confm">Please waiting...</div>
<div id="main_release_div" class="main_release_div" >
<div class="release_div" >
<span class="payment_reles_title" >Client has released the payment</span>
<span class="pay_reles_body" >Check your Mobile money account to confirm that you have received the payment,then click the approved</span>
</div>
<button id="release_btn" onclick="approved_agt_transaction();" class="release_btn" >Approved</button>
<div id="release_tip" class="release_tip" >Please wait..</div>
</div>
<div id="trans_success_div" class="trans_success_div" >
<span class="trans_finish" >Transaction successful</span>
<img src="main_icon/suc_icon.png" class="trans_finish_icon" />
<button onclick="trans_compeleted2();" class="trans_finish_btn" >Done</button>
</div>
</div>
<div id="agt_earn_foam" class="agt_earn_foam" >
<button onclick="history.back();" class="close_agt_area" >x</button>
<span class="tips_transf_earns" > To use your Earnings transfer it from agent account to your main account.</span>
<input id="amt_transf_input" type="Number" class="amt_transf_input" placeholder="Enter Amount" />
<span id="error_transf_earns" class="error_transf_earns" ></span>
<button onclick="amt_transfer_now();" class="amt_transf_btn" >Finish</button>
</div>
<div id="error_out2" ></div>
<div id="error_out" ></div>
<script>
var x = setInterval(function() {
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=disp_notif_req",false);
xmlhttp.send(null);
document.getElementById('error_out').innerHTML =xmlhttp.responseText;
incoming_notif = document.getElementById('incoming_notif').value;
if(incoming_notif == 1){
document.getElementById('notif_req_dp_div').style.display="block";
clearInterval(x);
}else{alert('hope');}
},3000 );
function yes_agt_online()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=yes_agt_online",false);
xmlhttp.send(null);
document.getElementById('error_out').innerHTML =xmlhttp.responseText;
document.getElementById('timer_output').style.display="block";
clear_status = document.getElementById('clear_status').value;
if(clear_status=='free'){alert('Transaction has expired');}else{
shell_x4();
shell_x8();
document.getElementById('incoming_trans').style.display="block";
document.getElementById('single_notif').style.display="none";
}
}
function shell_x4(){
var x4 = setInterval(function() {
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=checking_new_dp_req",false);
xmlhttp.send(null);
document.getElementById('error_out2').innerHTML =xmlhttp.responseText;
req_ready = document.getElementById('req_ready').value;
if(req_ready=='ready'){
disp_pending_dp_req();
clearInterval(x4);
document.getElementById('notif_req_dp_div').style.display="none";
document.getElementById('req_dp_div').style.display="block";
document.getElementById('disp_pending_dp_req_output').style.display="block";
}
},3000);
}
disp_pending_dp_req();
function disp_pending_dp_req()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=disp_pending_dp_req",false);
xmlhttp.send(null);
document.getElementById('disp_pending_dp_req_output').innerHTML =xmlhttp.responseText;
}
function shell_x8()
{
iv8=180;
var x8 = setInterval(function() {
curr8 = document.getElementById('timer_output').innerHTML =iv8--;
document.getElementById('timer_output').innerHTML ='Transaction will expire '+ curr8-- +' s';
if(curr8 ==0){
clearInterval(x8);
// history.back();
// document.getElementById('timer_output').innerHTML ='Transaction will expired';
// window.open('agent_page','self');
trans_compeleted2();
}
//alert('tim');
},1000);
}
function agt_accept_trans()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=agt_accept_trans",false);
xmlhttp.send(null);
document.getElementById('disp_pending_dp_req_output').innerHTML =xmlhttp.responseText;
document.getElementById('agt_wait_confm').style.display="block";
document.getElementById('timer_output').style.display="block";
shell_x7();
//alert(25);
}
function shell_x7(){
var x7 = setInterval(function() {
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=user_confirm_trans",false);
xmlhttp.send(null);
document.getElementById('error_out').innerHTML =xmlhttp.responseText;
user_confirm = document.getElementById('user_confirm').value;
if(user_confirm=='user_confirm'){
document.getElementById('main_release_div').style.display="block";
document.getElementById('agt_wait_confm').style.display="none";
//alert(user_confirm);
}else if(user_confirm=='approved'){
clearInterval(x7);
document.getElementById('main_release_div').style.display="none";
document.getElementById('trans_success_div').style.display="block";
// alert(user_confirm);
} //alert('apr');
},5000);
}
function approved_agt_transaction()
{
document.getElementById('release_btn').style.display="none";
document.getElementById('release_tip').style.display="block";
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=approved_agt_transaction",false);
xmlhttp.send(null);
document.getElementById('error_out').innerHTML =xmlhttp.responseText;
}
function trans_compeleted2()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=trans_compeleted",false);
xmlhttp.send(null);
document.getElementById('error_out').innerHTML =xmlhttp.responseText;
reloadp = document.getElementById('reloadp').value;
if(reloadp=='reloadp'){
window.open('agent_page','_self');
}
}
cal_agt_comi_disp()
function cal_agt_comi_disp()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=cal_agt_comi_disp",false);
xmlhttp.send(null);
document.getElementById('cal_agt_comi_output').innerHTML =xmlhttp.responseText;
}
function agt_earn_transf()
{
document.getElementById('agt_earn_foam').style.display="block";
document.getElementById('agt_action_div').style.display="none";
}
function amt_transfer_now()
{
my_id = document.getElementById('my_id').value;
agt_earns = document.getElementById('agt_earns').value;
agt_earns = Number(agt_earns);
amt_transf_input = document.getElementById('amt_transf_input').value;
amt_transf_input = Number(amt_transf_input);
if(amt_transf_input > agt_earns){
document.getElementById('error_transf_earns').innerHTML="Insufficent balance";
document.getElementById('error_transf_earns').style="display:block;color:red;";
} else if(amt_transf_input < 100){
document.getElementById('error_transf_earns').innerHTML="10000/= is the minimum transfer";
document.getElementById('error_transf_earns').style="display:block;color:red;";
}else{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&amt_transf_input="+amt_transf_input+"&&status=amt_transfer_now",false);
xmlhttp.send(null);
document.getElementById('error_transf_earns').innerHTML =xmlhttp.responseText;
document.getElementById('error_transf_earns').style="display:block;color:green;";
document.getElementById('amt_transf_input').value="";
}
}
document.getElementById('main_content_div').style="background-image: linear-gradient(to right, #A0085D , #F90569);";
document.getElementById('body').style="background-image: linear-gradient(to right, #A0085D , #F90569);";
</script>
<?php } } ?>
</div>
</div>
<?php } ?>
</body>
</html>