-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrefundResponsList.php
105 lines (98 loc) · 3.9 KB
/
refundResponsList.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
96
97
98
99
100
101
102
103
104
105
<?php
/**
* Created by PhpStorm.
* User: pkoval
* Date: 25.06.15
* Time: 18:14
*/
include_once 'header.html';
include_once 'navBar.html';
include_once 'library/getRefundList.php';
include_once 'library/getKeyList.php';
$responses = getRefundList(getConnect(), array(1,0));
if(isset($_POST['all'])){
unset($_POST['email']);
}
if(isset($_POST['email'])&& ($_POST['email'] != '')){
foreach($responses as $k=>$v){
if($v['email_us'] != $_POST['email'])
unset($responses[$k]);
}
}
if(isset($_POST['del'])){
unset($responses[$_POST['del']]);
}
?>
<div class="col-md-3 col col-sm-3"></div>
<div style=" "class="col-md-6 col-sm-6">
<form method="post">
<?php
include_once 'navBar.html';
?>
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-offset-0 col-sm-5 col-md-5">
<input type="email" class="form-control" placeholder="Email" name="email"/>
</div>
<div class="col-md-offset-4 col-sm-offset-4 col-sm-2 col-md-2">
<button type="submit" name="add" class="btn btn-primary">
Search <span class=""></span>
</button>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>id_refund</th>
<th>us_email</th>
<th>keys</th>
<th>data</th>
<th> </th>
</tr>
</thead>
<tbody>
<?php foreach($responses as $key=>$value) :
if($value['status'] == 1) {
?><tr class="success"><?php
} else {
?><tr class="danger"><?php
} ?>
<td><?=$value['id']?></td>
<td><?=$value['email_us']?></td>
<td>
<?php foreach(getKeyList(getConnect(),$value['id']) as $k=>$v): ?>
<span><?=$v['key_id']?></span><br>
<?php endforeach ?>
</td>
<td><?=$value['data']?></td>
<td>
<button type="submit" name="del" value="<?= $key ?>" class="btn btn-primary">
del <span class=""></span>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<?php if(isset($_POST['email']) && ($_POST['email'] != '')){ ?>
<div class="col-md-4 col-sm-4">
<button type="submit" name="all" class="btn btn-primary">
All responses<span class=""></span>
</button>
</div>
<?php } ?>
</form>
</div>
<div class="col-md-3 col-sm-3"></div>
<script>
document.getElementById("refund").classList.add("active");
</script>
<?php
include_once 'footer.html';