📄 edit_choice.asp
字号:
<!--#include file="conn.inc"-->
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 12px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a {
font-family: 宋体;
color: #000000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #666666;
}
a:hover {
text-decoration: underline;
color: #FF0000;
}
a:active {
text-decoration: none;
color: #333333;
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css">
<%
cid=request("cid")
id=request("id")
if request("actions")="1" then
choice=trim(request("choice"))
if request("current")="1" then
def=true
else
def=false
end if
if choice="" then
response.write "<script language='javascript'>alert('选项内容不能为空!');history.go(-1);</script>"
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from choice where id="&cid
rs.open sql,connstr,1,3
rs("choice")=choice
rs("IsDefault")=def
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>alert('修改成功!');window.location.href='add_choice.asp?id="&id&"';</script>"
end if
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from choice where id="&cid
rs.open sql,connstr
%>
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="96" valign="bottom"><div align="center"></div></td>
</tr>
</table>
<form name="form1" method="post" action="">
<table width="70%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000">
<tr>
<td width="34%" bgcolor="#D7F2FF"><div align="center">选项内容
</div></td>
<td width="66%" bgcolor="#FFF4C8"><input name="choice" type="text" class="input" id="choice" value="<%=rs("choice")%>" size="30"></td>
</tr>
<tr>
<td bgcolor="#D7F2FF"><div align="center">是否默认</div></td>
<td bgcolor="#FFF4C8"><%
if rs("IsDefault")=true then
%>
<input type="radio" name="current" value="1" checked>
是
<input type="radio" name="current" value="2">
否
<%else%>
<input type="radio" name="current" value="1">
是
<input type="radio" name="current" value="2" checked>
否
<%end if%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#D7F2FF"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
<input name="actions" type="hidden" id="actions" value="1">
</div></td>
</tr>
</table>
</form>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<%rs.close
set rs=nothing%>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -