-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrenewgatewayck.php
More file actions
70 lines (60 loc) · 1.77 KB
/
renewgatewayck.php
File metadata and controls
70 lines (60 loc) · 1.77 KB
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
<?php
include_once ("z_db.php");
if (!empty($_POST))
{
//Fetching Details for user, package and payment gateway
$pgateid=mysqli_real_escape_string($con,$_POST['renewgateway']);
$userid=mysqli_real_escape_string($con,$_POST['renewusername']);
$renewpckid=mysqli_real_escape_string($con,$_POST['renewpck']);
$query="SELECT id,fname,email,doj,active,username,address,pcktaken,tamount FROM affiliateuser where username = '$userid'";
$result = mysqli_query($con,$query);
while($row = mysqli_fetch_array($result))
{
$aid="$row[id]";
$regdate="$row[doj]";
$name="$row[fname]";
$address="$row[address]";
$acti="$row[active]";
$pck="$row[pcktaken]";
$ear="$row[tamount]";
}
?>
<?php $query="SELECT * FROM packages where id = $renewpckid";
$result = mysqli_query($con,$query);
while($row = mysqli_fetch_array($result))
{
$id="$row[id]";
$pname="$row[name]";
$pprice="$row[price]";
$pcur="$row[currency]";
$ptax="$row[tax]";
$gatewayid="$row[gateway]";
$total=$pprice+$ptax;
// "<option value='$id'>$pname | Price - $pcur $total </option>";
}
// Details fetching end
if($pgateid==2)
{
$queryuser="SELECT id FROM affiliateuser where username = '$userid'";
$resultuser = mysqli_query($con,$queryuser);
while($rowuser = mysqli_fetch_array($resultuser))
{
$uaid="$rowuser[id]";
}
$query=mysqli_query($con,"insert into paypalpayments(orderid,transacid,price,currency,date,cod,renew,renacid) values('$uaid','C.O.D','$total','$pcur',NOW(),1,1,$renewpckid)");
print "
<script language='javascript'>
window.location = 'finalthankyoufree.php?username=$userid';
</script>
";
}
}
else
{
print "
<script language='javascript'>
window.location = 'renewaccount.php';
</script>
";
}
?>