-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.php
More file actions
65 lines (57 loc) · 1.81 KB
/
process.php
File metadata and controls
65 lines (57 loc) · 1.81 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
<?php
if (!isset($_GET['min']) && !isset($_GET['max'])) {
header("location: index.php");
}else{
?>
<script>
$(document).ready(function () {
$(".atn").click(function () {
var sno = $(this).attr('data-value1');
var action = $(this).attr('data-value2');
// $("#myModal").modal();
$("#actext").html("<span>Loading...</span>");
// ajax open
$.ajax({
type: "GET",
url: 'action.php',
data: { sno: sno, action: action },
success: function (data) {
$("#actext").html(data);
$("#snzalert").fadeTo(2000, 500).slideUp(500, function(){
$("#snzalert").slideUp(500);
$('#myModal').modal('hide');
});
}
});
// ajax close
});
return false;
});
</script>
<?php
$min = $_GET['min'];
$max = $_GET['max'];
$db = new SQLite3('robot.db');
$results = $db->query('SELECT * FROM `customer_details` WHERE c_count BETWEEN '.$min.' and '.$max.' ORDER BY entry_time ASC;');
echo "<div id='actext'></div>";
while ($row = $results->fetchArray()) {
//var_dump($row);
//echo $row['c_name']."<br>";
echo '
<div class="card">
<div class="card-body">
<div class="row">
<div class="col"><i class="fas fa-user-alt text-info"></i> <strong>'.$row['c_name'].'</strong><br><i class="fas fa-phone-square text-success"></i> '.$row['c_mobile'].'</div>
<div class="col p-0">
<div class="clearfix">
<span class="float-left"><button type="button" class="btn btn-warning atn" data-value1="'.$row['sno'].'" data-value2="0">Snooze <i class="fas fa-user-clock"></i></button></span>
<span class="float-right"><button type="button" class="btn btn-success atn" data-value1="'.$row['sno'].'" data-value2="1">Allot <i class="fas fa-heart"></i></button></span>
</div>
</div>
</div>
</div>
</div>
';
}
}
?>