📄 news_modi.asp
字号:
<%@language=vbscript codepage=936 %>
<!--#include file="../database/conn.asp"-->
<html><head>
<%
if request("no")="modi" then
newsid=request("id")
title=request("title")
mcontent = Request.form("contnet")
user=request("zuozhe")
set rs=server.createobject("adodb.recordset")
sql="select * from news where id="&newsid
rs.open sql,conn,1,3
rs("title")="title"
rs("content")="mcontent"
rs("zuozhe")="user"
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('新闻修改成功!');" & Chr(13)
response.write "window.document.location.href='News_Manage.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if%>
<script language = "JavaScript">
var onecount;
function changelocation(locationid)
{
document.addNEWS.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.addNEWS.SmallClassName.options[document.addNEWS.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function CheckForm()
{
document.addNEWS.cnWords.value = document.frames.cnEditBox.getHTML(true);
document.addNEWS.imageNum.value = document.frames.cnEditBox.document.all("editImageNum").value;
document.addNEWS.editFirstImageName.value = document.frames.cnEditBox.document.all("editFirstImageName").value;
if (document.addNEWS.title.value.length == 0) {
alert("新闻标题没有填写.");
document.addNEWS.title.focus();
return false;
}
if (document.addNEWS.user.value.length == 0) {
alert("新闻发布人没有填写");
document.addNEWS.user.focus();
return false;
}
return true;
}
</script>
</head>
<body style="width:600px">
<table width="600"border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><%
newsid=request("id")
Set rso=Server.CreateObject("ADODB.RecordSet")
sql="select * from news where id="&newsid
rso.Open sql,conn,1,3
if rso.eof and rso.bof then
response.Write("没有记录")
else
%> </td>
</tr>
</table>
<form name="addNEWS" method="post" action="edit.asp">
<table width="600" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
<tr bgcolor="#ECF5FF">
<td width="100" height="24" align="right"><font color="#FF0000">*</font>标题:</td>
<td width="500">
<input name="title" type="text" class="input" value="<%=rso("title")%>" size="50">
<input name="id" type="hidden" value="<%=rso("id")%>"></td>
</tr>
<tr bgcolor="#ECF5FF">
<td width="100"height="24" align="right"><font color="#FF0000">*</font>类别:</td>
<td>
<input type="text" name="leibie" value="<%=rso("titletype")%>" >
</td>
</tr>
<tr bgcolor="#ECF5FF">
<td width="100"align="right" valign="top"><font color="#FF0000">*</font>内容:</td>
<td>
<textarea cols="100" rows="10" name="content" ><%=rso("content")%></textarea></td>
</tr>
<tr bgcolor="#ECF5FF">
<td width="100" height="24" align="right"><font color="#FF0000">*</font>作者:</td>
<td>
<input name="zuozhe" type="text" class="input" size="20" value="<%=rso("zuozhe")%>"> </td>
</tr>
<tr align="center" bgcolor="#ECF5FF">
<td width="100"> </td>
<td>
<input type="submit" name="Submit" value="提交" class="input">
<input type="reset" name="Submit2" value="重置" class="input">
</td>
</tr>
</table>
</form>
<% End If
rso.close
set rso=nothing
%>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -