基于phpmysql学生选课信息系统毕业论文(编辑修改稿)内容摘要:

ession varchar(30) 非空 /缺省 39。 39。 专业班级 academy varchar(30) 非空 /缺省 39。 39。 所属学院 is_del int(1) 无符号 /非空 /缺省 1 用户状态 课程表,表名 course,课程表对应的是课程实体,主要保存课程的基本信息。 用于学生和教师浏览课程信息。 表 课程数据表结构 列名 数据类型 属性 约束条件 说明 id int(10) 无符号 /非空 /自增长 主键 课程 ID code char(8) 非空 /缺省 39。 39。 课程编号 name varchar(30) 非空 /缺省 39。 39。 课程名称 teacher varchar(30) 非空 /缺省 39。 39。 任课教师 class_place varchar(30) 非空 /缺省 39。 39。 上课地点 class_time varchar(30) 非空 /缺省 39。 39。 上课时间 limit int(3) 非空 /缺省 0 人数限制 score tinyint(1) 非空 /缺省 1 学分 week_time int(2) 非空 /缺省 1 周学时 total_time int(2) 非空 总学时 introduce text 课程简介 is_del int(1) 无符号 /非空 /缺省 1 课程状态 课程对应的选课学生表,表名 course_stu,该表主要保存选择某个课程的学生,通过该表可以快速的知道某一门课程都有哪些学生选择。 表 课程对应的选课学生数据表结构 列名 数据类型 属性 约束条件 说明 id int(10) 无符号 /非空 /自增长 主键 记录编号 cid int(10) 非空 课程编 号 uid int(10) 非空 /缺省 学生学号 5 系统实现 登录界面 系统的教师和学生两个模块共用一个登陆页面。 输入账户名跟密码,不同的用户选择不同的身陕西理工学院毕业设计 第 10 页 共 60 页 份,验证身份登陆之后分别跳转到不同的界面。 登录界面如图 图 登录界面 登录部分实现的代码如下 : !DOCTYPE HTML PUBLIC //W3C//DTD HTML Transitional//EN ! saved from url=(0064) !DOCTYPE html PUBLIC //W3C//DTD XHTML Transitional//EN xmlns= content=IE= equiv=XUACompatible META equiv=ContentType content=text/html。 charset=utf8 TITLE登录页面 /TITLE SCRIPT type=text/javascript $(function(){ //得到焦点 $(password).focus(function(){ $(left_hand).animate({ left: 150, 陕西理工学院毕业设计 第 11 页 共 60 页 top: 38 },{step: function(){ if(parseInt($(left_hand).css(left))140){ $(left_hand).attr(class,left_hand)。 } }}, 2020)。 $(right_hand).animate({ right: 64, top: 38px },{step: function(){ if(parseInt($(right_hand).css(right)) 70){ $(right_hand).attr(class,right_hand)。 } }}, 2020)。 })。 //失去焦点 $(password).blur(function(){ $(left_hand).attr(class,initial_left_hand)。 $(left_hand).attr(style,left:100px。 top:12px。 )。 $(right_hand).attr(class,initial_right_hand)。 $(right_hand).attr(style,right:112px。 top:12px)。 })。 })。 /SCRIPT META name=GENERATOR content=MSHTML /HEAD BODY DIV class=top_div/DIV DIV style=background: rgb(255, 255, 255)。 margin: 100px auto auto。 border: 1px solid rgb(231, 231, 231)。 borderimage: none。 width: 400px。 height: 200px。 textalign: center。 DIV style=width: 165px。 height: 96px。 position: absolute。 陕西理工学院毕业设计 第 12 页 共 60 页 DIV class=tou/DIV DIV class=initial_left_hand id=left_hand/DIV DIV class=initial_right_hand id=right_hand/DIV /DIV form action=__MODULE__/Index/dealLogin method=post P style=padding: 30px 0px 10px。 position: relative。 SPAN class=u_logo/SPAN INPUT class=ipt type=text name=login_name placeholder=请输入学号或教师编号 /P P style=position: relative。 SPAN class=p_logo/SPAN INPUT class=ipt id=password type=password name=pwd placeholder=请输入密码 /P p style=padding: 10px 0px 10px 35px。 position: relative。 textalign:left。 span style=fontsize:15px。 身份类型 /span input type=radio name=39。 type39。 value=1 checked/学生 input type=radio name=39。 type39。 value=2 /教师 /p P style=margin: 0px 35px 20px 45px。 button style=background: rgb(0, 142, 173)。 padding: 7px 10px。 borderradius: 4px。 border: 1px solid rgb(26, 117, 152)。 borderimage: none。 color: rgb(255, 255, 255)。 fontweight: bold。 登录 /button input type=39。 reset39。 value=39。 取消 39。 style=background:9E9E9E。 padding: 7px 10px。 borderradius: 4px。 border: 1px solid rgb(26, 117, 152)。 borderimage: none。 color: rgb(255, 255, 255)。 fontweight: bold。 / /P /form ! DIV style=height: 50px。 lineheight: 50px。 margintop: 30px。 bordertopcolor: rgb(231, 231, 231)。 bordertopwidth: 1px。 bordertopstyle: solid。 陕西理工学院毕业设计 第 13 页 共 60 页 /DIV /DIV div style=textalign:center。 /div /BODY /HTML 处理层代码: public function dealLogin(){ $table = M(39。 users39。 )。 $data[39。 login_name39。 ] = I(39。 login_name39。 )。 $data[39。 pwd39。 ] = md5(I(39。 pwd39。 ))。 $type = I(39。 type39。 )。 // 判断用户身份, 1 表示学生, 2 表示教师 if($type == 1){ $user = $table join(students on uid=) field(39。 name,uid,type39。 ) where($data) find()。 }else{ $user = $table join(teachers on uid=) field(39。 name,uid,type39。 ) where($data) find()。 } if($user){ session_start()。 $_SESSION[39。 userdata39。 ][39。 username39。 ] = $user[39。 name39。 ]。 $_SESSION[39。 userdata39。 ][39。 userid39。 ] = $user[39。 uid39。 ]。 $_SESSION[39。 userdata39。 ][39。 usertype39。 ] = $user[39。 type39。 ]。 $thisredirect(39。 Index/index39。 )。 }else{ $this display(T(39。 Index/login39。 ))。 } 陕西理工学院毕业设计 第 14 页 共 60 页 } 管理员模块界面 管理员以管理员身份进入系统之后, 可在后台进行教师信息、课程信息、学生信息的编辑、添加,及修改。 以上各个页面的实现效果如图 : 图 后台编辑教师信息页面 管理员编辑教师页面实现的代码如下: extend name=Index/index / ! 面包屑导航 block name=39。 bread39。 lia href=39。 __CONTROLLER__/index39。 教师列表 /a/li lia href=39。 39。 修改教师信息 /a/li /block ! 面包屑导航结束 ! 页面右边主体内容 block name=39。 main39。 div id=main class=containerfluid style=margintop:0px div class=row div class=colxs12 colsm12 div class=box div class=boxheader div class=boxname i class=fa fausermd/i span修改教师信息 /span 陕西理工学院毕业设计 第 15 页 共 60 页 /div div class=boxicons a class=collapselink i class=fa fachevronup/i /a a class=expandlink i class=fa fa。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。