top of page

Op Fe Admin Panel Gui Script ((full)) -
// op fe admin panel gui script - core logic document.getElementById('usersBtn').onclick = () => fetch('/api/op/users', credentials: 'include' ) .then(res => res.json()) .then(data => let html = '<table><tr><th>ID</th><th>Name</th><th>Role</th><th>Action</th></tr>'; data.users.forEach(user => html += `<tr> <td>$user.id</td> <td>$user.name</td> <td>$user.role</td> <td><button onclick="banUser($user.id)">Ban</button></td> </tr>`; ); html += '</table>'; document.getElementById('dynamicContent').innerHTML = html; ); ;
bottom of page
