Bladeren bron

Source Code

master
陈越 3 jaren geleden
bovenliggende
commit
d82f3cf876
29 gewijzigde bestanden met toevoegingen van 819 en 0 verwijderingen
  1. BIN
      SaaS screenshot/add.png
  2. BIN
      SaaS screenshot/attend.png
  3. BIN
      SaaS screenshot/check.png
  4. BIN
      SaaS screenshot/list.png
  5. BIN
      SaaS screenshot/login.png
  6. BIN
      SaaS screenshot/select.png
  7. BIN
      SaaS screenshot/update.png
  8. +64
    -0
      html/apps/attend_attendance.php
  9. +24
    -0
      html/apps/attend_check.php
  10. +71
    -0
      html/apps/attend_check_do.php
  11. +20
    -0
      html/apps/attend_select.php
  12. +26
    -0
      html/apps/attend_select_del.php
  13. +29
    -0
      html/apps/attend_select_index.php
  14. +12
    -0
      html/apps/conn.php
  15. +27
    -0
      html/apps/staff_add.php
  16. +20
    -0
      html/apps/staff_del.php
  17. +16
    -0
      html/apps/staff_list.php
  18. +30
    -0
      html/apps/staff_update.php
  19. +97
    -0
      html/attendance.sql
  20. BIN
      html/images/ECNU.png
  21. BIN
      html/images/logonew.png
  22. +111
    -0
      html/index.php
  23. +6
    -0
      html/index_2.php
  24. +48
    -0
      html/views/attend_attendance.html
  25. +49
    -0
      html/views/attend_check.html
  26. +47
    -0
      html/views/attend_select.html
  27. +36
    -0
      html/views/staff_add.html
  28. +51
    -0
      html/views/staff_list.html
  29. +35
    -0
      html/views/staff_update.html

BIN
SaaS screenshot/add.png Bestand weergeven

Voor Na
Breedte: 1920  |  Hoogte: 943  |  Grootte: 28 KiB

BIN
SaaS screenshot/attend.png Bestand weergeven

Voor Na
Breedte: 1920  |  Hoogte: 943  |  Grootte: 41 KiB

BIN
SaaS screenshot/check.png Bestand weergeven

Voor Na
Breedte: 1920  |  Hoogte: 943  |  Grootte: 37 KiB

BIN
SaaS screenshot/list.png Bestand weergeven

Voor Na
Breedte: 1920  |  Hoogte: 943  |  Grootte: 36 KiB

BIN
SaaS screenshot/login.png Bestand weergeven

Voor Na
Breedte: 1920  |  Hoogte: 943  |  Grootte: 178 KiB

BIN
SaaS screenshot/select.png Bestand weergeven

Voor Na
Breedte: 1920  |  Hoogte: 943  |  Grootte: 36 KiB

BIN
SaaS screenshot/update.png Bestand weergeven

Voor Na
Breedte: 1920  |  Hoogte: 943  |  Grootte: 29 KiB

+ 64
- 0
html/apps/attend_attendance.php Bestand weergeven

@ -0,0 +1,64 @@
<?php
//引入公共文件
require("./conn.php");
// 获取考勤数
$var=mysqli_fetch_assoc(mysqli_query($conn, "select sum_all from var"));
$sum=$var['sum_all'];
echo "当前考勤数为:".$sum."<br>";
/***************************
* 获取所选名单考勤结果
* *************************/
$sql1 = "select staff_temp.jobnum,name,dept,depthead,sum_fail,score
from staff_temp,attend_score
where staff_temp.jobnum=attend_score.jobnum
order by dept,staff_temp.jobnum";
$res1 = mysqli_query($conn, $sql1);
//建立一个空数组
$data1 = array();
//执行循环
while($row1 = mysqli_fetch_assoc($res1)){
$data1[] = $row1;
}
/***********************************
* 获取全部名单考勤结果
* *********************************/
$sql2 = "select staff_info.jobnum,name,dept,depthead,sum_fail,score
from staff_info,attend_score
where staff_info.jobnum=attend_score.jobnum
order by dept,staff_info.jobnum";
$res2 = mysqli_query($conn, $sql2);
$data2 = array();$num=array();
while($row2 = mysqli_fetch_assoc($res2)){
$data2[] = $row2;
}
/***************************
* 获取所有考勤记录
* *************************/
mysqli_query($conn,"drop table if exists t");
mysqli_query($conn,"create table t (
select staff_info.jobnum as id,name,dept,depthead,number,state
from attend_record,staff_info
where attend_record.jobnum=staff_info.jobnum
order by dept,staff_info.jobnum,number)");
$sql3 = "select id,name,dept,depthead,
group_concat(number) as num,group_concat(state) as state
from t
group by id
order by dept,id";
$res3 = mysqli_query($conn, $sql3);
$data3 = array();
while($row3 = mysqli_fetch_assoc($res3)){
$data3[] = $row3;
}
mysqli_query($conn,"drop table if exists t");
//引入列表页面
require("../views/attend_attendance.html");
?>

+ 24
- 0
html/apps/attend_check.php Bestand weergeven

@ -0,0 +1,24 @@
<?php
//引入公共文件
require("./conn.php");
// 获取考勤数
$var=mysqli_fetch_assoc(mysqli_query($conn, "select sum_all from var"));
$sum=$var['sum_all'];
echo "当前考勤数为:".$sum;
// 获取考勤职工
$sql = "select * from staff_temp order by dept, jobnum";
$res = mysqli_query($conn, $sql);
//建立一个空数组
$data = array();
//执行循环
while($row = mysqli_fetch_assoc($res)){
$data[] = $row;
}
//引入列表页面
require("../views/attend_check.html");
?>

+ 71
- 0
html/apps/attend_check_do.php Bestand weergeven

@ -0,0 +1,71 @@
<?php
header("Content-Type: text/html;charset=utf-8");
//引入公共文件
require("./conn.php");
// 获取考勤数
$var=mysqli_fetch_assoc(mysqli_query($conn, "select sum_all from var"));
$sum=$var['sum_all'];
/***********************************************************
* 签到记录,表单的attend和考勤的data的比较
***********************************************************/
// 获取签到表单
$attend=$_POST['attend'];
// 获取考勤职工
$res = mysqli_query($conn,"select jobnum from staff_temp order by dept, jobnum");
$data = array();
while($row = mysqli_fetch_assoc($res)){
$data[] = $row['jobnum'];
}
// 签到记录,attend中有的签通过,attend中没有的签不通过;
for($i=0;$i< count($data);$i++) {
$flag=0;
for($j=0;$j<count($attend);$j++){
if($data[$i]==$attend[$j]){
mysqli_query($conn, "insert into attend_record values ('$data[$i]', '$sum', '通过')");
array_splice($attend, $j, 1);
$flag=1;
break;
}
}
if($flag==0)
mysqli_query($conn, "insert into attend_record values ('$data[$i]', '$sum', '不通过')");
}
/*********************************************************
* 连续三次考勤不通过score=0
* 累计考勤不通过数大于5,score=0
*********************************************************/
// 获取所有职工工号
$res2 = mysqli_query($conn, "select jobnum from staff_info order by jobnum");
$num=array();
while($row2 = mysqli_fetch_assoc($res2)){
$num[]=$row2['jobnum'];
}
// 连续三次考勤不通过score=0
for($i=0;$i<count($num);$i++){
mysqli_query($conn, " update attend_score
set score=0
where not exists(
select *
from (
select * from attend_record
where jobnum='$num[$i]'
order by number desc
limit 3
) t
where state='通过'
) and jobnum='$num[$i]'");
}
// 累计考勤不通过数大于5,score=0
mysqli_query($conn, "update attend_score set score=0 where sum_fail>=5");
// 跳转到查看考勤结果
echo "<script>window.location='./attend_attendance.php'</script>";
?>

+ 20
- 0
html/apps/attend_select.php Bestand weergeven

@ -0,0 +1,20 @@
<?php
//引入公共文件
require("./conn.php");
// 获取考勤数
$var=mysqli_fetch_assoc(mysqli_query($conn, "select sum_all from var"));
$sum=$var['sum_all'];
echo "当前考勤数为:".$sum;
$sql = "select * from staff_temp order by dept,jobnum";
$res = mysqli_query($conn, $sql);
//建立一个空数组
$data = array();
//执行循环
while($row = mysqli_fetch_assoc($res)){
$data[] = $row;
}
//引入列表页面
require("../views/attend_select.html");
?>

+ 26
- 0
html/apps/attend_select_del.php Bestand weergeven

@ -0,0 +1,26 @@
<?php
header("Content-Type: text/html;charset=utf-8");
//引入公共文件
require("./conn.php");
//获取删除数据ID
$id = $_GET[id];
// 获取当前考勤序号
$var=mysqli_fetch_assoc(mysqli_query($conn, "select sum_all from var"));
$sum=$var['sum_all'];
// 删除职工,默认通过
$sql = "delete from staff_temp where jobnum='$id';";
$sql .= "insert into attend_record values ('$id', '$sum', '通过')";
$res = mysqli_multi_query($conn, $sql);
//判断
if($res){
echo "<script>window.location='./attend_select.php'</script>";
}else{
die("连接错误:".mysqli_connect_error());
}
?>

+ 29
- 0
html/apps/attend_select_index.php Bestand weergeven

@ -0,0 +1,29 @@
<?php
//引入公共文件
require("./conn.php");
// 考勤数sum_all+1
mysqli_query($conn, "update var set sum_all=sum_all+1;");
// 获取考勤数
$var=mysqli_fetch_assoc(mysqli_query($conn, "select sum_all from var"));
$sum=$var['sum_all'];
echo "当前考勤数为:".$sum;
// 创建临时表选择考勤职工
mysqli_query($conn, "drop table if exists staff_temp");
mysqli_query($conn, "create table staff_temp as select * from staff_info");
// 获取临时表数据
$res = mysqli_query($conn, "select * from staff_temp order by dept,jobnum");
//建立一个空数组
$data = array();
while($row = mysqli_fetch_assoc($res)){
$data[] = $row;
}
//引入列表页面
require("../views/attend_select.html");
?>

+ 12
- 0
html/apps/conn.php Bestand weergeven

@ -0,0 +1,12 @@
<?php
//链接数据库
$conn = mysqli_connect("localhost", "root", null, "attendance");
//判断错误函数
if(!$conn){
die('连接Mysql失败:'.mysqli_connect_error());
}
//设定字符集编码
mysqli_set_charset($conn, 'utf8');
?>

+ 27
- 0
html/apps/staff_add.php Bestand weergeven

@ -0,0 +1,27 @@
<?php
//引入公共文件
require("./conn.php");
if(empty($_POST)){
//引入数据添加静态页面
require("../views/staff_add.html");
}else{
//获取表单值
$jobnum = $_POST['jobnum'];
$name = $_POST['name'];
$dept = $_POST['dept'];
$depthead =$_POST['depthead'];
//插入数据库语句
$sql = "insert into staff_info (jobnum,name,dept,depthead) values ('$jobnum','$name','$dept','$depthead');";
$sql .= "insert into attend_score (jobnum) values ('$jobnum')";
//执行数据
$res = mysqli_multi_query($conn, $sql);
//判断结果
if($res){
echo "<script>window.location='./staff_list.php'</script>";
}else{
die("连接错误:".mysqli_connect_error());
}
}
?>

+ 20
- 0
html/apps/staff_del.php Bestand weergeven

@ -0,0 +1,20 @@
<?php
header("Content-Type: text/html;charset=utf-8");
//引入公共文件
require("./conn.php");
//获取删除数据ID
$id = $_GET[id];
//删除语句
$sql = "delete from staff_info where jobnum=$id;";
$sql .= "delete from attend_score where jobnum=$id";
//执行语句
$res = mysqli_multi_query($conn, $sql);
//判断
if($res){
echo "<script>window.location='./staff_list.php'</script>";
}else{
die("连接错误:".mysqli_connect_error());
}
?>

+ 16
- 0
html/apps/staff_list.php Bestand weergeven

@ -0,0 +1,16 @@
<?php
//引入公共文件
require("./conn.php");
//查询语句
$sql = "select * from staff_info order by dept,jobnum";
//执行语句
$res = mysqli_query($conn, $sql);
//建立一个空数组
$data = array();
//执行循环
while($row = mysqli_fetch_assoc($res)){
$data[] = $row;
}
//引入列表页面
require("../views/staff_list.html");
?>

+ 30
- 0
html/apps/staff_update.php Bestand weergeven

@ -0,0 +1,30 @@
<?php
//引入公共文件
require("./conn.php");
//获取删除数据ID
$id = $_GET[id];
if(empty($_POST)){
//查询语句
$sql = "select * from staff_info where jobnum=$id";
//执行语句
$res = mysqli_query($conn, $sql);
//放入数组
$arr = mysqli_fetch_assoc($res);
//引入修改页面
require("../views/staff_update.html");
}else{
//更新语句
$sql = "update staff_info set jobnum='$_POST[jobnum]',name='$_POST[name]',dept='$_POST[dept]',depthead='$_POST[depthead]' where jobnum=$id;";
$sql .= "update attend_score set jobnum='$_POST[jobnum]' where jobnum=$id";
//执行语句
$res = mysqli_multi_query($conn, $sql);
//判断结果
if($res){
echo "<script>window.location='./staff_list.php'</script>";
}else{
die("连接错误:".mysqli_connect_error());
}
}
?>

+ 97
- 0
html/attendance.sql Bestand weergeven

@ -0,0 +1,97 @@
SET names utf8;
SET FOREIGN_KEY_CHECKS=0;
DROP DATABASE IF EXISTS attendance;
CREATE DATABASE attendance CHARSET utf8;
USE attendance;
-- ----------------------------
-- Table structure for staff_info
-- ----------------------------
DROP TABLE IF EXISTS `staff_info`;
CREATE TABLE `staff_info` (
`jobnum` int(255) NOT NULL COMMENT '学号',
`name` varchar(255) default NULL COMMENT '姓名',
`dept` varchar(255) default NULL COMMENT '院系',
`depthead` varchar(255) default NULL COMMENT '班级'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for attend_record
-- ----------------------------
DROP TABLE IF EXISTS `attend_record`;
CREATE TABLE `attend_record` (
`jobnum` int(255) NOT NULL COMMENT '学号',
`number` int(255) NOT NULL COMMENT '考勤序号',
`state` varchar(255) default NULL COMMENT '签到为通过否则为不通过'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for attend_score
-- ----------------------------
DROP TABLE IF EXISTS `attend_score`;
CREATE TABLE `attend_score` (
`jobnum` int(255) NOT NULL COMMENT '学号',
`sum_fail` int(255) NOT NULL COMMENT '累计签到次数',
`score` int(255) NOT NULL COMMENT '考勤成绩'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for var
-- ----------------------------
DROP TABLE IF EXISTS `var`;
CREATE TABLE `var` (
`sum_all` int(255) NOT NULL COMMENT '考勤次数'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `var` (`sum_all`) VALUES (0);
-- ----------------------------
-- Records of staff_info
-- ----------------------------
INSERT INTO `staff_info` (`jobnum`, `name`, `dept`, `depthead`) VALUES
(438, '陈越', '数据学院', '1'),
(1, '学生1', '学院1', '1'),
(2, '学生2', '学院2', '2'),
(3, '学生3', '学院3', '3');
-- ----------------------------
-- Records of attend_score
-- ----------------------------
INSERT INTO `attend_score` (`jobnum`) VALUES
(438),
(1),
(2),
(3);
-- ---------------------------------
-- Indexes for table `staff_info`
-- ---------------------------------
ALTER TABLE `staff_info`ADD PRIMARY KEY (`jobnum`);
-- ---------------------------------
-- Indexes for table `attend_score`
-- ---------------------------------
ALTER TABLE `attend_score`ADD PRIMARY KEY (`jobnum`);
-- ----------------------------
-- 在表attend_record上创建触发器change_score
-- 签到通过,score+1,
-- 累计考勤不通过数
-- ----------------------------
DELIMITER $$
DROP TRIGGER IF EXISTS change_score$$
CREATE TRIGGER change_score AFTER INSERT
ON attend_record FOR EACH ROW
BEGIN
-- 考勤通过者,score+1
update attend_score
set score=score+'1'
where jobnum=NEW.jobnum and NEW.state = '通过';
-- 累计考勤不通过数
update attend_score
set sum_fail=sum_fail+'1'
where jobnum=NEW.jobnum and NEW.state = '不通过';
END
$$
DELIMITER ;

BIN
html/images/ECNU.png Bestand weergeven

Voor Na
Breedte: 300  |  Hoogte: 92  |  Grootte: 66 KiB

BIN
html/images/logonew.png Bestand weergeven

Voor Na
Breedte: 300  |  Hoogte: 73  |  Grootte: 15 KiB

+ 111
- 0
html/index.php Bestand weergeven

@ -0,0 +1,111 @@
<?php
$user['root']='123';
//$user['µÇ¼Õ˺Å']='µÇ¼ÃÜÂë';
session_set_cookie_params(0, "/", "", false, true);
if (isset($_REQUEST['session_id'])) session_id($_REQUEST['session_id']);
session_name('swapuuid');
session_save_path(hq_s_path());
session_start();
$u=$_POST['username'];
$p=$_POST['password'];
if($user[$u]==$p && !empty($u) && !empty($p)){
$_SESSION['adminlogin']='1';
die(header("location:/index_2.php"));
}
function hq_s_path(){
$a = sys_get_temp_dir();
$sc2= $a.'/temps/';
$scache=dirname(__FILE__).'/swap_mac/swap_cache/';
$scache=str_replace('/',DIRECTORY_SEPARATOR,$scache);
$sc2=str_replace('/',DIRECTORY_SEPARATOR,$sc2);
if (!empty($a) && is_dir($sc2) && is_writable($sc2)) $scache=$sc2;
return $scache;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>学生管理平台登录</title>
<meta content="width=device-width, initial-scale=1"name="viewport"/>
<meta charset="UTF-8">
<link href='https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700'rel='stylesheet'type='text/css'>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/mdui@1.0.0/dist/css/mdui.min.css"
integrity="sha384-2PJ2u4NYg6jCNNpv3i1hK9AoAqODy6CdiC+gYiL2DVx+ku5wzJMFNdE3RoWfBIRP"
crossorigin="anonymous"
/>
<script
src="https://cdn.jsdelivr.net/npm/mdui@1.0.0/dist/js/mdui.min.js"
integrity="sha384-aB8rnkAu/GBsQ1q6dwTySnlrrbhqDwrDnpVHR2Wgm8pWLbwUnzDcIROX3VvCbaK+"
crossorigin="anonymous"
></script>
<style>
.mdui-btn{border-radius: 40px;;background-image: linear-gradient(45deg, #42aec9 0%, #90a7c9 100%);}
.mdui-toolbar{border-radius: 0px 0px 40px 0px;;background-image: linear-gradient(45deg, #bb3052f5 0%, #db7b90 100%);}
header{border-radius: 0px 0px 40px 0px;;}
</style>
<link href='https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700'rel='stylesheet'type='text/css'><link href="https://admin.down.swap.wang/assets/plugins/pace-master/themes/blue/pace-theme-flash.css"rel="stylesheet"/><link href="https://admin.down.swap.wang/assets/plugins/uniform/css/uniform.default.min.css"rel="stylesheet"/><link href="https://admin.down.swap.wang/assets/plugins/bootstrap/css/bootstrap.min.css"rel="stylesheet"type="text/css"/>
<link href="https://cdn.bootcss.com/font-awesome/4.3.0/css/font-awesome.min.css"rel="stylesheet"type="text/css"/><link href="https://admin.down.swap.wang/assets/plugins/line-icons/simple-line-icons.css"rel="stylesheet"type="text/css"/><link href="https://admin.down.swap.wang/assets/plugins/waves/waves.min.css"rel="stylesheet"type="text/css"/><link href="https://admin.down.swap.wang/assets/plugins/switchery/switchery.min.css"rel="stylesheet"type="text/css"/><link href="https://admin.down.swap.wang/assets/plugins/3d-bold-navigation/css/style.css"rel="stylesheet"type="text/css"/><link href="https://admin.down.swap.wang/assets/css/modern.min.css"rel="stylesheet"type="text/css"/><link href="https://admin.down.swap.wang/assets/css/custom.css"rel="stylesheet"type="text/css"/><script src="https://admin.down.swap.wang/assets/plugins/3d-bold-navigation/js/modernizr.js"></script><link href="https://admin.down.swap.wang/assets/plugins/toastr/toastr.min.css"rel="stylesheet"type="text/css"/>
</head>
<body class="page-login">
<main class="page-content">
<div >
<header class="mdui-appbar mdui-appbar-fixed">
<div class="mdui-toolbar mdui-color-pink">
<p class="mdui-typo-headline"><i class="mdui-icon material-icons">ac_unit</i>学生考勤管理平台</p>
<div class="mdui-toolbar-spacer"></div>
</div>
</header><br><br><br/><br/>
<!--<img src="/images/ECNU.png" alt="ECNU" />-->
<div id="main-wrapper">
<div class="row">
<div class="col-md-3 center">
<div class="login-box">
<a href="https://www.ecnu.edu.cn/"class="logo-name text-lg text-center">华东师范大学</a>
<a href="http://dase.ecnu.edu.cn/"class="logo-name text-lg text-center">数据科学与工程学院</a>
<p class="text-center m-t-md">
Please login into the account.
</p>
<form class="m-t-md login" method="post">
<div class="mdui-textfield">
<i class="mdui-icon material-icons">account_circle</i>
<input type="text" name="username" class="mdui-textfield-input" placeholder="Username or Email" required>
</div>
<div class="mdui-textfield">
<i class="mdui-icon material-icons">lock_outline</i>
<input type="password" name="password" class="mdui-textfield-input" placeholder="Password" required>
</div>
<button type="submit" class="btn-block mdui-btn mdui-btn-raised mdui-ripple">Login</button>
</form>
<br><br>
<a href="https://edu.ucloud.cn/">
<div class="mdui-chip">
<span class="mdui-chip-icon mdui-color-blue"><i class="mdui-icon material-icons">cloud</i></span>
<span class="mdui-chip-title">Service provided by UCLOUD</span>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
<h2 align="center">
<font size="4" face="Times">
Using default account !<br>
&emsp;&emsp;&emsp;&emsp;&emsp;Username:root<br>
&emsp;&emsp;&emsp;&emsp;&emsp;Password:123
</font>
</h2>
<br>
<img src="/images/ECNU.png" alt="ECNU" />
<img src="/images/logonew.png" alt="DaSE" />
</main>
</body>
</html>

+ 6
- 0
html/index_2.php Bestand weergeven

@ -0,0 +1,6 @@
<?php
//跳转到控制器
header('Location: ./apps/staff_list.php');
?>

+ 48
- 0
html/views/attend_attendance.html Bestand weergeven

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>attendance</title>
<style type="text/css">
div{
width: 800px;
height: 500px;
border: outset 2px rgb(253, 253, 253);
border-radius: 1%;
margin: 20px auto;
}
</style>
</head>
<body style="background-color:rgba(233, 233, 233, 0.767)">
<h1 align="center" style="color:rgb(110, 108, 119)">学 生 考 勤 管 理 平 台</h1>
<div style="background-color:white">
<h3 align="center">签到成功!!点击右下角返回</h3>
<table align="center">
<tr>
<th>学号&#12288;</th>
<th>学生姓名&#12288;</th>
<th>学生所在院系&#12288;</th>
<th>班级&#12288;</th>
<th>考勤数&#12288;</th>
<th>考勤状态</th>
</tr>
<?php foreach($data3 as $k=>$v){?>
<tr>
<td><?=$v['id']?></td>
<td><?=$v['name']?></td>
<td><?=$v['dept']?></td>
<td><?=$v['depthead']?></td>
<td><?=$v['num']?></td>
<td><?=$v['state']?></td>
</tr>
<?php }?>
<table>
<br><br><br>
<p align="right">
<a href="../apps/staff_list.php">返回</a>
</p>
</div>
</body>
</html>

+ 49
- 0
html/views/attend_check.html Bestand weergeven

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>check</title>
<style type="text/css">
div{
width: 800px;
height: 500px;
border: outset 2px rgb(253, 253, 253);
border-radius: 1%;
margin: 20px auto;
}
</style>
</head>
<body style="background-color:rgba(233, 233, 233, 0.767)">
<br>
<h1 align="center" style="color:rgb(110, 108, 119)">学 生 考 勤 管 理 平 台</h1>
<div style="background-color:white">
<h3 align="center">请在下方选中签到学生</h3>
<form action="./attend_check_do.php" method="POST" align="right">
<table align="center">
<tr>
<th>学号&#12288;</th>
<th>学生姓名&#12288;</th>
<th>学生所在院系&#12288;</th>
<th>班级&#12288;</th>
<th>签到</th>
</tr>
<?php foreach($data as $k=>$v){?>
<tr>
<td><?=$v['jobnum']?></td>
<td><?=$v['name']?></td>
<td><?=$v['dept']?></td>
<td><?=$v['depthead']?></td>
<td>
<input type="checkbox" name="attend[]" value="<?=$v['jobnum']?>">
</td>
</tr>
<?php }?>
</table>
<input type="reset" value="重置">
<input type="submit" value="签到">
</form>
</div>
</body>
</html>

+ 47
- 0
html/views/attend_select.html Bestand weergeven

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>select</title>
<style type="text/css">
div{
width: 800px;
height: 500px;
border: outset 2px rgb(253, 253, 253);
border-radius: 1%;
margin: 20px auto;
}
</style>
</head>
<body style="background-color:rgba(233, 233, 233, 0.767)">
<h1 align="center" style="color:rgb(110, 108, 119)">学 生 考 勤 管 理 平 台</h1>
<div style="background-color:white">
<h3 align="center">请选择考勤范围(不在范围内默认通过)</h3>
<table align="center">
<tr>
<th>学号&#12288;</th>
<th>学生姓名&#12288;</th>
<th>学生所在院系&#12288;</th>
<th>班级&#12288;</th>
<th>操作</th>
</tr>
<?php foreach($data as $k=>$v){?>
<tr>
<td><?=$v['jobnum']?></td>
<td><?=$v['name']?></td>
<td><?=$v['dept']?></td>
<td><?=$v['depthead']?></td>
<td><a href="./attend_select_del.php?id=<?=$v['jobnum']?>">删除</a></td>
</tr>
<?php }?>
</table>
<br>
<br>
<br>
<p align="right">
<a href=" ../apps/attend_check.php">确认</a>
</p>
</div>
</body>
</html>

+ 36
- 0
html/views/staff_add.html Bestand weergeven

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>add</title>
<style type="text/css">
div{
width: 800px;
height: 500px;
border: outset 2px rgb(253, 253, 253);
border-radius: 1%;
margin: 20px auto;
}
</style>
</head>
<body style="background-color:rgba(233, 233, 233, 0.767)">
<br>
<h1 align="center" style="color:rgb(110, 108, 119)">学 生 考 勤 管 理 平 台</h1>
<div style="background-color:white">
<h3 align="center">请在下方添加学生信息</h3>
<br>
<form action="./staff_add.php" method="POST" align="center">
<p>学号:<input type="text" name="jobnum" value=""></p>
<p>姓名:<input type="text" name="name" value=""></p>
<p>院系:<input type="text" name="dept" value=""></p>
<p>班级:<input type="text" name="depthead" value=""></p>
<p>
<input type="submit" value="提交">
<input type="reset" value="重置">
<input type="button" value="返回" onclick="window.location='./staff_list.php'">
</p>
</form>
</div>
</body>
</html>

+ 51
- 0
html/views/staff_list.html Bestand weergeven

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>list</title>
<style type="text/css">
div{
width: 800px;
height: 500px;
border: outset 2px rgb(253, 253, 253);
border-radius: 1%;
margin: 20px auto;
}
</style>
</head>
<body style="background-color:rgba(233, 233, 233, 0.767)">
<br>
<h1 align="center" style="color:rgb(110, 108, 119)">学 生 考 勤 管 理 平 台</h1>
<div style="background-color:white">
<h3 align="center">学生名单</h3>
<table align="center">
<tr>
<th>学号&#12288;</th>
<th>学生姓名&#12288;</th>
<th>学生所在院系&#12288;</th>
<th>班级&#12288;</th>
<th>操作</th>
</tr>
<?php foreach($data as $k=>$v){?>
<tr>
<td><?=$v['jobnum']?></td>
<td><?=$v['name']?></td>
<td><?=$v['dept']?></td>
<td><?=$v['depthead']?></td>
<td>
<a href="./staff_update.php?id=<?=$v['jobnum']?>">修改</a>
<a href="./staff_del.php?id=<?=$v['jobnum']?>">删除</a>
</td>
</tr>
<?php }?>
</table>
<br><br><br><br><br><br><br><br><br>
<p align="right">
<a href="../apps/staff_add.php">添加学生</a>
<br><br><br>
<a href="../apps/attend_select_index.php">签到</a>
</p>
</div>
</body>
</html>

+ 35
- 0
html/views/staff_update.html Bestand weergeven

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>update</title>
<style type="text/css">
div{
width: 800px;
height: 500px;
border: outset 2px rgb(253, 253, 253);
border-radius: 1%;
margin: 20px auto;
}
</style>
</head>
<body style="background-color:rgba(233, 233, 233, 0.767)">
<br>
<h1 align="center" style="color:rgb(110, 108, 119)">学 生 考 勤 管 理 平 台</h1>
<div style="background-color:white">
<h3 align="center">请在下方更改学生信息</h3>
<br>
<form action="./staff_update.php?id=<?=$arr['jobnum']?>" method="POST" align="center">
<p>学号:<input type="text" name="jobnum" value="<?=$arr['jobnum']?>"></p>
<p>姓名:<input type="text" name="name" value="<?=$arr['name']?>"></p>
<p>院系:<input type="text" name="dept" value="<?=$arr['dept']?>"></p>
<p>班级:<input type="text" name="depthead" value="<?=$arr['depthead']?>"></p>
<p>
<input type="submit" value="更新">
<input type="button" value="返回" onclick="window.location='./staff_list.php'">
</p>
</form>
</div>
</body>
</html>

Laden…
Annuleren
Opslaan