📄 dbo_student_edit.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="check.asp" -->
<!--#include file="tcconn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Management System</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
-->
</style>
<link href="css/text1.css" rel="stylesheet" type="text/css">
<script LANGUAGE="javascript" src="js/common.js"></script>
<script language="javascript">
function CheckEdit(fromname){
if(trim(document.getElementById(fromname).name.value)== ""){
alert("姓名不能为空!");
document.getElementById(fromname).name.focus();
return false;
}
if(trim(document.getElementById(fromname).college.value)== ""){
alert("学院不能为空!");
document.getElementById(fromname).college.focus();
return false;
}
if(trim(document.getElementById(fromname).sclass.value)== ""){
alert("年级及专业不能为空!");
document.getElementById(fromname).sclass.focus();
return false;
}
if(trim(document.getElementById(fromname).email.value)== ""){
alert("E-mail不能为空!");
document.getElementById(fromname).email.focus();
return false;
}
if(!checkValidEmail(document.getElementById(fromname).email, "email") ){
document.getElementById(fromname).email.focus();
return false;
}
if(trim(document.getElementById(fromname).question.value)== ""){
alert("密码问题不能为空!");
document.getElementById(fromname).question.focus();
return false;
}
}
</script>
</head>
<body>
<div align="center">
<%
user_id=session("userid")
Dim sql,Rs
sql = "select [id], [snumber], [sname], [sclass] , [college], [email], [question] from [dbo_student] where [id]= "&user_id&" order by id DESC"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open sql,conn,1,1
%>
<form method="post" action="admin.asp" id="edit" onSubmit="return CheckEdit('edit')">
<input type="hidden" name="id" id="id" value='<%=Rs("id")%>' />
<input type="hidden" name="action" id="action" value='update' />
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="text1">
<tr>
<td height="10"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="text_menu">
<tr>
<td height="5" bgcolor="#9CC6FF"></td>
</tr>
<tr>
<td bgcolor="#375C81">
修改信息管理 </td>
</tr>
<tr>
<td height="5" bgcolor="#9CC6FF"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10"></td>
</tr>
<tr>
<td align="center">
<table width="90%" border="0" cellspacing="10" cellpadding="0" class="text1">
<tr>
<td width="20%">
学号: <font color="#FF0099" size="2">*</font> </td>
<td width="30%" >
<input type="text" name="number" id="number" value='<%=Rs("snumber")%>' maxlength="20" readonly="true"/> </td>
<td width="20%">
姓名:<font color="#FF0099" size="2">*</font> </td>
<td>
<input type="text" name="name" id="name" value='<%=Rs("sname")%>' maxlength="100" /> </td>
</tr>
<tr>
<td> 学院:<font color="#FF0099" size="2">*</font></td>
<td>
<select name="college" id="college" size="1" style="height:20;">
<option value="">选择学院</option>
<option value="初阳学院" <% if(Rs("college")="初阳学院") then Response.Write ("selected") end if %>>初阳学院</option>
<option value="法政公管学院" <% if(Rs("college")="法政公管学院") then Response.Write ("selected") end if %>>法政公管学院</option>
<option value="教师教育学院" <% if(Rs("college")="教师教育学院") then Response.Write ("selected") end if %>>教师教育学院 </option>
<option value="幼师学院" <% if(Rs("college")="幼师学院") then Response.Write ("selected") end if %>>幼师学院</option>
<option value="体育学院" <% if(Rs("college")="体育学院") then Response.Write ("selected") end if %>>体育学院</option>
<option value="人文学院" <% if(Rs("college")="人文学院") then Response.Write ("selected") end if %>>人文学院</option>
<option value="外语学院" <% if(Rs("college")="外语学院") then Response.Write ("selected") end if %>>外语学院</option>
<option value="音乐学院" <% if(Rs("college")="音乐学院") then Response.Write ("selected") end if %>>音乐学院</option>
<option value="美术学院" <% if(Rs("college")="美术学院") then Response.Write ("selected") end if %>>美术学院</option>
<option value="数理信息学院" <% if(Rs("college")="数理信息学院") then Response.Write ("selected") end if %>>数理信息学院</option>
<option value="生化学院" <% if(Rs("college")="生化学院") then Response.Write ("selected") end if %>>生化学院</option>
<option value="工商学院" <% if(Rs("college")="工商学院") then Response.Write ("selected") end if %>>工商学院</option>
<option value="旅游学院" <% if(Rs("college")="旅游学院") then Response.Write ("selected") end if %>>旅游学院</option>
<option value="交通学院" <% if(Rs("college")="交通学院") then Response.Write ("selected") end if %>>交通学院</option>
<option value="职业技术学院" <% if(Rs("college")="职业技术学院") then Response.Write ("selected") end if %>>职业技术学院</option>
<option value="国际学院" <% if(Rs("college")="国际学院") then Response.Write ("selected") end if %>>国际学院</option>
<option value="行知学院" <% if(Rs("college")="行知学院") then Response.Write ("selected") end if %>>行知学院</option>
<option value="文传学院" <% if(Rs("college")="文传学院") then Response.Write ("selected") end if %>>文传学院</option>
</select>
</td>
<td> 密码问题:<font color="#FF0099" size="2">*</font> </td>
<td>
<input type="question" name="question" id="question" value='<%=Rs("question")%>' maxlength="50"/> </td>
</tr>
<tr>
<td width="20%">
年级及专业: <font color="#FF0099" size="2">*</font> </td>
<td width="30%" >
<input type="text" name="sclass" id="sclass" value='<%=Rs("sclass")%>' maxlength="100" /> </td>
<td width="20%">
e-mail: <font color="#FF0099" size="2">*</font></td>
<td>
<input type="text" name="email" id="email" value='<%=Rs("email")%>' maxlength="150" /> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
<hr width="90%" align="center" color="#999999" style="height:1px;">
<input type="submit" name="commit" value="保存" />
<input type="reset" value="取消">
</form>
<br><br><br><br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -