代码拉取完成,页面将自动刷新
<!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/Admin.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/header2.css" />
<!-- <link rel="stylesheet" type="text/css" href="css/footer.css" />-->
<style type="text/css">
</style>
</head>
<body>
<?php
//管理员权限检测
if(!isset($_COOKIE['gm']))
{
echo"非管理员不得操作!";
//没有读取到管理权限
exit();
}
$gm=$_COOKIE['gm'];
if($gm<=0)
{
echo"非管理员不得操作!";
//管理权限不足
exit();
}
include("header2.php");
include_once ("./conn.php");
?>
<section class="secright" >
<div class="table-title">
<h3>学生管理</h3>
<hr/>
<!-- <div class="newbutton">-->
<!-- <a href="Adminnew.php?kind=addnewmajor"><button>+ 添加新的学生</button></a>-->
<!-- </div>-->
</div>
<table class="table-fill">
<thead>
<tr>
<th class="text-left">账号/学籍号</th>
<th class="text-left">学生名</th>
<th class="text-left">专业</th>
<th class="text-left">性别</th>
<th class="text-left">年级</th>
<th class="text-left">编辑</th>
</tr>
</thead>
<tbody class="table-hover">
<?php
$gender=array("男","女");
//查询专业
$sql="select * from accounts as a,major as m where a.majorid=m.majorid order by a.username asc";
//执行sql命令
$result=mysqli_query($link,$sql);
while ($row=mysqli_fetch_assoc($result))
{
?>
<tr>
<td class="text-left"><?=$row['username']?></td>
<td class="text-left"><?=$row['realname']?></td>
<td class="text-left"><?=$row['majorname']?></td>
<td class="text-left"><?=$gender[$row['gender']]?></td>
<td class="text-left"><?=$row['enteryear']?></td>
<td class="text-left"><a id="<?=$row['username']?>" class="editstudent">编辑</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</section>
<script src="js/Adminmajor.js" type="text/javascript"></script>
<?php
$link->close();
?>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。