📄 dct_index.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@page pageEncoding="gb2312"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>我的主页</title>
</head>
<script language="JavaScript">
function check_schedule()
{
fr = document.form_schedule;
if( (fr.weekdate.value == ""))
{
alert("请不要进行空搜索");
fr.weekdate.focus();
return;
}
fr.submit();
}
function check_resv()
{
fr = document.form_resv;
if( (fr.weekdate.value == ""))
{
alert("请不要进行空搜索");
fr.weekdate.focus();
return;
}
fr.submit();
}
</script>
<body>
<%
String DctNo=(String)session.getValue("DctNo");
if(DctNo==null||DctNo=="")
{%>
<div align="center"><p>对不起,您还没有登陆 </p></div>
<div align="center"><p><a href="dct_log_default.jsp">返回登陆页 </a></p></div>
<%}
else
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String driver = "jdbc:odbc:HCRS";
Connection conn = DriverManager.getConnection(driver,"sa","605605");
Statement stmt = conn.createStatement();
String sql=null;
ResultSet rs=null;
sql="select DctName,DctPic,DctBirth,DctBg,DctPost,DctAchv,DctDesc,DctSal,DeptNo,OfficeNo from Doctor where DctNo='"+DctNo+"'";
rs=stmt.executeQuery(sql);
rs.next();
String DctName = rs.getString("DctName");
String DctPic = rs.getString("DctPic");
String DctBirth = rs.getString("DctBirth");
DctBirth = DctBirth.substring(0,10);
String DctBg = rs.getString("DctBg");
String DctPost = rs.getString("DctPost");
String DctAchv = rs.getString("DctAchv");
String DctDesc = rs.getString("DctDesc");
String DctSal = rs.getString("DctSal");
String DeptNo = rs.getString("DeptNo");
String OfficeNo = rs.getString("OfficeNo");
rs.close();
String sql_dept=null;
ResultSet rs_dept=null;
sql_dept="select DeptName from Department where DeptNo='"+DeptNo+"'";
rs_dept=stmt.executeQuery(sql_dept);
rs_dept.next();
String DeptName = rs_dept.getString("DeptName");
rs_dept.close();
sql="select OfficeLoc from Office where OfficeNo='"+OfficeNo+"'";
rs=stmt.executeQuery(sql);
rs.next();
String OfficeLoc = rs.getString("OfficeLoc");
rs.close();
%>
<div align="center">
<table width="434" border="1">
<tr>
<td rowspan=10><IMG src="<%=DctPic%>" width="180" height="237"></td>
</tr>
<tr>
<td colspan=2>欢迎 <%=DctName%> 的到来</td>
</tr>
<tr>
<td>生日:</td>
<td><%=DctBirth%></td>
</tr>
<tr>
<td>学历:</td>
<td><%=DctBg%></td>
</tr>
<tr>
<td>职称:</td>
<td><%=DctPost%></td>
</tr>
<tr>
<td>业绩:</td>
<td><%=DctAchv%></td>
</tr>
<tr>
<td>简介:</td>
<td><%=DctDesc%></td>
</tr>
<tr>
<td>工资:</td>
<td><%=DctSal%></td>
</tr>
<tr>
<td>科室:</td>
<td><%=DeptName%></td>
</tr>
<tr>
<td>办公室:</td>
<td><%=OfficeLoc%></td>
</tr>
</table>
</div>
<div align="center">
<table>
<tr>
<td><form method="post" action="dct_log_out.jsp"><input type="submit" value="注销"/></form></td>
<td><form method="post" action="dct_log_edit1.jsp"><input type="submit" value="修改密码" /></form></td>
</tr>
</table>
</div>
<div align="center">
<form name="form_schedule" method="post" action="dct_schedule.jsp">
<table border="0">
<tr>
<td><select name="weekdate">
<option value="" selected="selected">选择日期</option>
<option value="星期一" >星期一 </option>
<option value="星期二" >星期二 </option>
<option value="星期三" >星期三 </option>
<option value="星期四" >星期四 </option>
<option value="星期五" >星期五 </option>
<option value="星期六" >星期六 </option>
<option value="星期日" >星期日 </option>
</select></td>
<td><td align=center><input name="Submit" type="button" value="查询我的排班表" onClick="check_schedule()"/></td></td>
</tr>
</table>
</form>
<form name="form_resv" method="post" action="dct_resv.jsp">
<table>
<tr>
<td><select name="weekdate">
<option value="" selected="selected">选择日期</option>
<option value="星期一" >星期一 </option>
<option value="星期二" >星期二 </option>
<option value="星期三" >星期三 </option>
<option value="星期四" >星期四 </option>
<option value="星期五" >星期五 </option>
<option value="星期六" >星期六 </option>
<option value="星期日" >星期日 </option>
</select></td>
<td><td align=center><input name="Submit" type="button" value="查询我的预约患者" onClick="check_resv()"/></td></td>
</tr>
</table>
</form>
</div>
<%}%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -