Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/member/
Upload File :
Current File : /home2/wtmwscom/public_html/member/fund_transfer.php

<?php
$title= "Transfer Fund";
include 'header.php';
include_once('lib/ps_pagination.php');
$uid = $_SESSION['userid'];
if(!isset($_SESSION['e_wallet']) && empty($_SESSION['e_wallet'])){ redirect('./transaction_password.php?url=account.php');}
?>
<h1>Fund Transfer</h1>
<section id="comments">
     <?php
    $wallet_row = mysqli_fetch_object(mysqli_query($connection, "SELECT wallet, wallet_fund FROM user WHERE uid='$uid'"));
    ?>
<h3>Primary Wallet <?php echo $wallet_row->wallet?> | Fund Wallet <?php echo $wallet_row->wallet_fund?></h3>
    <?php echo getMessage();?>
    <form name="form" id="form" action="fund_transfer_model.php" method="post">
         <p>
            <label >Wallet Type <span>*</span></label>
            <select name="wallet_type"  required="required">
                <option value="fund_wallet" selected="selected">Fund Wallet </option>
                <option value="primary_wallet" >Primary Wallet </option>
            </select>
            
          </p>
        <p>
            <label for="amount">Enter Amount <span>*</span></label>
            <input type="text" name="amount" id="amount" required="required" pattern="[0-9]{2,10}">
             Amount must be less than or equal to Fund-wallet amount.
            <?php /*
            <select name="amount" id="amount" required="required">
                <?php
                $i=1;
                while($i<=20){
                ?>
                <option value="<?php echo $i*500;?>"><?php echo $i*500;?> INR</option>
                <?php $i++;}?>
            </select>*/?>
        </p>
        <p>
            <label for="uid">Enter User Id <span>*</span></label>
            <input type="text" name="uid" id="uid" required="required" maxlength="200">
        </p>
        <p><br />
            <input style="position: relative; left: 180px;" name="submit" type="submit" id="submit" value="Transfer">
        </p>
    </form>
</section>
<section id="comments">
    <h1>Fund Transfer Report</h1>
    <?php
    if(!isset($_GET['page'])){$i=1;}else{$i=(($_GET['page']-1)*20)+1;}
    $query= "SELECT uid, from_uid, amount, datetime FROM  fund_transfer WHERE `uid`='".$uid."' OR `from_uid`='".$uid."' ORDER BY datetime DESC";
    $pager = new PS_Pagination($link, $query, 20, 5);
    $pager->setDebug(true);
    $rs = $pager->paginate();
    if($rs){
    ?>
    <form action="" name="myform">
        <table>
            <thead>
                <tr>
                    <th>S.No</th>
                    <th>To</th>
                    <th>From</th>
                    <th>Amount</th>
                    <th>Date</th>
                </tr>
            </thead>
            <tbody>
                <?php 
                while($row=  mysqli_fetch_object($rs)){
                    $to = mysqli_fetch_object(mysqli_query($connection, "SELECT login_id, name FROM user WHERE uid='$row->uid'"));
                    $from = mysqli_fetch_object(mysqli_query($connection, "SELECT login_id, name FROM user WHERE uid='$row->from_uid'"));
                ?>
                <tr <?php if($i%2){echo "class='light'";}else{echo "class='dark'";}?>>
                    <td><?php echo $i; ?></td>
                    <td><?php echo $to->name." (".$to->login_id.")";?></td>
                    <td><?php echo $from ? $from->name." (".$from->login_id.")" : "Admin";?></td>
                    <td><?php echo $row->amount;?></td>
                    <td><?php echo date("d M, Y H:i A", strtotime($row->datetime));?></td>
                </tr>
                <?php $i++;}?>
            </tbody>
        </table>
            <?php echo $pager->renderFullNav();?>
    </form>
    <?php }?>
</section>
<?php include('footer.php');?>