-
Notifications
You must be signed in to change notification settings - Fork 1
/
libcomshow.php
106 lines (96 loc) · 2.86 KB
/
libcomshow.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
106
<?php
session_start();
$sesuser=$_SESSION['sesuser'];
if(!$sesuser)
header("location:logout.php");
include('comman/connect.php');
$data=mysqli_fetch_array($con->query("select * from registration where email='$sesuser'"));
// --------- For Pagination ------
include_once "subscriber_function.php";
if(isset($_GET["page"])){
$page = (int)$_GET["page"];
$i=($page-1)*15;
}
else{
$page = 1;
$i=0;
}
$setLimit = 10;
$pageLimit = ($page * $setLimit) - $setLimit;
?>
<!DOCTYPE html>
<html>
<head>
<title>:: Admin NIT jsr</title>
<link rel="stylesheet" type="text/css" href="css/style1.css">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script>
function dis()
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","findteam_name.php?name="+document.getElementById('name').value,false);
xmlhttp.send(null);
document.getElementById('data').innerHTML=xmlhttp.responseText;
}
function dis2()
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","findteam_post.php?post="+document.getElementById('post').value,false);
xmlhttp.send(null);
document.getElementById('data').innerHTML=xmlhttp.responseText;
}
</script>
</head>
<body>
<?php include('comman/menu.php');?>
<div class="main">
<div class="hedding">Member List</div>
<div class="form">
<div class="searchform">
<input type="search" name="name" placeholder="Enter Name for search...." id="name" onkeypress="dis()">
<input type="search" name="post" placeholder="Enter Post for search...." id="post" onkeypress="dis2()">
</div>
<div id="data">
<table border="1">
<tr class="tr">
<td width="50">Sl. No</td>
<td>Name</td>
<td>Team Type</td>
<td>Post</td>
<td width='100'>Image</td>
<td width="70">Action</td>
</tr>
<?php
$sql = "SELECT * FROM libraryteam order by(memberid) LIMIT ".$pageLimit." , ".$setLimit;
$res=$con->query($sql);
//$i=1;
while($row=mysqli_fetch_array($res))
{ $id=$row['memberid'];$pic=$row['pic'];
echo "<tr>";
echo "<td>".++$i."</td>";
echo "<td>".$row['name']."</td>";
echo "<td>".$row['teamtype']."</td>";
echo "<td>".$row['teampost']."</td>";
echo "<td><img src="."image/Library-Team/".$pic." width='100' height='100'></td>";
echo "<td align='center'>
<a href='usersedit.php?id=".$id."'><i class='fa fa-pencil'></i></a> |
<a href='delete.php?id=".$id."&&tname=library'><i class='fa fa-trash'></i></a>
</td>";
echo "</tr>";
}
echo "<tr>
<td colspan='9'>
<div class='pagination'>".
displayPaginationBelow($setLimit,$page).
"</div></td>
</tr>";
?>
</table>
</div>
</div>
</div>
<?php include('comman/footer.php');?>
</body>
</html>