Ai
4 Star 0 Fork 0

softwareengineering1/software

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
PInformation.php 9.14 KB
一键复制 编辑 原始数据 按行查看 历史
softwareengineering1 提交于 2021-05-30 19:41 +08:00 . contents of comment
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>个人信息</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/PIformation.css" />
<script src="js/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/header.css" />
<link rel="stylesheet" type="text/css" href="css/footer.css" />
<style type="text/css">
.sec01,.sec03,.sec04{
/*font-family: 'Open Sans', sans-serif;*/
margin: 0 auto;
width: 1000px;
top: 80px;
padding-top: 1em;
}
.sec01 h1
{
font-size: 30px;
color: #7f8c8d;
top: 100px;
}
.sec02{
top: 65px;
width: 1000px;
margin:0px auto;
height: 40px;
position: relative;
}
.sec02 .sec00-d{
float: left;
width: 10%;
margin-top: 6px;
margin-left: 40px;
}
.sec02 .sec00-d a{
width: 100%;
height: 100%;
text-decoration: none;
color: #7f8c8d;
font-size: 25px;
}
.sec02 .sec00-d a:hover{
color: #3498db;
}
.sec02 .hover001 a{
color: #3498db;
font-weight: bold;
}
.sec02{
position: relative;
}
.sec03 table{
width: 800px;
margin: 0px auto;
font-size: 20px;
color: #7f8c8d;
border-collapse: separate;
border-spacing: 30px;
}
.sec03 tr td:first-child{
padding-right: 20px;
text-align: right;
width: 175px;
}
.sec03 button{
width: 150px;
height: 30px;
background-color: white;
border: solid black 1px;
text-decoration: none;
border-radius: 3px;
}
.sec03 button:hover{
background-color: #ecf0f1;
text-shadow: 0 0 4px gray;
transition: 0.4s;
}
/* 谷歌 去除type=number的input的加减按钮*/
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
appearance: none;
margin: 0;
}
/* 火狐 去除type=number的input的加减按钮*/
input{
-moz-appearance:textfield;
}
.sec03 input{
border-bottom: solid 1px #7f8c8d;
color: #7f8c8d;
width: 300px;
padding-left: 20px;
}
.sec04 table{
width: 800px;
margin: 0px auto;
font-size: 20px;
color: #7f8c8d;
border-collapse: separate;
border-spacing: 30px;
text-align: center;
}
.sec04 img{
width: 88px;
height: 76px;
}
.sec04 button{
width: 80px;
height: 30px;
background-color: white;
border: solid black 1px;
text-decoration: none;
border-radius: 3px;
}
.sec04 button:hover{
background-color: #ecf0f1;
text-shadow: 0 0 4px gray;
transition: 0.4s;
}
.sec04{
min-height: 300px;
}
.sec01{
position: relative;
}
.sec01 a{
position: absolute;
top: 0px;
left: 700px;
font-size: 25px;
color: #7f8c8d;
text-decoration: none;
}
.sec01 a:hover{
color: #3498db;
}
</style>
</head>
<body>
<?php
include ('functions.php');
if(!isset($_COOKIE['username']))
{
//没有登录就跳转登录界面
alertjump(1,"请先登录账户!","Login.php");
}
$username=$_COOKIE['username'];
include("header.php");
include_once ("./conn.php");
if(isset($_GET['kind']))
{
$kind=$_GET['kind'];
}else{
$kind=0;
}
?>
<section class="sec01">
<h1 style="margin-top: 20px;">我的信息</h1>
<?php if($_COOKIE['gm']>0)
{
?>
<a style="margin-top: 30px;" href="Admin.php" target="_blank">[ 教秘管理员入口 ]</a>
<?php
}
?>
<hr/>
</section>
<section class="sec02">
<section class="sec00">
<div class="sec00-d<?php if ($kind==0)echo " hover001";?>"><a href='PInformation.php?kind=0'>个人资料</a></div>
<div class="sec00-d<?php if ($kind==1)echo " hover001";?>"><a href='PInformation.php?kind=1'>已选课程</a></div>
<!-- <div class="sec00-d--><?php //if ($kind==2)echo " hover001";?><!--"><a href='PInformation.php?kind=2'>通识选修</a></div>-->
<!-- <div class="sec00-d--><?php //if ($kind==3)echo " hover001";?><!--"><a href='PInformation.php?kind=3'>技能选修</a></div>-->
</section>
</section>
<?php
if($kind==0) {
$result = $link->query("SELECT *
FROM accounts as a,major as m
where a.username='$username' and a.majorid=m.majorid"
);
$gender=array("男","女");
if(!$result)
{
echo "数据库出错";
}else{
$row=mysqli_fetch_assoc($result);
date_default_timezone_set("PRC");//消除时差
$birthday=date("Y-m-d",(int)$row['birthday']);
}
?>
<section class="sec03">
<!-- 个人信息界面-->
<hr/>
<table>
<tr>
<td>就读专业:</td>
<td><?php echo $row['majorname']; ?></td>
</tr>
<tr>
<td>入学年份:</td>
<td><?php echo $row['enteryear']; ?></td>
</tr>
<tr>
<td>性别:</td>
<td><input type="text" id="gender" name="gender" value="<?php echo $gender[$row['gender']]; ?>"></td>
</tr>
<tr>
<td>真实姓名:</td>
<td><input type="text" id="realname" name="realname" value="<?php echo $row['realname']; ?>"></td>
</tr>
<tr>
<td>邮箱:</td>
<td><input type="email" id="email" name="email" value="<?php echo $row['email']; ?>"></td>
</tr>
<tr>
<td>出生日期:</td>
<td><input type="date" id="birthday" name="birthday" value="<?php echo $birthday; ?>"</td>
</tr>
<tr>
<td>身份证号:</td>
<td><input type="text" id="identity" name="identity" value="<?php echo $row['identity']; ?>"></td>
</tr>
<tr>
<td>现住址:</td>
<td><input type="text" id="address" name="address" value="<?php echo $row['address']; ?>"></td>
</tr>
<tr>
<td>手机号码:</td>
<td><input type="number" id="tel" name="tel" value="<?php echo $row['tel']; ?>"></td>
</tr>
<tr>
<td><a class="loginout" href="Loginout.php">
<button>退出登录</button>
</a></td>
<td><a class="savepms">
<button>保存修改</button>
</a></td>
</tr>
</table>
</section>
<?php
} else if($kind==1) {
?>
<section class="sec04">
<!-- 选课信息界面-->
<hr/>
<table>
<tr><th>封面图</th><th>课程名</th><th>课程学分</th><th>选修类别</th><th>查看</th><th>退课</th></tr>
<?php
$username=$_COOKIE['username'];
$result = $link->query("SELECT *
FROM sc,course as c,introduce as i
where sc.username='$username' and sc.courseid=c.courseid and c.introduceid=i.introduceid"
);
$kindname=array("null","必修","通识","技能");
if(!$result)
{
echo "数据库出错";
}else{
while($row=mysqli_fetch_assoc($result))
{
echo "<tr><td><img src=\"courselib/pic/{$row['picnameinfile']}\"></td><td>{$row['coursename']}</td><td>{$row['credit']}</td><td>{$kindname[$row['kind']]}</td><td><a class='looikintroduce' target='_blank' href='Courseintroduce.php?courseid={$row['courseid']}&src={$row['introduceid']}'><button>详情</button></a></td><td><a id='{$row['courseid']}' class='dropcourse'><button>退课</button></a></td></tr>
";
}
}
?>
<!-- <tr><td><img src="#"></td><td>《大学英语必修I》</td><td>3</td><td>必修</td><td><a><button>详情</button></a></td><td><a><button>退课</button></a></td></tr>-->
</table>
</section>
<?php
}
?>
<script src="js/PInformation.js" type="text/javascript"></script>
<?php
$link->close();
//关闭数据库连接
include ("footer.html");
?>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/softwareengineering1/software.git
git@gitee.com:softwareengineering1/software.git
softwareengineering1
software
software
master

搜索帮助