-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable.html
More file actions
102 lines (90 loc) · 2.28 KB
/
Copy pathtable.html
File metadata and controls
102 lines (90 loc) · 2.28 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>DataTables example - Server-side processing</title>
<link rel="stylesheet" type="text/css" href="css/jquery.dataTables.css">
<style type="text/css" class="init">
table.dataTable td{
border-right:1px solid #ddd;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" ></script>
<script type="text/javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" class="init">
$(document).ready(function() {
$('#example').dataTable( {
"processing": true,
"serverSide": true,
"ajax": "scripts/server_processing.php"
} );
} );
$(document).on('click','.cls_approve',function(){
var status =0,t= $(this);
if(t.data('prop')=='approve'){
alert('Do you want to approve this entry??');
status = 1;
}else{
alert('Do you want to reject this entry??');
status = 2;
}
$.ajax({
type: "POST",
url: "approvestatus.php",
datatype:'json',
data: { id:t.data('id') , status:status }
}).done(function(r){
if(r['res']){
t.closest('tr').slideUp('slow');
}else{
alert('Oops some error occured');
}
})
});
</script>
</head>
<body class="dt-example">
<div class="container">
<section>
<div style="text-align:right; margin-bottom:10px;">
<form method="post" class="cls_insert" action="logout.php">
<input type="submit" value="logout"/>
</form>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>fbid</th>
<th>email</th>
<th>optionchosen</th>
<th>comment</th>
<th>Photo url</th>
<th>caption</th>
<th>Location</th>
<th>Isapproved</th>
</tr>
</thead>
<tfoot>
<tr>
<th>fbid</th>
<th>email</th>
<th>optionchosen</th>
<th>comment</th>
<th>Photo url</th>
<th>caption</th>
<th>Location</th>
<th>Isapproved</th>
</tr>
</tfoot>
</table>
</section>
</div>
<section>
<div class="footer">
<div class="gradient"></div>
</div>
</section>
</body>
</html>