代码提交
This commit is contained in:
parent
7cf264c9c4
commit
8b2bf22a42
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
nginx.htaccess
|
||||
.htaccess
|
||||
setting.inc.php
|
14
README.md
Normal file
14
README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# wxxy_class
|
||||
|
||||
物联网工程学院软件工程二班 - 班级管理项目
|
||||
(此项目并非可重构,目的是开源出来。谨防假冒以及对代码的检查)
|
||||
|
||||
## 开发者(贡献者)
|
||||
|
||||
![](https://contrib.rocks/image?repo=XiaoLFeng/wxxy_class)
|
||||
|
||||
## 维护
|
||||
|
||||
一般不维护,除非出现BUG
|
||||
|
||||
> 筱锋xiao_lfeng
|
90
auth.php
Normal file
90
auth.php
Normal file
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_id = 2;
|
||||
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/module/head-check.php');
|
||||
$callback = htmlspecialchars($_GET['callback']);
|
||||
?>
|
||||
<!doctype html>
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
<!-- 菜单 -->
|
||||
<header>
|
||||
<?PHP include($_SERVER['DOCUMENT_ROOT'].'/module/header.php') ?>
|
||||
</header>
|
||||
<!-- 内容 -->
|
||||
<div id="loader" class="container placeholder-glow mt-5 text-center">
|
||||
<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 my-5">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-3"></div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<div class="card shadow-sm rounded-3">
|
||||
<div class="card-body">
|
||||
<form action="./plugins/login.php?callback=<?PHP echo $callback; ?>" method="post">
|
||||
<div class="row">
|
||||
<div class="col-12 my-3 fs-4 fw-bold text-center">无锡学院二班 - 登录</div>
|
||||
<div class="col-12 mb-3 px-5 input-group">
|
||||
<span class="input-group-text"><i class="bi bi-person"></i> 学号</span>
|
||||
<input type="text" class="form-control" placeholder="22344233" id="studentID" name="studentID" required>
|
||||
</div>
|
||||
<div class="col-12 mb-1 px-5 input-group">
|
||||
<span class="input-group-text"><i class="bi bi-lock"></i> 密码</span>
|
||||
<input type="password" class="form-control" placeholder="***" id="password" name="password" required>
|
||||
</div>
|
||||
<div class="col-12 mb-5 px-5">
|
||||
<font color="red">(密码市学号最后三位,没有隐私信息不设计密码修改)</font>
|
||||
<br/>
|
||||
<font color="grey">登陆后一个月内默认保持登录状态</font>
|
||||
</div>
|
||||
<div class="col-12 mb-3 px-5">
|
||||
<div class="row">
|
||||
<div class="col-3"></div>
|
||||
<div class="d-grid gap-3 col-6">
|
||||
<button class="btn btn-outline-primary" type="submit"><i class="bi bi-box-arrow-in-right"></i> 登录</button>
|
||||
</div>
|
||||
<div class="col-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-3"></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>
|
80
get_book.php
Normal file
80
get_book.php
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 7;
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/module/head-check.php');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/plugins/function.php');
|
||||
?>
|
||||
<!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('./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 mb-2">
|
||||
<div class="row text-center">
|
||||
<div class="col-12"><font color="red">请勿重复提交数据,谢谢喵~</font></div>
|
||||
<div class="col-12">手别太快了,上传对图片来</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<iframe src="https://wj.qq.com/s2/10750231/ed6b/" frameborder="0" class="container" height="600px"></iframe>
|
||||
</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>
|
88
index.php
Normal file
88
index.php
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 1;
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/module/head-check.php');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/plugins/function.php');
|
||||
?>
|
||||
<!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('./module/menu.php'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-bg-8 col-lg-9 mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-8 mb-4 d-flex flex-wrap">
|
||||
<div class="card shadow rounded-3 flex-grow-1">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 fs-5 mb-3"><i class="bi bi-emoji-smile"></i> 欢迎</div>
|
||||
<div class="col-12 px-5 mb-3">不知道写啥,放着吧。这个网站就服务我们二班的东西,顺便也是自己PHP练手的</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 mb-4 d-flex flex-wrap">
|
||||
<div class="card shadow rounded-3 flex-grow-1">
|
||||
<div class="card-body text-center">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3 text-center">
|
||||
<img src="<?PHP echo $setting['API']['Domain'].'avatar/?uid='.$member['data']['uid']; ?>" style="width:120px;" class="rounded-circle">
|
||||
</div>
|
||||
<div class="col-12 mb-1 text-center fs-5 fw-bold"><?PHP echo $member['data']['username']; ?></div>
|
||||
<div class="col-12 text-center"><?PHP echo $member['data']['desc']; ?></div>
|
||||
</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>
|
79
member-ty.php
Normal file
79
member-ty.php
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 6;
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/plugins/function.php');
|
||||
?>
|
||||
<!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('./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 mb-2">
|
||||
<div class="row text-center">
|
||||
<div class="col-12"><font color="red">请勿重复提交数据,谢谢喵~</font></div>
|
||||
<div class="col-12">手别太快了,上传对图片来</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<iframe src="https://wj.qq.com/s2/10753395/53d8/" frameborder="0" class="container" height="600px"></iframe>
|
||||
</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>
|
23
module/footer.php
Normal file
23
module/footer.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<script src="https://gh.akass.cn/XiaoLFeng/live2d-widget/master/autoload.js"></script>
|
||||
<div class="bg-secondary shadow-sm sticky-bottom">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row my-5 text-white">
|
||||
<div class="col-12 col-lg-4 text-start">
|
||||
<div class="row">
|
||||
<div class="col-12"><a class="text-decoration-none text-white" href="https://beian.miit.gov.cn/"><i class="bi bi-cast"></i> 粤ICP备2022014822号</a></div>
|
||||
<div class="col-12"><a class="text-decoration-none text-white" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030702004585"><i class="bi bi-cast"></i> 粤公网安备 44030702004585号</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 text-end">
|
||||
<div class="row">
|
||||
<div class="col-12">© 2022-<?PHP echo date('Y'); ?> <a href="https://www.x-lf.com/" class="text-decoration-none text-white">筱锋xiao_lfeng</a>. All Right Reserved.</div>
|
||||
<div class="col-12">推荐使用 Chrome 或 Microsoft Edge 来浏览本站</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
45
module/head-check.php
Normal file
45
module/head-check.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?PHP
|
||||
// 检查是否正常登录
|
||||
$callback = htmlspecialchars($_GET['callback']);
|
||||
if ($menu_id == 2) {
|
||||
if (!empty($_COOKIE['studentID'])) {
|
||||
if (empty($callback)) {
|
||||
header('location: /index.php');
|
||||
} else {
|
||||
header('location:'.$callback);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (empty($_COOKIE['studentID'])) {
|
||||
$get_ip = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
||||
header('location: https://ourwxxy.x-lf.com/auth.php?callback='.$get_ip);
|
||||
}
|
||||
}
|
||||
/*
|
||||
// 获取数据(获取数据库信息)
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/config.inc.php');
|
||||
|
||||
// 载入网站基本信息
|
||||
$normal_url = $setting['API']['Domain'].'/data/web_info/?ssid='.$setting['SSID'];
|
||||
$normal_ch = curl_init($normal_url);
|
||||
curl_setopt($normal_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($normal_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$normal = curl_exec($normal_ch);
|
||||
$normal = json_decode($normal,true);
|
||||
|
||||
// 载入用户个人信息
|
||||
$member_url = $setting['API']['Domain'].'/data/web_user/?ssid='.$setting['SSID'].'&uid='.$_COOKIE['user'];
|
||||
$member_ch = curl_init($member_url);
|
||||
curl_setopt($member_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($member_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$member = curl_exec($member_ch);
|
||||
$member = json_decode($member,true);
|
||||
|
||||
// 载入镜像基本信息
|
||||
$mirror_url = $setting['API']['Domain'].'/data/web_mirror/?ssid='.$setting['SSID'];
|
||||
$mirror_ch = curl_init($mirror_url);
|
||||
curl_setopt($mirror_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($mirror_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$mirror = curl_exec($mirror_ch);
|
||||
$mirror = json_decode($mirror,true);
|
||||
*/
|
30
module/header.php
Normal file
30
module/header.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<nav class="navbar navbar-expand-lg navbar-light ticky-top" style="background-color:#e3f2fd;">
|
||||
<div class="container py-1">
|
||||
<a class="navbar-brand" href="https://ourwxxy.x-lf.com/"><i class="bi bi-caret-right-fill"></i> 软件工程 - 二班 <i class="bi bi-caret-left-fill"></i></a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="/index.php"><i class="bi bi-house"></i> 主页</a>
|
||||
</li>
|
||||
<?PHP
|
||||
if (empty($_COOKIE['studentID'])) {
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/auth.php"><i class="bi bi-key"></i> 登录</a>
|
||||
</li>
|
||||
<?PHP
|
||||
} else {
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/plugins/loginout.php"><i class="bi bi-key"></i> 登出</a>
|
||||
</li>
|
||||
<?PHP
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
44
module/menu.php
Normal file
44
module/menu.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?PHP
|
||||
function menu_color($menu_num) {
|
||||
global $menu_page;
|
||||
if ($menu_page == $menu_num) {
|
||||
echo 'text-primary';
|
||||
} else {
|
||||
echo 'text-black';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="accordion sticky-top" id="acd">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingOne">
|
||||
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#c-One" aria-expanded="true" aria-controls="collapseOne"><i class="bi bi-clipboard"></i> 面板</button>
|
||||
</h2>
|
||||
<div id="c-One" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#acd">
|
||||
<div class="accordion-body">
|
||||
<div class="row px-4">
|
||||
<div class="col-12 mb-1"><a href="/index.php" class="text-decoration-none <?PHP menu_color(1) ?>"><i class="bi bi-house-door"></i> 主页</a></div>
|
||||
<div class="col-12 mb-1"><a href="/nucleic_acid.php" class="text-decoration-none <?PHP menu_color(3) ?>"><i class="bi bi-bandaid"></i> 核酸信息提交</a></div>
|
||||
<div class="col-12 mb-1"><a href="/pan.php" class="text-decoration-none <?PHP menu_color(4) ?>"><i class="bi bi-device-hdd"></i> 班级网盘</a></div>
|
||||
<div class="col-12 mb-1"><a href="/non-member-fty.php" class="text-decoration-none <?PHP menu_color(5) ?>"><i class="bi bi-chat"></i> 青年大学习(全员)</a></div>
|
||||
<!-- <div class="col-12 mb-1"><a href="/member-ty.php" class="text-decoration-none <?PHP menu_color(6) ?>"><i class="bi bi-chat-dots"></i> 青年大学习(团员)</a></div> -->
|
||||
<div class="col-12 mb-1"><a href="/non-member-fty.php" class="text-decoration-none <?PHP menu_color(7) ?>"><i class="bi bi-chat"></i> 书本领取登记</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingFour">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#c-Four" aria-expanded="false" aria-controls="collapseFour"><i class="bi bi-share"></i> 外链</button>
|
||||
</h2>
|
||||
<div id="c-Four" class="accordion-collapse collapse" aria-labelledby="headingFour" data-bs-parent="#acd">
|
||||
<div class="accordion-body">
|
||||
<div class="row px-4">
|
||||
<div class="col-12 mb-1"><a href="http://jwgl.cwxu.edu.cn/jwglxt/xtgl/login_slogin.html" target="_blank" class="text-decoration-none text-black"><i class="bi bi-box-arrow-right"></i> 无锡教务(课表)</a></div>
|
||||
<div class="col-12"><a href="http://jwc.cwxu.edu.cn/index.jsp" target="_blank" class="text-decoration-none text-black"><i class="bi bi-box-arrow-right"></i> 无锡学院教务处</a></div>
|
||||
<div class="col-12"><a href="http://10.1.99.100/" target="_blank" class="text-decoration-none text-black"><i class="bi bi-box-arrow-right"></i> 校园网登录</a></div>
|
||||
<div class="col-12"><a href="http://10.1.80.200:8080/Self/login/?302=LI" target="_blank" class="text-decoration-none text-black"><i class="bi bi-box-arrow-right"></i> 校园网管理</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
80
non-member-fty.php
Normal file
80
non-member-fty.php
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 5;
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/module/head-check.php');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/plugins/function.php');
|
||||
?>
|
||||
<!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('./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 mb-2">
|
||||
<div class="row text-center">
|
||||
<div class="col-12"><font color="red">请勿重复提交数据,谢谢喵~</font></div>
|
||||
<div class="col-12">手别太快了,上传对图片来</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<iframe src="https://wj.qq.com/s2/10753203/e6f5/" frameborder="0" class="container" height="600px"></iframe>
|
||||
</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>
|
79
nucleic_acid.php
Normal file
79
nucleic_acid.php
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 3;
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/plugins/function.php');
|
||||
?>
|
||||
<!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('./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 mb-2">
|
||||
<div class="row text-center">
|
||||
<div class="col-12"><font color="red">请勿重复提交数据,谢谢喵~</font></div>
|
||||
<div class="col-12">手别太快了,上传对图片来</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<iframe src="https://wj.qq.com/s2/10750231/ed6b/" frameborder="0" class="container" height="600px"></iframe>
|
||||
</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>
|
82
pan.php
Normal file
82
pan.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
// 页面ID
|
||||
$menu_page = 4;
|
||||
// 载入组件
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/module/head-check.php');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/plugins/function.php');
|
||||
?>
|
||||
<!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('./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 mb-2">
|
||||
<div class="row text-center">
|
||||
<div class="col-12"><font color="red">账户:wxxy@x-lf.cn,密码:2022wxxyrjgc2</font></div>
|
||||
<div class="col-12">地址:<a target="_blank" href="https://nas.x-lf.com/">https://nas.x-lf.com/</a></div>
|
||||
<div class="col-12">合理使用资源,不要随意删除,一共10G大小。</div>
|
||||
<div class="col-12">你可以理解为班级小网盘</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<iframe src="https://nas.x-lf.com/s/j42fZ" frameborder="0" class="container" height="800px"></iframe>
|
||||
</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>
|
51
plugins/function.php
Normal file
51
plugins/function.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?PHP
|
||||
|
||||
// 和风天气
|
||||
function amap() {
|
||||
global $normal;
|
||||
// 获取用户IP地址
|
||||
$person_ip = $_SERVER['REMOTE_ADDR'];
|
||||
if (!$person_ip == ('127.0.0.1' or 'localhost')) {
|
||||
// 整理数据获取API
|
||||
$amap_url = 'https://restapi.amap.com/v3/ip?key='.$normal['data']['gddh_key']['text'].'&ip='.$person_ip;
|
||||
$amap_ch = curl_init($amap_url);
|
||||
curl_setopt($amap_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($amap_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$amap = curl_exec($amap_ch);
|
||||
$amap = json_decode($amap,true);
|
||||
return $amap['province'].$amap['city'];
|
||||
} else {
|
||||
return '广东省深圳市';
|
||||
}
|
||||
}
|
||||
|
||||
function qweater($type) {
|
||||
global $normal;
|
||||
if (!$_SERVER['REMOTE_ADDR'] == ('127.0.0.1' or 'localhost')) {
|
||||
// 获取城市信息
|
||||
$qweater_id_url = 'https://geoapi.qweather.com/v2/city/lookup?key='.$normal['data']['hftq_key']['text'].'&location='.amap();
|
||||
$qweater_id_ch = curl_init($qweater_id_url);
|
||||
curl_setopt($qweater_id_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($qweater_id_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$qweater_id = curl_exec($qweater_id_ch);
|
||||
$qweater_id = json_decode($qweater_id,true);
|
||||
|
||||
// ID获取
|
||||
$location_id = $qweater_id['location'][0]['id'];
|
||||
|
||||
// 获取天气概况
|
||||
$qweater_url = 'https://devapi.qweather.com/v7/weather/now?key='.$normal['data']['hftq_key']['text'].'&location='.$location_id;
|
||||
$qweater_ch = curl_init($qweater_url);
|
||||
curl_setopt($qweater_ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($qweater_ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$qweater = curl_exec($qweater_ch);
|
||||
$qweater = json_decode($qweater,true);
|
||||
|
||||
// 内容输出
|
||||
return $qweater['now'][$type];
|
||||
} else {
|
||||
if ($type == 'temp') {
|
||||
return '26';
|
||||
}
|
||||
}
|
||||
}
|
55
plugins/login.php
Normal file
55
plugins/login.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');
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/plugins/sql_conn.php');
|
||||
// 获取参数
|
||||
$studentID = $_POST['studentID'];
|
||||
$password = $_POST['password'];
|
||||
$callback = htmlspecialchars($_GET['callback']);
|
||||
|
||||
// 函数构建
|
||||
// 检查数据是否为空
|
||||
if (!empty($studentID) and !empty($password)) {
|
||||
// 检查用户
|
||||
if ($result_person = mysqli_query($conn,"SELECT * FROM ".$setting['SQL_DATA']['info']." WHERE studentID='$studentID'")) {
|
||||
$result_person_object = mysqli_fetch_object($result_person);
|
||||
if ($password == $result_person_object->password) {
|
||||
$keyID = $result_person_object->studentID;
|
||||
setcookie( 'studentID' , $keyID , time()+2678400 , '/' , '');
|
||||
if (empty($callback)) {
|
||||
$callbacks = '/';
|
||||
} else {
|
||||
$callbacks = $callback;
|
||||
}
|
||||
header('location:'.$callbacks);
|
||||
} else {
|
||||
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.history.go(-1);
|
||||
</script>
|
||||
EOF;
|
||||
}
|
3
plugins/loginout.php
Normal file
3
plugins/loginout.php
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?PHP
|
||||
setcookie( 'studentID' , '' , time()-1 , '/' , '');
|
||||
header('location: /auth.php');
|
27
plugins/sql_conn.php
Normal file
27
plugins/sql_conn.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?PHP
|
||||
/*
|
||||
* 筱锋xiao_lfeng 分享系统(插件)
|
||||
* 数据库链接系统
|
||||
*/
|
||||
|
||||
//定义参数
|
||||
$sql_host = $setting['SQL']['host'];
|
||||
$sql_dbname = $setting['SQL']['dbname'];
|
||||
$sql_username = $setting['SQL']['username'];
|
||||
$sql_password = $setting['SQL']['password'];
|
||||
//判断数据库端口
|
||||
if($setting['sql']['port'] == 3306 or $setting['sql']['port'] == NULL){
|
||||
//定义参数
|
||||
$sql_port = 3306;
|
||||
} else {
|
||||
//定义参数
|
||||
$sql_port = $setting['sql']['port'];
|
||||
}
|
||||
//连接数据库
|
||||
$conn=new MySQLi($sql_host,$sql_username,$sql_password,$sql_dbname,$sql_port);
|
||||
/*
|
||||
//检查链接
|
||||
if($sql_conn->connect_error){
|
||||
die('数据库连接失败!'.$conn->connect_error);
|
||||
}
|
||||
*/
|
BIN
src/img/logo.jpg
Normal file
BIN
src/img/logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user