📄 newed.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../conn/adminconn.asp"-->
<!--#include file="login.asp"-->
<%
if request("id")<>"" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from new where id="&request("id")
rs.open sql,conn,1,1
if request("post")<>"" then
call ed1
end if
function ed1
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from new where id="&request("id")
rs1.open sql1,conn,1,3
rs1("title")=request("title")
rs1("lei")=request("lei")
rs1("content")=request("content")
rs1.update
rs1.close
response.Write("<script language=javascript>alert('修改成功')</script>")
end function
%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
@import url("../admin.css");
body,td,th {
font-size: 12px;
}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="">
<p> </p>
<table width="77%" border="0" align="center" cellspacing="1" bgcolor="#000000">
<tr >
<td height="30" colspan="2" background="../images/tiao.gif"> </td>
</tr>
<tr>
<td width="12%" height="36" bgcolor="#FFFFFF"><div align="right">新闻标题:</div></td>
<td width="88%" bgcolor="#FFFFFF">
<input name="title" type="text" id="title" value="<%=rs("title")%>">
<input name="post" type="hidden" id="post" value="true"></td>
</tr>
<tr>
<td width="12%" height="33" bgcolor="#FFFFFF"><div align="right">新闻类型:</div></td>
<td bgcolor="#FFFFFF">
<select name="lei" >
<option value="公司新闻" <%if rs("lei")="公司新闻" then%>selected<% End If %>>公司新闻</option>
<option value="行业新闻" <%if rs("lei")="行业新闻" then%>selected<% End If %>>行业新闻</option>
</select></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"><div align="right">内容:</div></td>
<td bgcolor="#FFFFFF">
<textarea name="content" cols="88" rows="20" class="kuang" id="textarea"><%=rs("content")%></textarea></td>
</tr>
<tr bgcolor="#FFA218">
<td height="37" colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
<input name="Submit3" type="reset" onClick="location='xinxi.asp'" value="返回">
</div></td>
</tr>
</table>
</form>
</body>
</html>
<% end if %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -