| 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'];
?> <div class="help_div"> <?php
$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");
?> </div> <?php
////////////////////////////////////////////////////////////////////////////////////
?>
<input id="my_id" style="display:none;" value="<?php echo"$my_id";?>" />
<input id="cur_date" style="display:none;" value="<?php echo"$cur_date";?>" />
<input id="cur_month" style="display:none;" value="<?php echo"$cur_month";?>" />
<input id="cur_year" style="display:none;" value="<?php echo"$cur_year";?>" />
<head>
<title>CrinePay savings</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main_css/savings.css" />
</head>
<body >
<div class="main_content" >
<div class="main_home_tile" >
<!--img src="main_icon/bk.png" onclick="history.back()" class="main_icon_img" /-->
<span class="main_title" >Panda saving</span>
<a href="index"><button class="close_btn" >x</button></a>
</div>
<div class="tips_lebal" >Get up to 12% APR of your saving.</div>
<div class="tips_lebal2" > Save with us and earn more </div>
<div class="action_save_btn" >
<a href="saving?s=s_list"><button id="save_list_btn" class="save_list_btn" >Saving list</button></a>
<a href="saving?sn=s_add"><button id="save_now_btn" class="save_now_btn" >Save now</button></a>
</div>
<div id="saving_output2" ></div>
<?php if(isset($_GET['s'])){ ?>
<div id="saving_output" ></div>
<script>document.getElementById('save_list_btn').style="background:#0CBF38;color:#fff";</script>
<?php } ?>
<?php if(isset($_GET['sn'])){ ?>
<script>document.getElementById('save_now_btn').style="background:#0CBF38;color:#fff";</script>
<div class="sub_container" >
<div class="amt_lebal" >Enter Saving Amount</div>
<div class="unit_lebal" >UGX</div>
<input type="number" id="save_amt" onKeyup="calculat_savings();" class="input_amt" />
<div class="unit_lebal" >Months</div>
<select id="no_month" onChange="calculat_savings();" class="input_amt">
<option class="input_amt">1</option>
<option class="input_amt">2</option>
<option class="input_amt">3</option>
<option class="input_amt">4</option>
</select>
<div class="amt_lebal" >Estimate earnings</div>
<div class="unit_lebal" >UGX</div>
<input id="estimate_earn" class="input_amt" disabled value="20000" />
<span id="save_error_output" class="save_error_output" > </span>
<span id="save_start_date" class="start_date_lebal" > Starting date: <?php echo $cur_date. ' - '. $cur_month. ' - '. $cur_year; ?></span>
<span id="end_save_date" class="end_date_lebal" ></span>
<button id="save_nxt_btn" onclick="insert_savings();" class="save_nxt_btn" >Next</button>
<button id="save_nxt_btn2" class="save_nxt_btn2" >Next</button>
</div>
<?php } ?>
</div>
<script>
function calculat_savings()
{
save_amt = document.getElementById('save_amt').value;
no_month = document.getElementById('no_month').value;
cur_date = document.getElementById('cur_date').value;
cur_month = document.getElementById('cur_month').value;
cur_year = document.getElementById('cur_year').value;
if(save_amt =="" || save_amt < 10000 ){
document.getElementById('save_nxt_btn2').style.display="block";
document.getElementById('save_nxt_btn').style.display="none";
}else{
cur_perctage = 0.03;
perctage = cur_perctage * no_month;
estimate_reward = perctage * save_amt;
est_reward = document.getElementById('estimate_earn').value=estimate_reward;
end_date1 = Number(cur_date);
if(end_date1 < 10 ){end_date = "0"+ end_date1; }else{ end_date = end_date1; }
if(cur_month !==12){
end_month1 = Number(cur_month) + Number(no_month);
if(end_month1 <10){end_month='0'+end_month1; }else{ end_month = end_month1; }
end_year = Number(cur_year);
}else{
end_month = Number(no_month);
end_year = Number(cur_year)+1;
}
if(end_month >12){
end_month = Number(end_month)-12;
end_year = Number(cur_year)+1;
if(end_month < 10){end_month = '0'+end_month; }else{ end_month = end_month; }
}
document.getElementById('save_start_date').style.display="block";
document.getElementById('end_save_date').innerHTML="Ending date: "+end_date+" - "+end_month+" - "+end_year;
document.getElementById('save_nxt_btn').style.display="block";
document.getElementById('save_nxt_btn2').style.display="none";
}
}
function insert_savings()
{
my_id = document.getElementById('my_id').value;
save_amt = document.getElementById('save_amt').value;
no_month = document.getElementById('no_month').value;
cur_date = document.getElementById('cur_date').value;
cur_month = document.getElementById('cur_month').value;
cur_year = document.getElementById('cur_year').value;
if(save_amt !==""){
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&save_amt="+save_amt+"&&no_month="+no_month+"&&est_reward="+est_reward+"&&cur_date="+cur_date+"&&cur_month="+cur_month+"&&cur_year="+cur_year+"&&end_date="+end_date+"&&end_month="+end_month+"&&end_year="+end_year+"&&status=insert_savings",false);
xmlhttp.send(null);
document.getElementById('save_error_output').innerHTML =xmlhttp.responseText;
//check_comfirm_recharge = document.getElementById('check_comfirm_recharge').value;
bal_small_out = document.getElementById('bal_small_out').value;
if(bal_small_out =='Insufficient'){
document.getElementById('save_error_output').innerHTML ="Insufficient balance in your account!";
document.getElementById('save_error_output').style.display="block";
//}else if(bal_small_out =='support'){
//document.getElementById('save_error_output').innerHTML ="Contact support something went wrong!";
// document.getElementById('save_error_output').style.display="block";
}else{
window.open('saving?s=s_list',self);
document.getElementById('save_error_output').style.display="block";
document.getElementById('save_amt').value="";
document.getElementById('no_month').value="";
document.getElementById('estimate_earn').value="";
}
}
}
display_savings();
function display_savings()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&status=display_savings",false);
xmlhttp.send(null);
document.getElementById('saving_output').innerHTML =xmlhttp.responseText;
pay_out = document.getElementById('pay_out').value;
if(pay_out==1){
document.getElementById('withdraw_btn').style.display="block";
document.getElementById('withdraw_btn2').style.display="none";
}
}
function request_payout(rp)
{
trans_no = rp;
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","autopage.php?my_id="+my_id+"&&trans_no="+trans_no+"&&status=request_payout",false);
xmlhttp.send(null);
document.getElementById('saving_output2').innerHTML =xmlhttp.responseText;
payout_error =document.getElementById('payout_error').value;
if(payout_error=='done'){window.open('index','_self')}
//alert(rp);
}
</script>
<body><?php }else{echo"<script>window.open('login','_self')</script>";} ?>
</html>