<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>管理员首页</title>
<link rel="stylesheet" href="../../static/pkg/bootstrap-4.6.1-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../static/css/admin/index.css">
<script src="../../static/pkg/jquery-3.6.0/jquery-3.6.0.min.js"></script>
</head>
<body>
<ul class="nav justify-content-center">
<li class="nav-item">
<a class="nav-link disabled">
<?php
include_once "../../models/core_mysql.php";
if (isset($_SESSION['adminName'])) {
echo "当前操作员:" . $_SESSION['adminName'];
} else {
echo '<script>window.location.href="./login.html"</script>';
}
?>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./useradd.html">添加成员</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./logout.php">退出</a>
</li>
</ul>
<div class="container">
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">UID</th>
<th scope="col">姓名</th>
<th scope="col">今日是否签到</th>
<th scope="col">打卡日期</th>
<th scope="col">操作</th>
</tr>
</thead>
<tbody id="userList">
<!-- <tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr> -->
</tbody>
</table>
</div>
<script src="../../static/pkg/bootstrap-4.6.1-dist/js/bootstrap.min.js"></script>
<script>
fetch('../../apis/admin/getUserList.php', {
method: 'GET',
mode: 'cors',
credentials: 'include'
}).then(response => {
return response.json()
}).then(data => {
let userList = document.querySelector('#userList');
data.forEach(v => {
if (v[2] ? isSign = "是" : isSign = "否")
userList.innerHTML += `<tr>
<th scope="row">${v[0]}</th>
<td>${v[1]}</td>
<td>${isSign}</td>
<td>${v[3]}</td>
<td><a class="btn btn-danger" href="../../apis/admin/userdele.php?uid=${v[0]}">删除</a></td>
</tr>`;
})
console.log(data)
})
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 基于PHP+Bootstrap+MySQL开发的简易签到系统源码+项目说明+sql数据库.zip 基于PHP+Bootstrap+MySQL开发的简易签到系统源码+项目说明+sql数据库.zip 基于PHP+Bootstrap+MySQL开发的简易签到系统源码+项目说明+sql数据库.zip (基于PHP,前端采用Bootstrap,数据库使用MySQL) 使用说明:在数据库新建cloud_signin数据库后,导入cloud_signin.sql文件即可 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载使用,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 欢迎下载,沟通交流,互相学习,共同进步!
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP+Bootstrap+MySQL开发的简易签到系统源码+项目说明+sql数据库.zip (49个子文件)
cloud_signin.sql 2KB
项目说明.md 524B
controllers
admin
login.php 1KB
getUserList.php 744B
userdele.php 491B
useradd.php 754B
office
getSign.php 2KB
gallery
打卡失败.png 461KB
添加用户.png 20KB
打卡成功.png 461KB
管理首页.png 378KB
管理员后台.png 67KB
用户首页.png 384KB
index.html 2KB
models
core_mysql.php 482B
apis
admin
getUserList.php 162B
userdele.php 156B
static
css
admin
index.css 72B
common
common.css 71B
pkg
popper.js
popper.min.js 21KB
jquery-3.6.0
jquery-3.6.0.min.js 87KB
bootstrap-4.6.1-dist
js
bootstrap.js 134KB
bootstrap.bundle.js.map 393KB
bootstrap.bundle.min.js.map 304KB
bootstrap.min.js 61KB
bootstrap.bundle.min.js 81KB
bootstrap.bundle.js 225KB
bootstrap.js.map 242KB
bootstrap.min.js.map 183KB
css
bootstrap-grid.css.map 160KB
bootstrap.min.css 158KB
bootstrap-grid.css 66KB
bootstrap-grid.min.css.map 112KB
bootstrap-reboot.min.css.map 32KB
bootstrap.css.map 503KB
bootstrap.css 195KB
bootstrap-reboot.css 5KB
bootstrap-reboot.css.map 76KB
bootstrap-grid.min.css 49KB
bootstrap.min.css.map 638KB
bootstrap-reboot.min.css 4KB
images
office
wallhaven-399e7v.jpg 1.58MB
views
admin
logout.php 192B
feedback.html 904B
login.html 2KB
index.php 3KB
useradd.html 1KB
office
feedback.html 830B
failed.html 830B
共 49 条
- 1
资源评论
- xyngh2024-01-10内容与描述一致,超赞的资源,值得借鉴的内容很多,支持!
Make程序设计
- 粉丝: 5631
- 资源: 3568
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功