PHP课程设计报告材料4Word下载.docx
- 文档编号:18579846
- 上传时间:2022-12-28
- 格式:DOCX
- 页数:30
- 大小:644.31KB
PHP课程设计报告材料4Word下载.docx
《PHP课程设计报告材料4Word下载.docx》由会员分享,可在线阅读,更多相关《PHP课程设计报告材料4Word下载.docx(30页珍藏版)》请在冰豆网上搜索。
所以,本系统在经济上是可行的。
1.2.2技术可行性
本系统的开发利用MySQL作为本系统的数据库,它是一个支持多用户的新型数据库,适用于大中规模的数据量需求。
学校校园网的建设也为新系统服务器/客户端的结构提供了硬件的支持。
使用wamp与navicat作为系统开发的开发环境,它提供完善的指令控制语句、类与对象的支持及丰富的数据类型,给开发高性能系统提供的保障为开发满足客户要求的系统,保证了代码的模块化要求,而代码模块化的提高,非常有利于以后对新系统的扩展与修改。
1.2.3操作可行性
本系统为一个小型的学生信息管理系统,所耗费的资源非常的小,学校的电脑无论是硬件还是软件都能够满足条件,界面设计时充分考虑管理人员的习惯,使得操作简单;
数据录入迅速、规范、可靠;
统计准确;
制表灵活;
适应力强;
容易扩充,因此,本系统在操作上是可行的
2.数据库逻辑结构设计
2.2.1数据库E-R图
2.2.2数据库关系模式:
Administrator(AdminID,AdminName,AdminPassword);
ClassInfo(Class,Major,department)
CourseInfo(CourseNumber,CourseName,Grade);
StudentCourse(StudentID,CourseNumber,Marks);
StudentInfo(StudentID,StudentName,Class,StudentPassword);
TeacherInfo(TeacherID,TeacherName,TeacherPassword);
TeachingInfo(CourseNumber,TeacherID);
数据库名称:
management
拥有的表:
administrator;
Classinfo;
Courseinfo;
StudentCourse;
Studentinfo;
Teacherinfo;
Teachinginfo;
各个表的属性及数据:
Administrator(AdminIDchar(20)primarykey,,AdminNamechar(20),AdminPasswordchar(20));
包含:
管理员编号AdminID、管理员姓名AdminName、管理员密码AdminPassword
Classinfo(Classchar(20)primarykey,
Majorchar(20),departmentchar(20));
班级号Class、专业Major、学院department
Courseinfo(CourseNumberchar(20)primarykey,CourseNamechar(20),Gradeint);
课程编号CourseNumber、课程姓名CourseName、学分Grade
StudentCourse(StudentIDchar(20),CourseNumberchar(20),Marksint);
学号StudentID、课程编号CourseNumber、得分Marks
Studentinfo(StudentIDchar(20)primarykey,StudentNamechar(20),Classchar(20),
StudentPasswordChar(20));
学号StudentID、学生姓名StudentName、班级号Class、学生密码StudentPassword
Teacherinfo(TeacherIDchar(20)primarykey,TeacherNamechar(20),
TeacherPasswordchar(20));
教师编号TeacherID、教师姓名TeacherName、教师密码TeacherPassword
Teachinginfo(CourseNumberchar(20)primarykey,TeacherIDchar(20));
课程编号CourseNumber、教师编号TeacherID
3.软件结构设计
3.1开发环境
基于windows7操作系统,数据库系统使用Mysql,服务器搭建使用Apache,Web编写使用PHP。
3.2系统功能结构
3.3系统结构-模块划分
3.3.1登陆模块
系统使用人员登陆系统,输入ID号密码,选择身份。
之后根据身份,查询系统数据库,判断该ID是否存在,密码是否正确,确认无误之后继续进行之后的功能。
实现程序段(login.php与login_check.php):
login.php
<
?
php
session_start();
$_SESSION['
firstlogin'
]=1;
>
head>
metahttp-equiv="
Content-Type"
content="
text/html;
charset=gbk"
/>
<
title>
学生管理信息系统<
/title>
style>
*{
padding:
0px;
margin:
}
a{color:
White}
body{
font-family:
Arial,Helvetica,sans-serif;
background:
url('
images/grass.jpg'
)no-repeatcenter;
font-size:
13px;
img{
border:
0;
.lg{width:
468px;
height:
100pxauto;
images/login_bg.png'
)no-repeat;
align:
center;
}
.lg_top{height:
200px;
width:
.lg_main{width:
400px;
180px;
025px;
align="
center"
;
.lg_m_1{
290px;
100px;
60px55px20px55px;
0pxauto;
.ur{
37px;
color:
#666;
236px;
4px28px;
images/user.png'
padding-left:
10px;
16pt;
.pw{
images/password.png'
.lg_foot{
80px;
330px;
6px68px068px;
align="
/style>
/head>
bodyclass="
b"
divclass="
lg"
lg_top"
/div>
lg_main"
lg_m_1"
formmethod="
post"
action="
login_check.php"
inputtype="
text"
name='
user_name'
class="
ur"
/>
password"
user_pass'
pw"
pstyle="
text-align:
center"
fontsize='
3'
face='
楷体'
strong>
请选择身份<
/strong>
/font>
:
br/>
/p>
bodystyle="
center;
"
selectname="
shenfen"
size="
1"
style="
optionvalue="
学生<
/option>
2"
教师<
3"
管理员<
/select>
inputname="
submit1"
type="
submit"
value="
登录"
/form>
login.php"
submitO"
重置"
/body>
/html>
Login_check.php
if($_SESSION['
]){
username'
]=$_POST['
];
password'
shenfen'
]=false;
$shenfen=$_SESSION['
$user_name=$_SESSION['
$user_pass=$_SESSION['
html>
登陆成功!
styletype="
text/css"
body{
background-image:
url(images/banner.jpg);
background-repeat:
repeat;
body>
$db=mysql_connect('
127.0.0.1:
3306'
'
root'
'
)ordie("
连接失败"
);
mysql_select_db('
management'
$db)ordie(mysql_error($db));
if($shenfen['
]==1)
{
$query="
SELECT
StudentID,StudentName,studentinfo.Class,Major,department
from
studentinfo,ClassInfo
where
StudentID='
$user_name'
ANDStudentPassword='
$user_pass'
ANDstudentinfo.Class=ClassInfo.Class;
mysql_query("
setnames'
gbk'
mysql_query("
SETCHARACTERSETgbk"
$result=mysql_query($query,$db)ordie("
ERROR"
if(mysql_numrows($result)==0){
echo"
用户名或密码错误!
.'
ahref='
login.php'
重新登录"
/a>
}
else{
>
palign='
right'
注销<
password_change.php'
修改密码<
."
course_select.php'
palign=right>
修改选课信息<
//showtheresults
echo'
tableborder="
0"
align=center>
td>
用户信息:
/td>
$row=array('
学号'
姓名'
班级'
专业'
学院'
echo'
tr>
foreach($rowas$value){
echo'
.$value.'
}
while($row=mysql_fetch_assoc($result)){
/tr>
}
/table>
//extract($row);
//echo$StudentID.'
-'
.$StudentName.'
.$class.'
.$StudentPassword.'
/br>
$query="
SELECT
studentcourse.CourseNumber,CourseName,Grade,Marks
from
studentcourse,CourseInfo
where
StudentID='
andstudentcourse.CourseNumber=CourseInfo.CourseNumber"
$result=mysql_query($query,$db)ordie("
未知错误!
选课信息:
课程编号'
课程名'
学分'
分数'
]==2)
//检查username是否存在
//检差password是否存在
//显示老师个人信息,获得任课科目
SELECTTeacherID,TeacherNamefromTeacherinfowhereTeacherID='
ANDTeacherPassword='
Theuserdoesn'
texistorpassword"
palign='
修改密码<
教师信息:
教师编号'
Teachinginfo.CourseNumber,CourseName
Teachinginfo,CourseInfo
TeacherID='
andTeachinginfo.CourseNumber=CourseInfo.CourseNumber"
Unexpectederror(mark)!
palign=center>
课程:
while(mysql_num_rows($result)!
=0&
&
$row=mysql_fetch_assoc($result)){
extract($row);
echo"
scole.php?
course=$CourseNumber'
echo"
$CourseName<
]==3)
//检查password是否正确
SELECTAdminID,AdminNamefromadministratorwhereAdminID='
ANDAdminPassword='
mysql_query("
tableb
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- PHP 课程设计 报告 材料
![提示](https://static.bdocx.com/images/bang_tan.gif)