gusucode.com > ASP+ACCESS学生管理系统通过答辩的毕业设计(源代码+论文) > ASP+ACCESS学生管理系统通过答辩的毕业设计(源代码+论文)\web\editInfo.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.Expires = 0 Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "No-Cache" %> <% Function IIf( e ) If e = True Then IIf = "CHECKED" End If End Function %> <HTML> <HEAD> <TITLE>修改学生资料</TITLE> <STYLE> P, TABLE, INPUT, TEXTAREA{FONT-SIZE: 9pt} .style1 {color: #FFFFFF} </STYLE> </HEAD> <BODY> <div align="center"> <% If Session("UserName")="" Or Session("Level") < 2 Then Response.Write "你没有访问本页面的权限!" Response.End End If %> <img src="image/logo.gif" width="500" height="200"> </div> <P align="center"><A HREF = "index.asp">返回首页</A>| <A HREF = "addInfo.asp">添加资料</A>| <A HREF = "deleteInfo.asp">删除资料</A>| <A HREF = "browseInfo.asp">查询资料</A></P> <DIV ALIGN = "center"> <FORM METHOD = "post" ACTION = "editInfo.asp"> <P align="center"> </P> <table width="100%" border="0"> <tr> <td bgcolor="#003366"><div align="center"><span class="style1">请输入学号: <input type = "text" name = "txtStuNum" size = "20"> <input type="submit" value="提交" name="btnSubmit"> </span></div></td> </tr> </table> </FORM> <!-- #include file="Date\adovbs.inc" --> <% Dim cnn, rst, sSQL, StuNum StuNum = Trim(Request.Form("txtStuNum")) Set cnn = Server.CreateObject("ADODB.Connection") Set rst = Server.CreateObject("ADODB.Recordset") cnn.ConnectionString = "PROVIDER=microsoft.jet.oledb.4.0;DATA SOURCE=" & server.mappath("Date\date.mdb") cnn.Open If StuNum <> "" Then sSQL = "SELECT * FROM students WHERE student_num='" & StuNum & "'" Set rst = cnn.Execute(sSQL, , adCmdText) If rst.EOF Then Response.Write "<P><FONT COLOR = red>没有找到符合条件的记录!</FONT></P>" Else %> <FORM METHOD = "post" ACTION = "editInfo2.asp"> <TABLE border="0" align="center" cellpadding="2" cellspacing="0" bordercolor="#0099FF" BGCOLOR = "#B5E6FF"> <TR ALIGN = "center" bgcolor="#003399"> <TH COLSPAN = "6"> <FONT COLOR = "#FFFFFF">修改学生资料</FONT></TH> </TR> <TR bgcolor="#CCCCCC"> <TD width="60" ALIGN = "right">学号:</TD> <TD width="132"><INPUT TYPE = "text" NAME = "txtStudentNum" SIZE = "12" VALUE = <% = rst("student_num")%>> <INPUT TYPE = "hidden" NAME = "txtOldStuNum" SIZE = "12" VALUE = <% = rst("student_num")%>></TD> <TD width="30" ALIGN = "right">姓名:</TD> <TD width="145"><INPUT TYPE = "text" NAME = "txtStudentName" SIZE = "12" VALUE = <% = rst("student_name")%>></TD> <TD width="71" ALIGN = "right">性别:</TD> <TD width="186"><INPUT TYPE = "radio" VALUE = "男" NAME="optStudentSex" <% = IIf( rst("student_sex") = "男") %>>男 <INPUT TYPE="radio" VALUE="女" NAME="optStudentSex" <% = IIf( rst("student_sex") = "女") %>>女</TD> </TR> <TR bgcolor="#CCCCCC"> <TD ALIGN = "right">出生日期:</TD> <TD><INPUT TYPE = "text" NAME = "txtBirthDate" SIZE = "12" VALUE = <% = rst("birthdate") %>></TD> <TD ALIGN = "right">所在院系:</TD> <TD><INPUT TYPE = "text" NAME = "txtDepartment" SIZE = "12" VALUE = <% = rst("department") %>></TD> <TD ALIGN = "right">所在专业:</TD> <TD><INPUT TYPE = "text" NAME = "txtSpeciality" SIZE = "12" VALUE = <% = rst("speciality") %>></TD> </TR> <TR bgcolor="#CCCCCC"> <TD ALIGN = "right">年级:</TD> <TD><INPUT TYPE = "text" NAME = "txtGrade" SIZE = "12" VALUE = <% = rst("grade") %>></TD> <TD ALIGN = "right">班级:</TD> <TD><INPUT TYPE = "text" NAME = "txtClass" SIZE = "12" VALUE = <% = rst("class") %>></TD> <TD ALIGN = "right">家长姓名:</TD> <TD><INPUT TYPE = "text" NAME = "txtParentName" SIZE = "12" VALUE = <% = rst("parent_name") %>></TD> </TR> <TR bgcolor="#CCCCCC"> <TD ALIGN = "right">家庭住址:</TD> <TD COLSPAN = "3"><INPUT TYPE = "text" NAME = "txtHomeAddr" SIZE = "33" VALUE = <% = rst("home_addr") %>></TD> <TD ALIGN = "right">住宅电话:</TD> <TD><INPUT TYPE = "text" NAME = "txtHomePhone" SIZE = "12" VALUE = <% = rst("home_phone") %>></TD> </TR> <TR bgcolor="#CCCCCC"> <TD ALIGN = "right">备注:</TD> <TD COLSPAN = "5"><TEXTAREA ROWS = "3" NAME = "txtRemark" COLS = "58"><% = rst("remark") %></TEXTAREA></TD> </TR> <TR ALIGN = "center" bgcolor="#CCCCCC"> <TD COLSPAN = "6"><INPUT TYPE = "submit" VALUE = "保存数据" NAME = "btnSave"> <INPUT TYPE="reset" VALUE = "全部重写" NAME = "btnReset"></TD> </TR> </TABLE> </FORM> <% End If End If %> <DIV> </BODY> </HTML>