-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_member.php
136 lines (132 loc) · 3.78 KB
/
search_member.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
include 'includes/dependencies.php';
echo"<table class=\"memberajax\" border=\"1px\"align=\"center\">";
$i = 1;
echo"<thead>
<tr>
<th>
SN
</th>
<th>
Modify
</th>
<th>
FullName
</th>
<th>
Library ID
</th>
<th>
Mobile
</th>
<th>
Email
</th>
<th>
Address-1
</th>
<th>
Address-2
</th>
<th>
Father
</th>
<th>
Batch
</th>
<th>
Category
</th>
<th>
Department
</th>
</tr></thead>";
$query = mysql_query("SELECT * from members_info WHERE fname like '$string%' or lib_id like '$string%' or department like '$string%' or category like '$string%' or email like '$string%' or lname like '$string%' or mobile_number like '$string%' or father_name like '$string%' or temporary_address like '$string%' or permanent_address like '$string%' or batch like '$string%' order by fname ");
while($result = mysql_fetch_array($query))
{
echo"<tbody>
<tr>
<td>
".$i++."</a>
</td>
<td>";
?>
<div class="dropdown">
<button class="btn btn-success dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
Action
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation">
<b>
Action
</b>
</li>
<li role="presentation" class="divider">
</li>
<li role="presentation">
<a id="edit" onclick="return del_mem()" href="index.php?action=del&lib_id=<?php echo $result['lib_id'];?>">
<span class="glyphicon glyphicon-remove">
</span> Delete
</a>
<li role="presentation" class="divider">
</li>
<li role="presentation">
<a id="edit" onclick="return edit_mem()" href="index.php?action=edit&lib_id=<?php echo $result['lib_id'];?>">
<span class="glyphicon glyphicon-edit">
</span> Edit
</a>
</li>
</ul>
</div>
<?php
echo"
</td>
<td>";
echo '<a title="'.$result['fname'].' '.$result['lname'].'" class="fancybox" href="source/images/members/'.$result['member_image'].'">';
if(($result['member_image']!="") and file_exists("source/images/members/".$result['member_image'])){
echo"<img id=\"member_image\" width=\"60\" height=\"80\" src=\"source/images/members/".$result['member_image']."\" /> ";
}else
{
echo"<img id=\"member_image\" width=\"70\" height=\"70\" src=\"source/images/members/default.jpg\" />";
}
echo '</a>';
echo "<a id=\"link\" targer=\"_top\" title=\"View Details of $result[1]\"href=\"index.php?action=memberstatus&libid=$result[3]\">";
echo "<br>".$result['fname']." ".$result['lname']."</a>";
echo"
</td>
<td>
".$result['lib_id']."
</td>
<td>
".$result['mobile_number']."
</td>
<td><a title=\"Send Email to $result[1]\"href=\"mailto:$result[5]?Subject=Message From Librarian\">
".$result['email']."
</td>
<td>
".$result['temporary_address']."
</td>
<td>
".$result['permanent_address']."
</td>
<td>
".$result['father_name']."
</td>
<td>
".$result['batch']."
</td>
<td>
".$result['category']."
</td>
<td>
".$result['department']."
</td>
</tr></tbody>";
}
if(!mysql_num_rows($query))
{
echo "<tr><td colspan=13><span style=\"color:green\">There are currently no members in the System !</span></td></tr></tbody>";
echo "</table>";
}
?>