📄 add_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 action
action=my_request("action",0)
if action="save" then
call save()
end if
%>
<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 width="100%">
<form action=add_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"></td>
</tr>
<tr>
<td width="198" align="right" class="left_td">是否置顶:</td>
<td width="772">
<input type="radio" value="0" name="ssort_newsistop" checked>否<input type="radio" value="1" name="ssort_newsistop">是</td>
</tr>
<tr>
<td width="198" align="right" class="left_td">是否发布:</td>
<td width="772">
<input type="radio" value="0" name="ssort_newsisok" checked>发布<input type="radio" value="1" name="ssort_newsisok">暂存</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="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="action" value="save"></td>
</tr>
</form>
</table>
</body>
</html>
<%
sub save()
dim arrlist(3)
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 ("insert into ssort_news (zm_newstitle,zm_newsistop,zm_newsisok,zm_newscontent,zm_newsaddtime) values ('"&arrlist(0)&"',"&arrlist(1)&","&arrlist(2)&",'"&arrlist(3)&"','"&now()&"')")
call wurl("添加成功,请确定","manage_news.asp")
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -