📄 geshouedit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
if session("admin")="" then
response.redirect "admin_login.asp"
end if
dim action
dim totalpage,maxperpage,totalrecords,i,currentpage
action=request("action")
if action="" then
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from geshou where id="&id
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="?action=save">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr align="center" bgcolor="#eeeeee">
<td height="25" colspan="2">修改歌手资料</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="22%" height="25">歌手:</td>
<td width="78%" height="25"><input name="geshou" type="text" id="geshou" value="<%=rs("geshou")%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">类别:</td>
<td height="25">
<%
set rs2=server.CreateObject("adodb.recordset")
sql2="select dalei from geshou group by dalei"
rs2.open sql2,conn,1,1
%>
<select name="dalei" id="dalei">
<%
do while not rs2.eof
if rs2("dalei")=rs("dalei") then
s="selected"
else
s=""
end if
%>
<option <%=s%> value="<%=rs2("dalei")%>"><%=rs2("dalei")%></option>
<%
rs2.movenext
loop
rs2.close
%>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">字母:</td>
<td height="25"><input name="zibo" type="text" id="zibo" size="10" value="<%=rs("zibo")%>">
<input name="id" type="hidden" id="id" value="<%=id%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="2"><input type="submit" name="Submit" value="修改">
<input type="submit" name="Submit2" value="重填"></td>
</tr>
</table>
</form>
</body>
</html>
<%
rs.close
else
geshou=request("geshou")
dalei=request("dalei")
zibo=request("zibo")
id=request("id")
set rs=server.CreateObject("adodb.recordset")
sql="select * from geshou where id="&id
rs.open sql,conn,1,2
rs("geshou")=geshou
rs("dalei")=dalei
rs("zibo")=zibo
rs.update
rs.close
%>
<script language="JavaScript">
alert("修改成功!");
location.href="addgeshou.asp"
</script>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -