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

📄 adddoc2.asp

📁 中国114网搜索系统 版  本: 文件大小:580 KB 软件语言:简体中文 授权方式:免费版 相关链接:程序演示 开 发 商: 运行环境:ASP源码
💻 ASP
字号:
<%qian=request("qian")
if qian<>"13727952683933" then
response.write"成功了!"
response.end
end if%>
<HTML><head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link rel="stylesheet" type="text/css" href="../html/style.css"></head>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  background="1liv.jpg"  vlink=0000ff bgcolor=ccbbaa>
<%
function strLength(str)
	dim WINNT_CHINESE
	WINNT_CHINESE=(len("例子")=2)
	if WINNT_CHINESE then
		dim l,t,c
		dim i
		l=len(str)
		t=l
		for i=1 to l
			c=asc(mid(str,i,1))
			if c<0 then c=c+65536
			if c>255 then
				t=t+1
			end if
		next
		strLength=t
	else 
		strLength=len(str)
	end if
end function

error=""
bt=request.form("bt")
oldbt=bt
if bt="" then
error=error&"请输入组件名称!<br>"
else
bt=replace(bt,"'","''")
end if
if strLength(oldbt)>200 then
error=error&"文章标题太长!<br>"
end if
document=request.form("document")

if strLength(document)>64384 then
error=error&"你的文章太长!"
end if

if error<>"" then
response.write "<table border=0 align=center><tr><td><p><br>"&error&"</td></tr></table>"
response.end
end if
htmlflag=request.form("htmlflag")
photo=request("photo")
%>
<!-- #include file=../database.asp -->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select TOP 1 * from sitenews where title='"&bt&"'"
rs.open sql,conn,1,3
if not rs.bof and not rs.eof then
response.write "<table border=0 align=center><tr><td><p><br>文章"&server.htmlencode(bt)&"已加入,不能再添加!</td></tr></table>"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if
rs.addnew
rs("title")=oldbt
rs("document")=document
if isNumeric(htmlflag)=0 then htmlflag=0

if int(htmlflag)<>0 and int(htmlflag)<>1 then htmlflag=0

rs("htmlflag")=htmlflag
rs("photo")=photo
rs("url")=request("url")
rs.Update
%>
<p><br><br>文章添加成功,添加的文章资料如下:<br>
<p align=center><strong><font size=3><%=server.htmlencode(rs("title"))%></font></strong></p>
<%if rs("document")<>"" then
     if rs("htmlflag")=1 then
        if rs("document")<>"" then response.write rs("document")
     else
     	if rs("photo")<>"" then response.write "<table align=center><tr><td><img src='"&server.htmlencode(rs("photo"))&"' align='left'>"
        if rs("document")<>"" then response.write replace(server.htmlencode(document),vbCrLf,"<br>")
     end if
end if
response.write "<p align=right>("&rs("ndatetime")&")"
if rs("url")<>"" then response.write "<a href='"&server.htmlencode(rs("url"))&"'>相关链接</a>"
response.write "</td></tr></table>"
rs.close
set rs=nothing
conn.close
set conn=nothing%>
</body></html>

⌨️ 快捷键说明

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