⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_expertmodify.asp

📁 医院专家挂号系统设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>专家档案修改</title>
<link href="../Style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="../Inc/adovbs.asp"-->
<!--#include file="Inc/Conn.asp"-->
<!--#include file="Inc/Admin_Check.asp"-->
<!--#include file="../inc/SQLCHK.asp"-->
<%
Dim I, J
Dim ID, Name, Sex, Office, Speciality, TimeList
Dim RS
Set RS=Server.CreateObject("ADODB.RecordSet")
RS.ActiveConnection=Conn
'专家资料修改
If Request.QueryString("Action")="Modify" Then
	ID = Request.Form("ID")
	Name = Request.Form("Name")
	Sex = Request.Form("Sex")
	Office = Request.Form("Office")
	Speciality = Request.Form("Speciality")
	For I = 1 To 7 Step 1
		For J=1 To 2 Step 1
			If Request.Form("CB_"&I&J)<>"" Then
				TimeList = TimeList&"["&I&","&J&"]"
			End If
		Next
	Next
	RS.Source = "Select * From [EXPERT] Where ID="&ID
  RS.CursorType = adOpenKeyset
  RS.CursorLocation = adUseServer
  RS.LockType = adLockOptimistic
  RS.Open
	
	RS("Name")=Name
	RS("Sex")=Sex
	RS("Office")=Office
	RS("Speciality")=Speciality
	RS("TimeList")=TimeList
	RS.Update
	Response.write "<script language='javascript'>" &Chr(13)
	Response.write "alert('修改成功!');" &Chr(13)
	Response.write "location = 'Admin_Expert.asp';"&Chr(13)
	Response.write "</script>" &Chr(13)
    Response.End 
Else
  If Request.QueryString("ID")<>"" Then
	ID= Request.QueryString("ID")

    RS.Source = "Select * From [EXPERT] Where ID="&ID
    RS.CursorType = adOpenKeyset
    RS.CursorLocation = adUseServer
    RS.LockType = adLockReadOnly
    RS.Open

	If RS.Eof OR RS.Bof Then
		Response.write "<script language='javascript'>" &Chr(13)
		Response.write "alert('ID号不存在!');" &Chr(13)
		Response.write "javascript:history.go(-1);"&Chr(13)
		Response.write "</script>" &Chr(13)
    	Response.end 
	End If
	Name = RS("Name")
	Sex = RS("Sex")
	Office = RS("Office")
	Speciality = RS("Speciality")
	TimeList = RS("TimeList")
%>
<!--#include file="Inc/Head.asp"-->
<table width="772" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="11" background="../Image/LeftMargin.gif"></td>
    <td width="750" align="center" valign="top" background="../Image/BGBlock.gif"><br>
<!--/////////////////////////////////////////////////////////////////////////////////////////////-->
<script LANGUAGE="JavaScript" SRC="CheckForm.js"></script>
<form name="Form_ExpertModify" method="post" action="Admin_ExpertModify.asp?Action=Modify" onSubmit="return CheckForm(this)">
<input name="ID" type="hidden" value="<%=ID%>" size="20">
  <table width="600" align="center" class="TableInfo">
    <tr> 
      <td height="50" align="center" colspan="2" class="TextTitle">专家信息修改</td>
    </tr>
	<tr> 
      <td height="15" align="center" colspan="2"><hr width="92%" color="#BBBBBB" size="1"></td>
    </tr>
	<tr> 
      <td height="23" width="171" align="right">  姓名:</td>
      <td height="23" align="left"> 
        <input type="text" name="Name" size="20" value="<%=RS("Name")%>" class="Input" check="[\u4e00-\u9fa5]{2,}" warning="姓名必须为汉字,且至少有2个">
      </td>
    </tr>
	<tr> 
      <td height="23" width="171" align="right">  性别:</td>
      <td height="23" align="left">
			<%If RS("Sex")="男" Then%>
	    <INPUT TYPE="Radio" checked VALUE="男" NAME="Sex"> 男  
	    <INPUT TYPE="Radio" VALUE="女" NAME="Sex"> 女
			<%Else%>
			<INPUT TYPE="Radio" VALUE="男" NAME="Sex"> 男  
	    <INPUT TYPE="Radio" checked VALUE="女" NAME="Sex"> 女
			<%End If%>  
	  </td>
    </tr>
	<tr> 
      <td height="23" width="171" align="right">  科室:</td>
      <td height="23" align="left"> 
        <input type="text" name="Office" size="20" value="<%=RS("Office")%>" class="Input" check="\S{1,}" warning="科室不能为空">
      </td>
    </tr>
    <tr> 
      <td height="90" width="171" align="right">  专长:</td>
      <td height="90" align="left"> 
        <textarea name="Speciality" cols="50" rows="5" class="Input"><%=RS("Speciality")%></textarea>
      </td>
    </tr>
  </table>
<br>
<table width="600" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#CCCCCC">
  <tr> 
    <td bgcolor="#EFEFEF" height="22" colspan="8" align="center" ><strong>工作计划:</strong></td>
  </tr>
  <tr bgcolor="#EFEFEF">
    <td width="70" height="22" align="center" bgcolor="#EFEFEF" >星期</td>
	<td align="center">一</td>
    <td align="center">二</td>
    <td align="center">三</td>
    <td align="center">四</td>
    <td align="center">五</td>
    <td align="center">六</td>
    <td align="center">日</td>
  </tr>
  <tr>
    <td width="70" align="center" bgcolor="#EFEFEF" >上午</td>
	<%
	Dim Str
	For I=1 To 7 Step 1
		Response.write "<td height='22' align='center' bgcolor='#FFFFFF'><input type='checkbox' "
		Str = "["&I&",1]"
		If InStr(TimeList, Str) <> 0  Then
			Response.write "checked "
		End If
		Response.write "name='CB_" & I &"1' value='["&I&",1]'></td>" & Chr(13)
	Next
	Response.write "</tr><tr><td width='70' align='center' bgcolor='#EFEFEF' >下午</td>"
	For I=1 To 7 Step 1
		Response.write "<td height='22' align='center' bgcolor='#FFFFFF'><input type='checkbox' "
		Str = "["&I&",2]"
		If InStr(TimeList, Str) <> 0  Then
			Response.write "checked "
		End If
		Response.write "name='CB_" & i &"2' value='["&i&",2]'></td>" & Chr(13)	
	Next
	%>
  </tr>
</table>
  <br>
  <table width="600" border="0" cellspacing="1" cellpadding="0" align="center">
    <tr>
      <td align="center">
	    <input type="submit" name="Add" value="提交修改" class="Input">      
 		<input name="Back" type="button" value="返回前页" class="Input" onClick="javascript:history.go(-1);" >
      </td>
    </tr>
  </table>
</form>
<%
  Else
    Response.write "<script language='javascript'>" &Chr(13)
	Response.write "location = 'Admin_Expert.asp';"&Chr(13)
	Response.write "</script>" &Chr(13)
    Response.end 
  End If
End If
RS.close
Set RS = nothing
Conn.close
Set conn=nothing
%>
<!--/////////////////////////////////////////////////////////////////////////////////////////////-->
	</td>
	<td width="11" background="../Image/RightMargin.gif"></td>
  </tr>
</table>
<!--#include file="Inc/Trail.asp"-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -