?? modi_news.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>新建網(wǎng)頁 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">新聞標(biāo)題:</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">是否發(fā)布:</td>
<td width="772">
<input type="radio" value="0" name="ssort_newsisok" <%if arr(2)=0 then response.write "checked"%>>發(fā)布<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">新聞內(nèi)容:</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
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -