| 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'];
?> <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"];
if(isset($_GET['mit_no']))
{
$sn_cur_meter_no = $_GET['mit_no'];
}
$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 Water Pay</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main_css/pay_water.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" >Pay water bills</span>
</div>
<div class="sub_container" >
<div class="unit_lebal" >Meter Number</div>
<?php if(isset($_GET['mit_no'])){ ?>
<input type="text" id="water_number" disabled value="<?php echo $sn_cur_meter_no; ?>" class="input_amt" />
<?php }else{ ?>
<input type="text" id="water_number" class="input_amt" />
<?php } ?>
<div class="unit_lebal" >Amount UGX</div>
<input type="number" id="amount_topay" placeholder='0' class="input_amt" />
<span id="save_error_output" class="save_error_output" > </span>
<button onclick="history.back()" class="save_nxt_btn" style="color:red;" >Cancel</button>
<button onClick="check_amount_topay();" class="save_nxt_btn" style="color:green;" >Next</button>
</div>
<!--?php } ?-->
</div>
<div id="tip_shell_full" class="tip_shell_full" >
<div class="confirm_water_pay" >
<span class="pay_water_confirm_title" >Paying Ugx: <span id="cur_pend_wt_amt"></span> for water number <span id="w_meter_no_tip" style="color:red;font-weight:bold;"></span></span>
<span class="pay_water_confirm_title2" >Do you want to continue?</span>
<button onClick="close_wt_pay_confirm();" class="cancel_water_pay_btn" >Cancel</button>
<button onClick="insert_waterpay_pend_amt();" class="pay_water_btn" >Pay</button>
</div>
</div>
<script>
function check_amount_topay()
{
amount_topay = document.getElementById('amount_topay').value;
water_number = document.getElementById('water_number').value;
document.getElementById('save_error_output').style="display:none;";
water_number_leng = water_number.length;
if(water_number_leng !==8){
document.getElementById('save_error_output').innerHTML="Invalid water meter number!";
document.getElementById('save_error_output').style="display:block;color:#40257f;";
}else{
if(amount_topay < 2000){
document.getElementById('save_error_output').innerHTML="Minimium pay amount Ugx:2000.";
document.getElementById('save_error_output').style="display:block;color:#40257f;";
}else{
document.getElementById('cur_pend_wt_amt').innerHTML=amount_topay;
document.getElementById('w_meter_no_tip').innerHTML=water_number;
document.getElementById('tip_shell_full').style="displa:block;display:flex;justify-content:center;align-items:center;";
}
}
}
function insert_waterpay_pend_amt()
{
my_id = document.getElementById('my_id').value;
water_number = document.getElementById('water_number').value;
amount_topay = document.getElementById('amount_topay').value;
xmlhpttp = new XMLHttpRequest();
xmlhpttp.open("GET","autopage.php?my_id="+my_id+"&&water_number="+water_number+"&&amount_topay="+amount_topay+"&&status=insert_waterpay_pend_amt",false);
xmlhpttp.send(null);
document.getElementById("save_error_output").innerHTML =xmlhpttp.responseText;
//document.getElementById('').innerHTML="Transaction Successful";
document.getElementById('save_error_output').style="display:block;";
document.getElementById('save_error_output').style="display:block;color:#47de70;font-weight:bold;font-size:1.2em;";
close_wt_pay_confirm();
document.getElementById('amount_topay').value="";
}
function close_wt_pay_confirm()
{
document.getElementById('tip_shell_full').style="display:none;";
}
</script>
<body><?php }else{echo"<script>window.open('login','_self')</script>";} ?>
</html>