⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modi_news.asp

📁 漂亮的欧美旅游模板
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="chk.asp"-->
<!--#include file="db_conn.asp"-->
<!--#include file="../my_libs/my_request.asp"-->
<!--#include file="../my_libs/my_lib.asp"-->
<%
dim flag,id,sql1,rs1,arr(3),i
flag=my_request("flag",0)
id=cint(my_request("id",1))

if flag="save" then
call save()
end if

sql1="select zm_newstitle,zm_newsistop,zm_newsisok,zm_newscontent from ssort_news where nid="&id
set rs1=conn.execute (sql1)
for i=0 to 3
arr(i)=rs1(i)
next
rs1.close
set rs1=nothing
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="js/edit.js" type="text/javascript"></script>
<title>新建网页 1</title>
<link rel="stylesheet" type="text/css" href="style_admin.css" />
</head>

<body>

<table border="1" width="100%" id="table1">
<form action=modi_news.asp method=post name=form1>
	<tr>
		<td width="976" colspan="2" class="top_td">新闻修改</td>
	</tr>
	<tr>
		<td width="198" align="right" class="left_td">新闻标题:</td>
		<td width="772">
		<input type="text" name="ssort_newstitle" size="43" maxlength="50" value="<%=arr(0)%>"></td>
	</tr>
	<tr>
		<td width="198" align="right" class="left_td">是否置顶:</td>
		<td width="772">
		<input type="radio" value="0" name="ssort_newsistop" <%if arr(1)=0 then response.write "checked"%>>否<input type="radio" value="1" name="ssort_newsistop" <%if arr(1)=1 then response.write "checked"%>>是</td>
	</tr>
	<tr>
		<td width="198" align="right" class="left_td">是否发布:</td>
		<td width="772">
		<input type="radio" value="0" name="ssort_newsisok" <%if arr(2)=0 then response.write "checked"%>>发布<input type="radio" value="1" name="ssort_newsisok" <%if arr(2)=1 then response.write "checked"%>>暂存</td>
	</tr>
	<tr>
		<td width="198" align="right" class="left_td">新闻内容:</td>
		<td width="772"><!--#include file="eokedit.asp"-->
<script language="javascript">
document.write ('<iframe src="textbox.asp?id=<%=id%>&action=modify" id="message" width="450" height="250"></iframe>')
frames.message.document.designMode = "On";
</script></td>
	</tr>
	<tr>
		<td width="976" colspan="2">
		<p align="center"><input type="submit" value="提交" name="B1" onclick="document.form1.Content.value = frames.message.document.body.innerHTML;">
		<input type="reset" value="重置" name="B2"><input type="hidden" name="Content" value><input type="hidden" name="flag" value="save"><input type="hidden" name="id" value="<%=id%>"></td>
	</tr>
	</form>
</table>

</body>

</html>
<%
sub save()
dim arrlist(3),pid
pid=my_request("id",1)
arrlist(0)=my_request("ssort_newstitle",0)
arrlist(1)=my_request("ssort_newsistop",1)
arrlist(2)=my_request("ssort_newsisok",1)
arrlist(3)=my_request("content",0)
if arrlist(0)="" or arrlist(3)="" then
call wnourl("信息未填写完整")
else
conn.execute ("update ssort_news set zm_newstitle='"&arrlist(0)&"',zm_newsistop="&arrlist(1)&",zm_newsisok="&arrlist(2)&",zm_newscontent='"&arrlist(3)&"' where nid="&pid)
call wurl("修改成功,请确定","manage_news.asp")
end if
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -