-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminpage.php
More file actions
112 lines (106 loc) · 3.73 KB
/
adminpage.php
File metadata and controls
112 lines (106 loc) · 3.73 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Page</title>
<link rel="icon" type="image/x-icon" href="favicon-32x32.png">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- Font Awesome CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha512-fTJ5aBUJZvNOxKppjei5m+Nm8lJVJHiPeNcb+QlrE47iQtIRa8DIwsZ1Q5hE1jL/ZFA5DdFAv++oqJd4ieVqQw==" crossorigin="anonymous" />
<!-- Boxicons CSS -->
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<!-- Custom CSS -->
<style>
#load-button {
color: white;
}
/* Customizing hover effect color for table rows */
.table-hover tbody tr:hover {
background-color: red; /* Change this to your desired hover color */
}
th{
color:blue;
}
body {
font-family: 'Times New Roman', serif;
background: url(12.jpg) no-repeat;
background-size: cover;
}
td {
color:white;
}
.container{
background-color: #1211115c;
backdrop-filter: blur(10px);
height: auto;
width: 1500px !important;
border-radius: 20px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
}
</style>
</head>
<body>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col text-center">
<h1 class="mt-4">Admin Page</h1>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-8">
<table class="table table-bordered table-hover mt-4">
<thead class="thead-dark">
<tr>
<th colspan="5" class="text-center" id="title">Users Data</th>
</tr>
</thead>
<tbody id="table-data">
<!-- User data will be populated here -->
</tbody>
<tfoot>
<tr>
<td colspan="5" class="text-center">
<button type="button" id="load-button" class="btn btn-danger">Load Data</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
$(document).ready(function(){
$("#load-button").on("click",function(e){
var button = $(this);
if(button.text() === 'Load Data') {
$.ajax({
url: "ajax-load.php",
type: "POST",
success: function(data){
$("#table-data").html(data);
button.text('Hide Data');
$("#title").attr('colspan', '5'); // Remove colspan attribute to span all columns
}
});
} else {
$("#table-data").empty();
button.text('Load Data');
$("#title").attr('colspan', '5'); // Set colspan to 2 to cover only two columns
}
});
});
</script>
<!-- Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>