Skip to content

Commit b7bb649

Browse files
Refactor account.php and setup.php, and update user avatar in activity.php
1 parent 46639ce commit b7bb649

File tree

3 files changed

+25
-52
lines changed

3 files changed

+25
-52
lines changed

account.php

Lines changed: 20 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
include_once 'functions/authentication.php';
2+
include_once 'functions/authentication.php';
33
?>
44
<!DOCTYPE html>
55
<html data-bs-theme="light" lang="en">
@@ -106,56 +106,25 @@
106106
<p class="text-primary m-0 fw-bold">Users Logs</p>
107107
</div>
108108
<div class="card-body">
109-
<div class="row">
110-
<div class="col-md-6 text-nowrap">
111-
<div id="dataTable_length" class="dataTables_length" aria-controls="dataTable"><label class="form-label">Show&nbsp;<select class="d-inline-block form-select form-select-sm">
112-
<option value="10" selected="">10</option>
113-
<option value="25">25</option>
114-
<option value="50">50</option>
115-
<option value="100">100</option>
116-
</select>&nbsp;</label></div>
117-
</div>
118-
<div class="col-md-6">
119-
<div class="text-md-end dataTables_filter" id="dataTable_filter"><label class="form-label"><input type="search" class="form-control form-control-sm" aria-controls="dataTable" placeholder="Search"></label></div>
120-
</div>
121-
</div>
122-
<div class="table-responsive table mt-2" id="dataTable-1" role="grid" aria-describedby="dataTable_info">
123-
<table class="table my-0" id="dataTable">
124-
<thead>
125-
<tr>
126-
<th>ID</th>
127-
<th>Logs</th>
128-
<th>Date</th>
129-
</tr>
130-
</thead>
131-
<tbody>
132-
<tr>
133-
<td>1</td>
134-
<td>Boarders Update</td>
135-
<td>2008/11/28</td>
136-
</tr>
137-
</tbody>
138-
<tfoot>
139-
<tr></tr>
140-
</tfoot>
141-
</table>
142-
</div>
143-
<div class="row">
144-
<div class="col-md-6 align-self-center">
145-
<p id="dataTable_info" class="dataTables_info" role="status" aria-live="polite">Showing 1 to 10 of 27</p>
146-
</div>
147-
<div class="col-md-6">
148-
<nav class="d-lg-flex justify-content-lg-end dataTables_paginate paging_simple_numbers">
149-
<ul class="pagination">
150-
<li class="page-item disabled"><a class="page-link" aria-label="Previous" href="#"><span aria-hidden="true">«</span></a></li>
151-
<li class="page-item active"><a class="page-link" href="#">1</a></li>
152-
<li class="page-item"><a class="page-link" href="#">2</a></li>
153-
<li class="page-item"><a class="page-link" href="#">3</a></li>
154-
<li class="page-item"><a class="page-link" aria-label="Next" href="#"><span aria-hidden="true">»</span></a></li>
155-
</ul>
156-
</nav>
157-
</div>
158-
</div>
109+
110+
<table class="table table-striped my-0" id="dataTable">
111+
<thead>
112+
<tr>
113+
<th>ID</th>
114+
<th>User</th>
115+
<th>Type</th>
116+
<th>Logs</th>
117+
<th>Date</th>
118+
</tr>
119+
</thead>
120+
<tbody>
121+
<?php include_once 'functions/views/activity.php' ?>
122+
</tbody>
123+
<tfoot>
124+
<tr></tr>
125+
</tfoot>
126+
</table>
127+
159128
</div>
160129
</div>
161130
</div>

functions/setup.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
id INT PRIMARY KEY AUTO_INCREMENT,
1515
username VARCHAR(255),
1616
password VARCHAR(255),
17+
fullname VARCHAR(255),
18+
email VARCHAR(255),
19+
phone VARCHAR(255),
20+
address VARCHAR(255),
1721
level VARCHAR(255),
1822
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
1923
)

functions/views/activity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
?>
1818
<tr>
1919
<td><?php echo $row['id']; ?></td>
20-
<td><img class="rounded-circle me-2" width="30" height="30" src="assets/img/profile.png"><?php echo $user['username'] ?></td>
20+
<td><img class="rounded-circle me-2" width="30" height="30" src="https://bootdey.com/img/Content/avatar/avatar7.png"><?php echo $user['username'] ?></td>
2121
<td><?php echo $row['type'] ?></td>
2222
<td><?php echo $row['logs'] ?></td>
2323
<td><?php echo $row['created_at'] ?></td>

0 commit comments

Comments
 (0)