加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
doctor_doctor.php 4.15 KB
一键复制 编辑 原始数据 按行查看 历史
wenxin lai 提交于 2022-05-30 07:09 . update doctor_doctor.php.
<?php
session_start();
if (!isset($_SESSION['username']) or !isset($_SESSION['identity']) or $_SESSION['identity'] != 1) {
header("Location:login.php");
exit();
}
$db = @mysqli_connect("localhost", "root", "123456", "MIS");
if (!$db) {
die("Fail to connect the database!!" . mysqli_connect_error());
}
mysqli_query($db, "begin");
mysqli_query($db, "set names utf8");
$username = $_SESSION['username'];
$doctor_info = mysqli_fetch_array(mysqli_query($db, "SELECT Dno, Dname, Department, Dtitle FROM Doctor WHERE Dno='$username'"));
if ($doctor_info['Dname'] == "") {
$name = "医生";
} else {
$name = $doctor_info['Dname'];
}
mysqli_query($db, "commit");
mysqli_close($db);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./style/teacher/teacher_teacher.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css">
<script type="text/javascript" src="./style/teacher/doctor.js"></script>
<title>武汉大学挂号系统</title>
</head>
<body>
<div class="container" >
<table class="identity">
<tr>
<td rowspan="2">
<img class="icon" src="./style/teacher/teacher.png">
</td>
<td class="identity_text"><?php echo $name; ?></td>
</tr>
</table>
<div onclick="choose('logout')">
<i id="logout" class="fas fa-sign-out-alt"></i>
</div>
<div class="teacher">
<div class="option" onclick="choose('doctor')">
<i id="teacher" class="fas fa-user"></i>
<div class="option_text">个人信息</div>
</div>
<div class="option" onclick="choose('pre')">
<i id="course" class="fas fa-book-open"></i>
<div class="option_text">就诊处方</div>
</div>
<div class="option" onclick="choose('drug')">
<i id="course" class="fas fa-book-open"></i>
<div class="option_text">药品</div>
</div>
</div>
<form action="private.php" method="POST">
<h1 class="title">个人信息</h1>
<div class="info_box">
<table>
<tbody>
<tr>
<td>工 号</td>
<td><?php echo $doctor_info['Dno']; ?></td>
</tr>
<tr>
<td>姓 名</td>
<td><input type="text" name="name" value="<?php echo $doctor_info['Dname']; ?>"></td>
</tr>
<tr>
<td>部 门</td>
<td><input type="text" name="Department" value="<?php echo $doctor_info['Department']; ?>"></td>
</tr>
<tr>
<td>职 位</td>
<td><input type="text" name="Dtitle" value="<?php echo $doctor_info['Dtitle']; ?>"></td>
</tr>
</tbody>
</table>
<button>保存</button>
</div>
</form>
<form action="password.php" method="POST">
<div class="pwd_box">
<table>
<tbody>
<tr>
<td>旧密码</td>
<td><input type="password" name="old_pwd"></td>
</tr>
<tr>
<td>新密码</td>
<td><input type="password" name="new_pwd"></td>
</tr>
<tr>
<td>密码确认</td>
<td><input type="password" name="pwd_confirm"></td>
</tr>
</tbody>
</table>
<button>修改</button>
</div>
</form>
</div>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化