| Current Path : /home2/wtmwscom/public_html/member/ |
| Current File : /home2/wtmwscom/public_html/member/receive_help.php |
<?php
$title= "Receive Help";
include 'header.php';
$uid = $_SESSION['userid'];
/*
if(!isset($_SESSION['e_wallet'])){
redirect('transaction_password.php?url=receive_help.php');
die();
}
*/
?>
<script>
function check_amount(amount, balance, id){
if(balance < amount){
$('#'+id).css('border','1px solid red');
$('#'+id).val('');
$('#'+id).focus();
return false;
}
else{
$('#'+id).css({'border' : '1px solid blue'});
}
}
</script>
<!---// load jQuery v1.3.1 from the GoogleAPIs CDN //--->
<script type="text/javascript" src="scripts/jquery.js"></script>
<!--// load jQuery Plug-ins //-->
<script type="text/javascript" src="scripts/jquery_003.js"></script>
<script type="text/javascript" src="scripts/jquery_002.js"></script>
<script type="text/javascript">
var bIsFirebugReady = (!!window.console && !!window.console.log);
$(document).ready(
function (){
// update the plug-in version
$("#idPluginVersion").text($.Calculation.version);
// automatically update the "#totalSum" field every time
// the values are changes via the keyup event
$("input[name^=amount]").sum("blur", "#total_amount");
$( "#amount_3" ).trigger( "blur" );
}
);
</script>
<h1>Receive Help</h1>
<?php echo getMessage();?>
<section id="comments">
<?php
$result = mysqli_query($connection,"SELECT commit_id FROM commit WHERE uid='".$uid."' AND confirm_status=1 AND assign_complite=0 AND green=0 AND is_cancel='0' ORDER BY commit_id ASC LIMIT 1");
$balance_amount = mysqli_num_rows($result)>0 ? mysqli_fetch_object(mysqli_query($connection,"SELECT SUM(balance_amount) as balance_amount FROM commit WHERE uid='".$uid."' AND confirm_status=1 AND assign_complite=0 AND is_withdraw_lock = 0 "))->balance_amount:0;
$wallet = mysqli_fetch_object(mysqli_query($connection,"SELECT referal_wallet, fund_wallet, bonus_wallet, manager_wallet FROM user WHERE uid='".$uid."' AND status=0"));
$total_amount = $wallet->referal_wallet+$wallet->bonus_wallet+$wallet->fund_wallet+$wallet->manager_wallet+$balance_amount;
?>
<form name="form" id="form" action="receive_help_model.php" method="post" onSubmit="return validation();">
<table style="width: 100%;">
<thead>
<tr>
<th>Wallet Type</th>
<th>Wallet Amount</th>
<th>Help Request</th>
</tr>
</thead>
<tbody>
<!-- <tr class='light'>
<td><?php echo 'ROI';?></td>
<td><?php echo $balance_amount;?></td>
<td><input type="text" name="amount_1" id="amount_1" pattern="[0-9]{1,5}" onBlur="check_amount(this.value,<?php echo $balance_amount?>,'amount_1')" /></td>
</tr>
<tr class='dark'>
<td><?php echo 'Referral Wallet';?></td>
<td><?php echo $wallet->referal_wallet;?></td>
<td><input type="text" name="amount_2" id="amount_2" pattern="[0-9]{1,5}" onBlur="check_amount(this.value,<?php echo $wallet->referal_wallet?>,'amount_2')" /></td>
</tr>-->
<tr class='light'>
<td><?php echo 'Speed Wallet';?></td>
<td><?php echo $wallet->bonus_wallet;?></td>
<td><input type="text" name="amount_3" id="amount_3" value="<?php echo $wallet->bonus_wallet;?>" pattern="[0-9]{1,5}" onBlur="check_amount(this.value,<?php echo $wallet->bonus_wallet?>,'amount_3')" /></td>
</tr>
<!-- <tr class='dark'>
<td><?php echo 'Fund Wallet';?></td>
<td><?php echo $wallet->fund_wallet;?></td>
<td><input type="text" name="amount_4" id="amount_4" pattern="[0-9]{1,5}" onBlur="check_amount(this.value,<?php echo $wallet->fund_wallet?>,'amount_4')" /></td>
</tr>
<tr class='dark'>
<td><?php echo 'Manager Wallet';?></td>
<td><?php echo $wallet->manager_wallet;?></td>
<td><input type="text" name="amount_5" id="amount_5" pattern="[0-9]{1,5}" onBlur="check_amount(this.value,<?php echo $wallet->manager_wallet?>,'amount_5')" /></td>
</tr>-->
</tbody>
<thead>
<tr>
<th colspan="2" style="text-align: left">( Total Wallet = <?php echo $total_amount;?></th>
<th style="text-align: left"><input type="text" name="total_amount" id="total_amount" value="0" readonly="readonly" pattern="[0-9]{1,5}" onclick="check_total_amount(this.value)" /></th>
</tr>
</thead>
</table>
<p><br />
Select Bank Account <select name="bank_id" required="required">
<?php
$bank_result = mysqli_query($connection,"SELECT recid, account_holder_name FROM `bank_details` WHERE uid='$uid' ORDER BY recid ASC");
while ($row = mysqli_fetch_object($bank_result)) {
echo "<option value= '$row->recid' >$row->account_holder_name</option>";
}
?>
</select>
<!-- <input type="hidden" name="amount_4" id="amount_4" value="" />-->
<input style="position: relative; left: 160px;" name="submit" type="submit" id="submit" value="Submit" OnClick="return confirm('Are you sure for receive help');" />
</p>
</form>
<?php
?>
</section>
<?php include 'footer.php';?>