-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathreceive1.php
95 lines (78 loc) · 2.26 KB
/
receive1.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
89
90
91
92
93
94
95
<?php include 'config/Database.php' ?>
<?php
session_start();
if($_SESSION['type'] == 'admin'){
include 'inc/headeradmin.php';
}
else if($_SESSION['type'] == 'employee'){
include 'inc/headeremployee.php';
}
else
{
header("Location: "."index.php");
}
?>
<div class="desh-main-content">
<br>
<div class="title">
Receive Money
</div>
<div>
<?php
$vcode = $_POST['vcode'];
// SMS Send API Here
//Get value From previus form
$rphone = $_POST['rphone'];
$amount = $_POST['amount'];
$pin = $_POST['pin'];
$type = 'sent';
$db = new Database();
$query = "SELECT * FROM money WHERE (rphone = '$rphone' AND amount = '$amount' AND pin = '$pin' AND type = '$type')";
$result = $db->select($query);
if($result){
$rows = $result->fetch_assoc();
$trxid = $rows['trxid'];
require('textlocal.class.php');
$textlocal = new Textlocal('[email protected]', '3b98c30288b4a1a4a3929');
$numbers = array($rphone);
$sender = 'GET MONEY';
$message = 'Your Withdraw Verification Code : '.$vcode.' .';
$response = $textlocal->sendSms($numbers, $message, $sender);
//print_r($response);
?>
<div class="reg-container">
<form action="receive.php" method="POST">
<br><br><br><br><br><br>
<div>
Verification Code Sent !!
<?php //echo //$vcode ?>
<h3>Your Trnx ID: <?php echo $trxid ?></h3>
</div>
<div>
<input type="text" name="invcode" placeholder="Verification Code" required>
</div>
<div>
<input type="hidden" name="sentvcode" value= <?php echo $vcode;?>>
</div>
<div>
<input type="hidden" name="trxid" value= <?php echo $trxid;?>>
</div>
<div>
<input type="hidden" name="rphone1" value= <?php echo $rphone;?>>
</div>
<div>
<input type="hidden" name="amount1" value= <?php echo $amount;?>>
</div>
<input type="submit" name="submit" value="Withdraw Now" class="btn-login" >
</form>
</div>
</div>
</div>
<?php
}
else{
header("Location: "."receive.php?id=already");
}
?>
</body>
</html>