签到表
This commit is contained in:
parent
2e9830447f
commit
96581bd8e2
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
nginx.htaccess
|
||||
.htaccess
|
||||
setting.inc.php
|
||||
demo.php
|
104
signin/20220911.php
Normal file
104
signin/20220911.php
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 8;
|
||||
?>
|
||||
<!doctype html>
|
||||
<!--
|
||||
哎呀,原来你看到了呀。
|
||||
欢迎你~
|
||||
如果你想看完整的代码你可以去我的GITHUB看代码,代码地址如下哦:
|
||||
https://github.com/XiaoLFeng/wxxy_class
|
||||
欢迎来201宿舍玩啊~
|
||||
-->
|
||||
<html lang="zh">
|
||||
<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="shortcut icon" href="/src/img/logo.jpg" type="image/x-icon">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/bootstrap@5.1.3/dist/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/bootstrap-icons@1.8.2/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/qweather-icons@1.1.1/font/qweather-icons.css">
|
||||
</head>
|
||||
<body style="background-color:#e3f2fd;">
|
||||
<!-- 菜单 -->
|
||||
<header>
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/header.php') ?>
|
||||
</header>
|
||||
<!-- 内容 -->
|
||||
<div id="loader" class="container placeholder-glow text-center py-4">
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
</div>
|
||||
<div id="main" class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-bg-4 col-lg-3 mb-3">
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/menu.php'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-bg-8 col-lg-9 mb-3">
|
||||
<div class="row">
|
||||
<div class="card shadow rounded-3">
|
||||
<div class="card-body">
|
||||
<div class="row text-center">
|
||||
<div class="col-12 fs-5 fw-bold mb-3">军训服装集合领取签到</div>
|
||||
<?PHP
|
||||
if ($_COOKIE['studentID'] = '22344233' or $_COOKIE['studentID'] = '22344231' or $_COOKIE['studentID'] = '22344218' or $_COOKIE['studentID'] = '22344219' or $_COOKIE['studentID'] = '22344216') {
|
||||
?>
|
||||
<div class="col-12 my-3">查询到场人 <a class="btn btn-danger" href="./admin_20220911.php" role="button">查询</a></div>
|
||||
<?PHP
|
||||
}
|
||||
?>
|
||||
<div class="col-12 mb-1">点击下方按钮进行签到</div>
|
||||
<div class="col-12 mb-3"><button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#exampleModal">签到</button></div>
|
||||
<div class="col-12"></div>
|
||||
<div class="col-12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Model -->
|
||||
<form action="./upload/20220911.php" method="post">
|
||||
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">请输入签到码</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
为了方便我们统计人数,请不要随意点击签到,请到指定位置后点击签到。谢谢QWQ
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
|
||||
<button type="submit" class="btn btn-primary">确认签到</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- 页尾 -->
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/footer.php') ?>
|
||||
</body>
|
||||
<!-- JavaScript -->
|
||||
<script src="https://npm.akass.cn/bootstrap@5.1.3/dist/js/bootstrap.min.js"></script>
|
||||
<script src="https://npm.akass.cn/bootstrap@5.1.3/dist/js/bootstrap.bundle.js"></script>
|
||||
<script src="https://npm.akass.cn/jquery@3.2.1/dist/jquery.min.js"></script>
|
||||
<script>
|
||||
// 加载内容
|
||||
$("#main").hide();
|
||||
window.onload=function(){
|
||||
$("#loader").fadeOut(200);
|
||||
$("#main").show(500);
|
||||
}
|
||||
</script>
|
||||
</html>
|
121
signin/admin_20220911.php
Normal file
121
signin/admin_20220911.php
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 8;
|
||||
// 检查用户
|
||||
if ($_COOKIE['studentID'] == '22344233' or $_COOKIE['studentID'] == '22344231' or $_COOKIE['studentID'] == '22344218' or $_COOKIE['studentID'] == '22344219' or $_COOKIE['studentID'] == '22344216') {
|
||||
} else {
|
||||
header('location: /index.php');
|
||||
}
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/setting.inc.php');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/module/head-check.php');
|
||||
|
||||
// 载入签到
|
||||
$signin_url = $setting['API']['Domain'].'/signin/?key='.$setting['Key'].'&type=admin';
|
||||
$signin_ch = curl_init($signin_url);
|
||||
curl_setopt($signin_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($signin_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$signin = curl_exec($signin_ch);
|
||||
$signin = json_decode($signin,true);
|
||||
?>
|
||||
<!doctype html>
|
||||
<!--
|
||||
哎呀,原来你看到了呀。
|
||||
欢迎你~
|
||||
如果你想看完整的代码你可以去我的GITHUB看代码,代码地址如下哦:
|
||||
https://github.com/XiaoLFeng/wxxy_class
|
||||
欢迎来201宿舍玩啊~
|
||||
-->
|
||||
<html lang="zh">
|
||||
<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="shortcut icon" href="/src/img/logo.jpg" type="image/x-icon">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/bootstrap@5.1.3/dist/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/bootstrap-icons@1.8.2/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/qweather-icons@1.1.1/font/qweather-icons.css">
|
||||
</head>
|
||||
<body style="background-color:#e3f2fd;">
|
||||
<!-- 菜单 -->
|
||||
<header>
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/header.php') ?>
|
||||
</header>
|
||||
<!-- 内容 -->
|
||||
<div id="loader" class="container placeholder-glow text-center py-4">
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
</div>
|
||||
<div id="main" class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-bg-4 col-lg-3 mb-3">
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/menu.php'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-bg-8 col-lg-9 mb-3">
|
||||
<div class="row">
|
||||
<div class="card shadow rounded-3">
|
||||
<div class="card-body">
|
||||
<div class="row text-center">
|
||||
<div class="col-12 fs-5 fw-bold mb-3">军训服装集合领取签到(管理员)</div>
|
||||
<div class="col-12">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">学号</th>
|
||||
<th scope="col">姓名</th>
|
||||
<th scope="col">签到</th>
|
||||
<th scope="col">时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?PHP
|
||||
$num = 1;
|
||||
while (!empty($signin['data'][$num]['name'])) {
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><?PHP echo $signin['data'][$num]['studentID'] ?></th>
|
||||
<td><?PHP echo $signin['data'][$num]['name'] ?></td>
|
||||
<td>
|
||||
<?PHP
|
||||
if ($signin['data'][$num]['signin'] == TRUE) {
|
||||
echo '<font color="green">已签到</font>';
|
||||
} else {
|
||||
echo '<font color="red">未签到</font>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?PHP echo $signin['data'][$num]['time'] ?></td>
|
||||
</tr>
|
||||
<?PHP
|
||||
$num ++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 页尾 -->
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/footer.php') ?>
|
||||
</body>
|
||||
<!-- JavaScript -->
|
||||
<script src="https://npm.akass.cn/bootstrap@5.1.3/dist/js/bootstrap.min.js"></script>
|
||||
<script src="https://npm.akass.cn/bootstrap@5.1.3/dist/js/bootstrap.bundle.js"></script>
|
||||
<script src="https://npm.akass.cn/jquery@3.2.1/dist/jquery.min.js"></script>
|
||||
<script>
|
||||
// 加载内容
|
||||
$("#main").hide();
|
||||
window.onload=function(){
|
||||
$("#loader").fadeOut(200);
|
||||
$("#main").show(500);
|
||||
}
|
||||
</script>
|
||||
</html>
|
89
signin/index.php
Normal file
89
signin/index.php
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 8;
|
||||
?>
|
||||
<!doctype html>
|
||||
<!--
|
||||
哎呀,原来你看到了呀。
|
||||
欢迎你~
|
||||
如果你想看完整的代码你可以去我的GITHUB看代码,代码地址如下哦:
|
||||
https://github.com/XiaoLFeng/wxxy_class
|
||||
欢迎来201宿舍玩啊~
|
||||
-->
|
||||
<html lang="zh">
|
||||
<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="shortcut icon" href="/src/img/logo.jpg" type="image/x-icon">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/bootstrap@5.1.3/dist/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/bootstrap-icons@1.8.2/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="https://npm.akass.cn/qweather-icons@1.1.1/font/qweather-icons.css">
|
||||
</head>
|
||||
<body style="background-color:#e3f2fd;">
|
||||
<!-- 菜单 -->
|
||||
<header>
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/header.php') ?>
|
||||
</header>
|
||||
<!-- 内容 -->
|
||||
<div id="loader" class="container placeholder-glow text-center py-4">
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
<div class="spinner-grow text-primary" role="status"><span class="visually-hidden">Loading...</span></div>
|
||||
</div>
|
||||
<div id="main" class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-bg-4 col-lg-3 mb-3">
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/menu.php'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-bg-8 col-lg-9 mb-3">
|
||||
<div class="row">
|
||||
<div class="card shadow rounded-3">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 fs-5 fw-bold text-center mb-3">活动/事务 · 签到信息</div>
|
||||
<div class="col-12">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">序号</th>
|
||||
<th scope="col">内容</th>
|
||||
<th scope="col">日期</th>
|
||||
<th scope="col">进入</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">1</th>
|
||||
<td>军训服装领取签到</td>
|
||||
<td>2022-09-11</td>
|
||||
<td><a class="btn btn-outline-primary btn-sm" href="./20220911.php" role="button"><i class="bi bi-arrow-bar-right"></i> 进入签到 <i class="bi bi-arrow-bar-left"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 页尾 -->
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/footer.php') ?>
|
||||
</body>
|
||||
<!-- JavaScript -->
|
||||
<script src="https://npm.akass.cn/bootstrap@5.1.3/dist/js/bootstrap.min.js"></script>
|
||||
<script src="https://npm.akass.cn/bootstrap@5.1.3/dist/js/bootstrap.bundle.js"></script>
|
||||
<script src="https://npm.akass.cn/jquery@3.2.1/dist/jquery.min.js"></script>
|
||||
<script>
|
||||
// 加载内容
|
||||
$("#main").hide();
|
||||
window.onload=function(){
|
||||
$("#loader").fadeOut(200);
|
||||
$("#main").show(500);
|
||||
}
|
||||
</script>
|
||||
</html>
|
55
signin/upload/20220911.php
Normal file
55
signin/upload/20220911.php
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?PHP
|
||||
/*
|
||||
* 筱锋xiao_lfeng 分享系统(插件)
|
||||
* 登录组件
|
||||
*/
|
||||
|
||||
// 定义请求头
|
||||
header("Content-type:text/html;charset=utf-8");
|
||||
// 获取组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/setting.inc.php');
|
||||
// 获取参数
|
||||
$studentID = $_COOKIE['studentID'];
|
||||
$sigin_id = '20220911';
|
||||
|
||||
// 函数构建
|
||||
// 检查数据是否为空
|
||||
if (!empty($studentID)) {
|
||||
// 载入信息
|
||||
$signin_url = $setting['API']['Domain'].'/signin/?key='.$setting['Key'].'&studentID='.$studentID.'&type=normal';
|
||||
$signin_ch = curl_init($signin_url);
|
||||
curl_setopt($signin_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($signin_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$signin = curl_exec($signin_ch);
|
||||
$signin = json_decode($signin,true);
|
||||
|
||||
if ($signin['output'] == 'SUCCESS') {
|
||||
echo <<<EOF
|
||||
<script language="javascript">
|
||||
alert( "已完成!" )
|
||||
window.location.href = "/signin/20220911.php"
|
||||
</script>
|
||||
EOF;
|
||||
} elseif ($signin['output'] == 'SQL_DNEY') {
|
||||
echo <<<EOF
|
||||
<script language="javascript">
|
||||
alert( "操作拒绝!已经有数据了" )
|
||||
window.history.go(-1);
|
||||
</script>
|
||||
EOF;
|
||||
} else {
|
||||
echo <<<EOF
|
||||
<script language="javascript">
|
||||
alert( "缺少密钥" )
|
||||
window.history.go(-1);
|
||||
</script>
|
||||
EOF;
|
||||
}
|
||||
} else {
|
||||
echo <<<EOF
|
||||
<script language="javascript">
|
||||
alert( "您未登录!" )
|
||||
window.location.href = "/auth.php"
|
||||
</script>
|
||||
EOF;
|
||||
}
|
Loading…
Reference in New Issue
Block a user