newsadd.asp
来自「中国电视购物网电子商务系统」· ASP 代码 · 共 32 行
ASP
32 行
<%@ Language=VBScript %>
<!--#include file="../../include/function.asp"-->
<!--#include file="../../include/conn.asp"-->
<%
title=chkstr(Request.Form("title"))
body=htmlencode(Request.Form("body"))
pic=chkstr(Request.Form("pic"))
n_type=Request.Form("n_type")
if n_type="news" then
sql="insert into news (news_title,news_body,news_pic) values('"&title&"','"&body&"','"&pic&"')"
else if n_type="report" then
sql="insert into report (re_title,re_body,re_pic) values('"&title&"','"&body&"','"&pic&"')"
else if n_type="cp" then
sql="insert into cp(cp_title) values('"&title&"')"
else
sql="insert into hync(hy_title) values('"&title&"')"
end if
end if
end if
conn.Execute(sql)
if conn.Errors.Count=0 then
call conn_end
%>
<SCRIPT LANGUAGE=javascript>
<!--
alert("信息已录入!");
window.location.href="news.asp";
//-->
</SCRIPT>
<%end if%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?