-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_adminusers.php
More file actions
145 lines (127 loc) · 6.5 KB
/
view_adminusers.php
File metadata and controls
145 lines (127 loc) · 6.5 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
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
137
138
139
140
141
142
143
144
<?php
include('access1.php');
include('include/connection.php');
$feature_name = 'Users';
$home_name = "Home";
$title = 'View Users';
$home_url = "home.php";
$filename = 'view_adminusers.php';
if(!isset($_SESSION['sqyard_user']) && $_SESSION['sqyard_user']=="")
{
?>
<script type="text/javascript">
history.go(-1);
</script>
<?php
}
if($_SESSION['userType']=="Admin")
{
$sql = "SELECT * FROM `tbl_change_agents` ";
$res = mysqli_query($db_con,$sql) or die(mysqli_error($db_con));
$r = 1;
?>
<!doctype html>
<html>
<head>
<?php
/* This function used to call all header data like css files and links */
headerdata($feature_name);
/* This function used to call all header data like css files and links */
?>
</head>
<body class="<?php echo $theme_name; ?>" data-theme="<?php echo $theme_name; ?>">
<?php
/*include Bootstrap model pop up for error display*/
modelPopUp();
/*include Bootstrap model pop up for error display*/
/* this function used to add navigation menu to the page*/
navigation_menu();
/* this function used to add navigation menu to the page*/
?> <!-- Navigation Bar -->
<!-- Page Content -->
<section class="page-content">
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="box box-color box-bordered green">
<div class="box-title">
<h3>
<i class="icon-table"></i>
View Users
</h3>
</div>
<div class="box-content nopadding">
<div style="padding:20px">
<a href="add_adminusers.php?pag=adminusers" class="btn btn-primary">
Add User
</a>
</div>
<form id="mainform1" action="deleteadminusers.php?pag=adminusers" method="post">
<div id="comp_1">
<table class="table table-bordered dataTable dataTable-scroll-x">
<thead>
<tr>
<th>Sr no.</th>
<th>ID</th>
<th>Name</th>
<th>Username</th>
<th>Password</th>
<th>Contact No</th>
<th>Type</th>
<th>Status</th>
<th class='hidden-350'>Created Date</th>
<th>Edit</th>
<th style="text-align:center" class='hidden-480'><a href="#"><input type="checkbox" id="selectall" /></a>
<input type="submit" name="main" value="Delete" style="margin-left:10px; width:80px;height:30px;font-size:16px" /></th>
</tr>
</thead>
<tbody>
<?php
while($row_doc = mysqli_fetch_array($res))
{
?>
<tr>
<td><?php echo $r; ?></td>
<td><?php echo $row_doc['id']; ?></td>
<td><?php echo $row_doc['fname']; ?></td>
<td><?php echo $row_doc['emailId']; ?></td>
<td><?php echo $row_doc['password']; ?></td>
<td><?php echo $row_doc['contactno']; ?></td><td><?php echo $row_doc['userType']; ?></td> <!-- document type -->
<td><?php if($row_doc['reg_status']=='1'){
echo "Active";
}else{
echo "Inactive";
} ?></td> <!-- Status -->
<td><?php echo $row_doc['register_dt']; ?></td> <!-- Created Date -->
<td><a href="edit_adminusers.php?pag=adminusers&admin_id=<?php echo $row_doc['id']; ?>" class="btn btn-primary">Edit</a></td>
<td><div align="center"><input type="checkbox" class="case" name="adminusers[]" value="<?php echo $row_doc['id']?>" /></div></td>
</tr>
<?php
$r++;
}
?>
</tbody>
</table>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Page Content / End -->
</body>
</html>
<?php
}
else
{
?>
<script type="text/javascript">
alert("You dont have right to access this page!");
history.go(-1);
</script>
<?php
}
?>