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

📄 baseinfo.asp

📁 一套完整的学生课程管理系统
💻 ASP
字号:
<!-- #include file="utility/check.asp" -->

<%
	'****************************************
	'目的:			依据学号读取信息并显示
	'开始时间:		2005-5-31
	'最后修改时间:	2005-5-31
	'编写人:		某某某
	'****************************************
	
	'定义变量
	dim userID
	dim userName
	dim userPassword
	dim userGrade
	dim userSex
	dim userPhone
	dim userEmail
	dim userAddress
	dim userCheck
	dim sql
	dim rs
	
	'从Session中取值
	userID = Session("userID")
	userName = Session("userName")
	
	sql = "select * from student where ID = '" & userID & "'"
	Set rs = ExecuteQuery(sql)
	
	'赋值到变量
	userPassword = rs("sPassword")
	userGrade = rs("sGrade")
	userSex = rs("sSex")
	userPhone = rs("sPhone")
	userEmail = rs("sEmail")
	userAddress = rs("sAddress")
	userCheck = rs("sCheck")
	
	'释放数据库资源
	rs.close()
	set rs = nothing
	
	Sub initReadOnly()
		if(userCheck = 1) then Response.Write("readonly")
	end Sub

%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>基本信息</title>
<link rel="stylesheet" type="text/css" href="images/link.css">
</head>
<table border="0" width="580" id="table2" cellspacing="0" cellpadding="0" height="131">
				<form action="updateBaseInfo.asp" method="post" name="baseInfoForm">
				<tr>
					<td height="27" width="104" align="right">学号:</td>
					<td height="27" width="531">
					<input type=text name="userID" class="inputText" size="20" readonly value="<%=userID%>"><font color="#FF0000">*</font></td>
				</tr>
				<tr>
					<td height="27" width="104" align="right">姓名:</td>
					<td height="27" width="531">
					<input type=text name="userName" class="inputText" size="20" value="<%=userName%>" <%initReadOnly()%>><font color="#FF0000">*</font></td>
				</tr>
				<tr>
					<td width="104" height="27" align="right">密码:</td>
					<td width="531" height="27">
					<input type=password name="userPassword" size="20" class="inputText"><font color="#FF0000">不修改请留空</font></td>
				</tr>
				<tr>
					<td width="104" align="right" height="27">密码确认:</td>
					<td width="531" height="27">
					<input type=password name="userPasswordChk" size="20" class="inputText"><font color="#FF0000">不修改请留空</font></td>
				</tr>
				<tr>
					<td width="104" align="right" height="27">班级:</td>
					<td width="531" height="27">
					<input name="userGrade" size="20" class="inputText" value="<%=userGrade%>" <%initReadOnly()%>><font color="#FF0000">*</font></td>
				</tr>
				<tr>
					<td width="104" align="right" height="27">性别:</td>
					<td width="531" height="27">
					<input type="radio" value="男" <%if(userSex = "男") then response.write("checked")%> name="userSex" id="fp1"><label for="fp1">男</label>&nbsp;&nbsp;
					<input type="radio" name="userSex" value="女" <%if userSex = "女" then response.write("checked")%> id="fp2"><label for="fp2">女</label></td>
				</tr>
				<tr>
					<td width="104" align="right" height="27">电话:</td>
					<td width="531" height="27">
					<input name="userPhone" size="20" class="inputText" value="<%=userPhone%>"></td>
				</tr>
				<tr>
					<td width="104" align="right" height="27">邮箱:</td>
					<td width="531" height="27">
					<input name="userEmail" size="20" class="inputText" value="<%=userEmail%>"></td>
				</tr>
				<tr>
					<td width="104" align="right" height="27">住址:</td>
					<td width="531" height="27">
					<input name="userAddress" size="50" class="inputText" value="<%=userAddress%>"></td>
				</tr>
				<tr>
					<td width="104" align="right" height="27"> </td>
					<td width="531" height="27">
					<button type=submit class="button" style="width: 60px; height: 20px">提 交</button>&nbsp;&nbsp;&nbsp; &nbsp; 
					<button type=reset class="button" style="width: 60px; height: 20px">重 写</button></td>
				</tr>
				</form>
			</table>
<body>

</body>

</html>

⌨️ 快捷键说明

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