+ +
+ Please login into the account. +
+ ++ +
+
+ Using default account !
+ Username:root
+ Password:123
+
+
++ + + +
diff --git a/SaaS screenshot/add.png b/SaaS screenshot/add.png new file mode 100644 index 0000000..e33346f Binary files /dev/null and b/SaaS screenshot/add.png differ diff --git a/SaaS screenshot/attend.png b/SaaS screenshot/attend.png new file mode 100644 index 0000000..c4159cf Binary files /dev/null and b/SaaS screenshot/attend.png differ diff --git a/SaaS screenshot/check.png b/SaaS screenshot/check.png new file mode 100644 index 0000000..d434550 Binary files /dev/null and b/SaaS screenshot/check.png differ diff --git a/SaaS screenshot/list.png b/SaaS screenshot/list.png new file mode 100644 index 0000000..8c0cdd0 Binary files /dev/null and b/SaaS screenshot/list.png differ diff --git a/SaaS screenshot/login.png b/SaaS screenshot/login.png new file mode 100644 index 0000000..96569d0 Binary files /dev/null and b/SaaS screenshot/login.png differ diff --git a/SaaS screenshot/select.png b/SaaS screenshot/select.png new file mode 100644 index 0000000..bd19ea6 Binary files /dev/null and b/SaaS screenshot/select.png differ diff --git a/SaaS screenshot/update.png b/SaaS screenshot/update.png new file mode 100644 index 0000000..ce35610 Binary files /dev/null and b/SaaS screenshot/update.png differ diff --git a/html/apps/attend_attendance.php b/html/apps/attend_attendance.php new file mode 100644 index 0000000..e70633f --- /dev/null +++ b/html/apps/attend_attendance.php @@ -0,0 +1,64 @@ +"; + + +/*************************** + * 获取所选名单考勤结果 + * *************************/ +$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"); + +?> diff --git a/html/apps/attend_check.php b/html/apps/attend_check.php new file mode 100644 index 0000000..edc36bf --- /dev/null +++ b/html/apps/attend_check.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/html/apps/attend_check_do.php b/html/apps/attend_check_do.php new file mode 100644 index 0000000..f31af00 --- /dev/null +++ b/html/apps/attend_check_do.php @@ -0,0 +1,71 @@ +=5"); + + +// 跳转到查看考勤结果 +echo ""; + +?> diff --git a/html/apps/attend_select.php b/html/apps/attend_select.php new file mode 100644 index 0000000..4aac3ce --- /dev/null +++ b/html/apps/attend_select.php @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/html/apps/attend_select_del.php b/html/apps/attend_select_del.php new file mode 100644 index 0000000..62deb1c --- /dev/null +++ b/html/apps/attend_select_del.php @@ -0,0 +1,26 @@ +window.location='./attend_select.php'"; +}else{ + die("连接错误:".mysqli_connect_error()); +} + +?> \ No newline at end of file diff --git a/html/apps/attend_select_index.php b/html/apps/attend_select_index.php new file mode 100644 index 0000000..d1fa5b4 --- /dev/null +++ b/html/apps/attend_select_index.php @@ -0,0 +1,29 @@ + diff --git a/html/apps/conn.php b/html/apps/conn.php new file mode 100644 index 0000000..3bc8170 --- /dev/null +++ b/html/apps/conn.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/html/apps/staff_add.php b/html/apps/staff_add.php new file mode 100644 index 0000000..af167cc --- /dev/null +++ b/html/apps/staff_add.php @@ -0,0 +1,27 @@ +window.location='./staff_list.php'"; + }else{ + die("连接错误:".mysqli_connect_error()); + } +} + +?> \ No newline at end of file diff --git a/html/apps/staff_del.php b/html/apps/staff_del.php new file mode 100644 index 0000000..1feb41b --- /dev/null +++ b/html/apps/staff_del.php @@ -0,0 +1,20 @@ +window.location='./staff_list.php'"; +}else{ + die("连接错误:".mysqli_connect_error()); +} + +?> \ No newline at end of file diff --git a/html/apps/staff_list.php b/html/apps/staff_list.php new file mode 100644 index 0000000..718df47 --- /dev/null +++ b/html/apps/staff_list.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/html/apps/staff_update.php b/html/apps/staff_update.php new file mode 100644 index 0000000..aa1fbfc --- /dev/null +++ b/html/apps/staff_update.php @@ -0,0 +1,30 @@ +window.location='./staff_list.php'"; + }else{ + die("连接错误:".mysqli_connect_error()); + } +} +?> \ No newline at end of file diff --git a/html/attendance.sql b/html/attendance.sql new file mode 100644 index 0000000..50ddaae --- /dev/null +++ b/html/attendance.sql @@ -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 ; diff --git a/html/images/ECNU.png b/html/images/ECNU.png new file mode 100644 index 0000000..fd9eafa Binary files /dev/null and b/html/images/ECNU.png differ diff --git a/html/images/logonew.png b/html/images/logonew.png new file mode 100644 index 0000000..96bb89a Binary files /dev/null and b/html/images/logonew.png differ diff --git a/html/index.php b/html/index.php new file mode 100644 index 0000000..8e5e537 --- /dev/null +++ b/html/index.php @@ -0,0 +1,111 @@ + + + +
++ Please login into the account. +
+ +学号 | +学生姓名 | +学生所在院系 | +班级 | +考勤数 | +考勤状态 | +
---|---|---|---|---|---|
=$v['id']?> | +=$v['name']?> | +=$v['dept']?> | +=$v['depthead']?> | +=$v['num']?> | +=$v['state']?> | +
学号 | +学生姓名 | +学生所在院系 | +班级 | +操作 | +
---|---|---|---|---|
=$v['jobnum']?> | +=$v['name']?> | +=$v['dept']?> | +=$v['depthead']?> | +删除 | +
+ 确认 +
+学号 | +学生姓名 | +学生所在院系 | +班级 | +操作 | +
---|---|---|---|---|
=$v['jobnum']?> | +=$v['name']?> | +=$v['dept']?> | +=$v['depthead']?> | ++ 修改 + 删除 + | +