📄 editnews2.asp
字号:
<%@ Language=VBScript %>
<% If Session(strCookieURL & "www.3rom.com") = "1369852475213" and Session("count")<10 Then %>
<!--#INCLUDE FILE="inc_Conn.asp" -->
<%
Dim strActive,strNewsID,strClassID
strActive=Request.QueryString("active")
strNewsID=Request.QueryString("NewsID")
If strNewsID="" Then strNewsID=0
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>EditNews</title>
</head>
<body bgcolor="#D6D3CE">
<% If strActive="Edit" Then %>
<%
Call My_form()
%>
<% End If %>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="755">
<tr>
<td width="100%" align="center"><a href="index.asp">返回管理</a></td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
MyCon.close
set MyCon=Nothing
%>
<% Sub My_form() %>
<%
set rs2=Server.createObject("adodb.Recordset")
strSql="Select * from News where NewsID="&strNewsID
rs2.open strSql,MyCon
If not rs2.eof Then
set rs=Server.createObject("adodb.Recordset")
strSql="Select * from Class where ClassID=" & rs2("News_Class")
rs.open strSql,MyCon
End If
set rs1=Server.createObject("adodb.Recordset")
strSql="Select * from Class"
rs1.open strSql,MyCon
%>
<% If not rs2.eof Then %>
<form method="POST" action="EditNews3.asp?active=Update&NewsID=<%=strNewsID%>">
<table align="center" border="1" cellPadding="0" cellSpacing="0" width="550" height="338">
<tr>
<td width="65" valign="top" align="right" nowrap bgcolor="#C0C0C0" height="23"><b><font color="#FFFFFF">标题:</font></b></td>
<td width="479" colspan="3" height="23"><input id="Title" name="Title" title="Title" size="20" value="<%=rs2("News_Title")%>"></td>
</tr>
<tr>
<td width="65" valign="top" align="right" nowrap bgcolor="#C0C0C0" height="23"><b><font color="#FFFFFF">作者:</font></b></td>
<td width="479" colspan="3" height="23"><input type="text" name="Author" size="20" value="<%=rs2("News_Author")%>">
务必填写新闻的原作者</td>
</tr>
<tr>
<td width="65" valign="top" align="right" nowrap bgcolor="#C0C0C0" height="23"><b><font color="#FFFFFF">出处:</font></b></td>
<td width="479" colspan="3" height="23"><input id="Freind" name="Freind" title="Friend" size="20" value="<%=rs2("News_Freind")%>">
例:中南大学</td>
</tr>
<tr>
<td width="65" valign="top" align="right" nowrap bgcolor="#C0C0C0" height="23"><b><font color="#FFFFFF">链接:</font></b></td>
<td width="479" colspan="3" height="23"><input id="Link" name="Link" title="Link" size="20" value="<%=rs2("News_Link")%>">
例:http://www.csu.edu.cn</td>
</tr>
<tr>
<td align="right" vAlign="top" width="65" nowrap bgcolor="#C0C0C0" height="23"><b><font color="#FFFFFF">类别:</font></b></td>
<td width="50%"><% If Not rs.eof Then %><%=rs("Class_Name")%><% Else %>已删除<% End If %></td>
<td width="50%">修改为:<select size="1" name="Class">
<% Do While not rs.EOF%>
<option value="<%=rs("ClassID")%>"><%=rs("Class_Name")%></option>
<% rs.movenext %>
<% Loop %>
<% Do While not rs1.EOF%>
<option value="<%=rs1("ClassID")%>"><%=rs1("Class_Name")%></option>
<% rs1.movenext %>
<% Loop %>
</select></td>
<td width="114" height="23"></td>
</tr>
<tr>
<td align="right" vAlign="top" width="65" nowrap bgcolor="#C0C0C0" rowspan="3" height="184"><b><font color="#FFFFFF">内容:</font></b></td>
<td width="363" rowspan="3" height="184" colspan="2"><textarea id="Content" name="Content" rows="12" cols="49"><%=rs2("News_Content")%></textarea></td>
<td width="114" valign="top" align="left" height="108">如果要添加图片,请在要加入图片的地方写入[image<font color="#FF0000">1</font>][image<font color="#FF0000">2</font>]......[image<font color="#FF0000">N</font>]否则按默认方式处理。</td>
</tr>
<tr>
<td width="114" valign="top" align="left" height="30"><select size="1" name="Image">
<option value="0">请选择图片数</option>
<% For i=1 to 10 %>
<option value="<%=i%>"><%=i%></option>
<% next %>
</select></td>
</tr>
<tr>
<td width="114" valign="top" align="left" height="42"></td>
</tr>
<tr>
<td width="65" valign="top" align="right" nowrap bgcolor="#C0C0C0" height="25"> </td>
<td width="479" colspan="3" height="25"><input id="submit" name="submit" type="submit" value=" 确 定 ">
<input type="reset" value=" 全部重写 " name="Reset"></td>
</tr>
</table>
</form>
<%
rs.close
set rs=Nothing
Else
%>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" width="75%">
<tr>
<td width="12%"> </td>
</center>
<td width="76%" align="center">你要编辑的新闻不存在或者已经被删除</td>
<center>
<td width="12%"> </td>
</tr>
<tr>
<td width="100%" colspan="3" align="center"><a href="index.asp">返回管理</a></td>
</tr>
</table>
</center>
</div>
<meta http-equiv="Refresh" content="2; URL=javascript:history.go(-1)">
<% End If %>
<%
rs1.close
set rs1=Nothing
rs2.close
set rs2=Nothing
%>
<% End Sub %>
<%
Else
Response.redirect "Login.asp"
End If
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -