-
Notifications
You must be signed in to change notification settings - Fork 0
/
adminUser.php
130 lines (82 loc) · 2.27 KB
/
adminUser.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
<?php include 'header.php'; ?>
<div class="container">
<div id="adminTopDiv">
<?php
include("adminMenu.php");
?>
</div><!--end of topDiv-->
<div id="adminBottomDiv">
<?php
$con=@mysql_connect("127.0.0.1","root","");
@mysql_select_db("digitalexam",$con);
$totalRecPerPage=10;
$rs=mysql_query("select count(*) from user_info");
$row=mysql_fetch_array($rs);
$totalRec=$row[0];
$noOfPages=ceil($totalRec/$totalRecPerPage);
if(isset($_REQUEST['pgno']))
{
$start= ($_REQUEST['pgno']-1) * $totalRecPerPage;
}
else
{
$start=0;
}
$rs=mysql_query("select * from user_info order by uname limit $start , $totalRecPerPage ");
$sl=0;
echo("<table border='1' id='quiztable' cellpadding='10px' cellspacing='0px'>");
echo("<tr>");
echo("<th>");
echo("Sr No");
echo("</th>");
echo("<th>");
echo("User Name");
echo("</th>");
echo("<th>");
echo("Email");
echo("</th>");
echo("<th>");
echo("Mobile No");
echo("</th>");
echo("<th>");
echo("User Type");
echo("</th>");
echo("<th>");
echo("Status");
echo("</th>");
echo("</tr>");
while($row=mysql_fetch_array($rs))
{
echo("<tr>");
echo("<td>");
echo(($start++)+1);
echo("</td>");
echo("<td>");
echo($row["uname"]);
echo("</td>");
echo("<td>");
echo($row["uemail"]);
echo("</td>");
echo("<td>");
echo($row["umobile"]);
echo("</td>");
echo("<td>");
echo($row["usertype"]);
echo("</td>");
echo("<td>");
$userid= $row["uid"];
echo("<a href='deleteuser.php?uid= $userid' >Delete</a>");
echo("</td>");
echo("</tr>");
}
echo("</table>");
echo("<div id='pagingno'>");
for($i=1;$i<=$noOfPages;$i++)
{
echo("<a href='adminUser.php?pgno=$i'>".$i."</a> ");
}
echo("</div>");
?>
</div><!--end of bottomDiv-->
</div><!--end of container1-->
<?php include 'footer.php'; ?>