-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallet.php
88 lines (80 loc) · 2.51 KB
/
wallet.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
include("header.php");
if (!isset($_SESSION['FOOD_USER_ID'])) {
redirect(FRONT_SITE_PATH . 'shop');
}
$err_msg = '';
if (isset($_POST['add_money'])) {
$amt = get_safe_value($_POST['amt']);
if ($amt > 0) {
$_SESSION['IS_WALLET'] = 'yes';
$html = '<form method="post" action="pgRedirect.php" name="frmPayment" style="display:none;">
<input id="ORDER_ID" tabindex="1" maxlength="20" size="20"
name="ORDER_ID" autocomplete="off"
value="ORDS' . rand(10000, 99999999) . '">
<input id="CUST_ID" tabindex="2" maxlength="12" size="12" name="CUST_ID" autocomplete="off" value="' . $_SESSION['FOOD_USER_ID'] . '"><input id="INDUSTRY_TYPE_ID" tabindex="4" maxlength="12" size="12" name="INDUSTRY_TYPE_ID" autocomplete="off" value="Retail"><input id="CHANNEL_ID" tabindex="4" maxlength="12" size="12" name="CHANNEL_ID" autocomplete="off" value="WEB"><input title="TXN_AMOUNT" tabindex="10"
type="text" name="TXN_AMOUNT"
value="' . $amt . '"><input value="CheckOut" type="submit" onclick=""></td></form><script type="text/javascript">document.frmPayment.submit();
</script>';
echo $html;
} else {
$err_msg = "Please enter valid amount";
}
}
?>
<div class="cart-main-area pt-50 pb-100">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-12">
<div id="add_money_box">
<form method="post" id="frmAddMoney">
<input type="number" placeholder="Add Money" name="amt" class="w150" required />
<input type="submit" class="btn w150" name="add_money" />
<div id="error_msg"><?php echo $err_msg ?></div>
</form>
</div>
<?php
$getWallet = getWallet($_SESSION['FOOD_USER_ID']);
?>
<div class="table-content table-responsive">
<table>
<thead>
<tr>
<th>S.No</th>
<th>Amt</th>
<th>Message</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
$kk = 1;
foreach ($getWallet as $list) { ?>
<tr class="wallet_loop">
<td><?php echo $kk ?></td>
<td><?php echo $list['amt'] ?></td>
<td>
<span class="<?php echo $list['type'] ?>">
<?php echo $list['msg'] ?>
</span>
</td>
<td>
<?php
$dateStr = strtotime($list['added_on']);
echo date('d-m-Y', $dateStr);
?>
</td>
</tr>
<?php
$kk++;
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?php
include("footer.php");
?>