-
Notifications
You must be signed in to change notification settings - Fork 13
/
all_users.html
170 lines (151 loc) · 6.98 KB
/
all_users.html
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta meta name="viewport" content=
"width=device-width, user-scalable=no" />
<title>Helpdesk</title>
</head>
<link rel="stylesheet" type="text/css" href="style.css?v=2" />
<script src="script.js"></script>
<link rel="icon" href="logo.png" type="image/png">
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB"
crossorigin="anonymous"
></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"
/>
<body>
<header class="navbar navbar-expand-md d-flex flex-wrap justify-content-center p-3 mb-2 border-bottom">
<div class="container-fluid">
<a href="#" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-body-emphasis text-decoration-none">
<img src="logo.png" id="imglogo">
<span class="fs-4 mr-5 lo"><h2 class="bold-text">Helpdesk</h2></span>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="nav nav-pills navbar-nav ms-auto" id="myNav">
<!-- Sem1 -->
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">Semister 1</a>
<ul class="dropdown-menu">
<li><a class="nav-link dropdown-item" href="c_language.html">C-Language</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">Semister 2</a>
<ul class="dropdown-menu">
<li><a class="nav-link dropdown-item" href="data_structure.html">Data Structure</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">Semister 3</a>
<ul class="dropdown-menu">
<!-- Add subjects for Sem1 here -->
<li><a class="nav-link dropdown-item" href="dbms.html">DBMS</a></li>
<li><a class="nav-link dropdown-item" href="mech_updated.html">Mechanics</a></li>
<li><a class="nav-link dropdown-item" href="object_updated.html">OOPS Code</a></li>
<li><a class="nav-link dropdown-item" href="daa_updated.html">DAA</a></li>
</ul>
</li>
<!-- Sem2 -->
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">Semister 4</a>
<ul class="dropdown-menu">
<li><a class="nav-link dropdown-item" href="python.html">Python</a></li>
<li><a class="nav-link dropdown-item" href="os.html">OS</a></li>
<li><a class="nav-link dropdown-item" href="web_tech.html">Web Technologies</a></li>
<li><a class="nav-link dropdown-item" href="archi.html">Comp. Architecture</a></li>
<li><a class="nav-link dropdown-item" href="math.html">Mathematics</a></li>
<li><a class="nav-link dropdown-item" href="archi_lab.html">Comp. Architecture Lab</a></li>
<li><a class="nav-link dropdown-item" href="web_tech_lab.html">Web Technologies Lab</a></li>
<li><a class="nav-link dropdown-item" href="os_lab.html">OS Lab</a></li>
<li><a class="nav-link dropdown-item" href="startup.html">Startup</a></li>
</ul>
<li><a class="nav-link dropdown-item" href="contributers.html"><center>Our Valuable Contributers</center></a></li>
<li><a class="nav-link dropdown-item" href="Admin.html"><center>Admin Portal</center></a></li>
</ul>
</li>
</ul>
</div>
</div>
</header>
<style>
#user-table {
/* margin: 10px;
width: 80%;*/
width: 100%;
border-collapse: collapse;
}
table, th, td {
border: 1px solid black;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<div class="container">
<center><h2>User Data</h2></center>
<center> <div>Total Users: <span id="total-users"></span></div></center>
<center>
<table id="user-table">
<thead>
<tr>
<th>S.No</th>
<th>Username</th>
<th>No. of Logins</th>
</tr>
</thead>
<tbody id="user-data">
<!-- User data will be inserted here dynamically -->
</tbody>
</table>
</center>
</div>
<script>
// Fetch JSON data using AJAX
fetch('https://arambhsoftech.com/Helpdesk/alluser_helpdesk.php')
.then(response => response.json())
.then(data => {
// Get the table body element
var tbody = document.getElementById('user-data');
// Loop through the JSON data and create rows for the table
data.forEach(user => {
var row = document.createElement('tr');
// Create cells for each data field
var snoCell = document.createElement('td');
snoCell.textContent = user['S.no'];
row.appendChild(snoCell);
var usernameCell = document.createElement('td');
usernameCell.textContent = user['Username'];
row.appendChild(usernameCell);
var loginsCell = document.createElement('td');
loginsCell.textContent = user['No_of_Login'];
row.appendChild(loginsCell);
// Append the row to the table body
tbody.appendChild(row);
});
// Display total number of users
document.getElementById('total-users').textContent = data.length;
})
.catch(error => {
console.error('Error fetching user data:', error);
});
</script>
</div>
</div>
</body>
</html>