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

📄 admin_downsave.asp

📁 ASP源程序采用天空软件小偷中心核件制成
💻 ASP
字号:
<!--#include file="function.asp"--> 
<!--#include file="conn.asp"--> 
<!--#include file="admin_loginchk.asp"-->
<%admin2%>
<%
function HTMLEncode2(fString)
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	HTMLEncode2 = fString
end function

founerr=false
	if trim(request.form("txtfilename"))="" then
  		founderr=true
  		errmsg="<li>下载的软件地址不能为空</li>"
	end if
	if trim(request.form("nclassid"))="" then
  		founderr=true
  		errmsg=errmsg+"<li>小分类不能为空!</li>"
	end if
	if trim(request.form("txtshowname"))="" then
  		founderr=true
  		errmsg=errmsg+"<li>显示名称不能为空</li>"
	end if
	if trim(request.form("txtnote"))="" then
  		founderr=true
  		errmsg=errmsg+"<li>软件简介不能为空</li>"
	end if

	if founderr=false then
		filename=request("txtfilename")
		filename1=request("txtfilename1")
		filename2=request("txtfilename2")
		showname=request("txtshowname")
		classid=request("classid")
		Nclassid=request("Nclassid")
		'response.write nclassid
		'response.end
		note=request("txtnote")
		hot=request("hot")
		
		size=request("size")
                images=request("images")
		fromurl=request("fromurl")
		order=request("order")
		if request.form("hots")="on" then
			hots=1
		else
			hots=0
		end if
		if request.form("hide")="on" then
			hide=1
		else
			hide=0
		end if

	set rs=server.createobject("adodb.recordset")
	if request("action")="add" then
		call newsoft()
	elseif request("action")="edit" then
		call editsoft()
	end if
sub newsoft()
	sql="select * from download where (id is null)" 
	rs.open sql,conn,1,3
	rs.addnew
	rs("filename")=filename
	if filename1<>"" then
	rs("filename1")=filename1
	end if
	if filename2<>"" then
	rs("filename2")=filename2
	end if
	rs("showname")=showname
	rs("classid")=classid
	rs("Nclassid")=Nclassid
	rs("fromurl")=fromurl
	rs("note")=note
	'rs("system")=system
	rs("hot")=hot
	rs("hots")=hots
	rs("stop")=hide
	rs("size")=size
        rs("images")=images
	rs("orders")=order
	rs("lasthits")=date()
	rs("dateandtime")=date()
	rs("dayhits")=0
	rs("weekhits")=0
	rs("hits")=0
	rs.update
end sub
sub editsoft()
	sql="select * from download where id="&request("id")
	rs.open sql,conn,1,3
	rs("filename")=filename
	if filename1<>"" then
	rs("filename1")=filename1
	end if
	if filename2<>"" then
	rs("filename2")=filename2
	end if
	rs("showname")=showname
	rs("classid")=classid
	rs("Nclassid")=Nclassid
	rs("fromurl")=fromurl
	rs("note")=note
	'rs("system")=system
	rs("hot")=hot
	rs("hots")=hots
	rs("stop")=hide
	rs("size")=size
        rs("images")=images
	rs("orders")=order
	rs("lasthits")=date()
	rs.update
end sub

if request("action")="add" then
successmsg="<li>软件添加成功!</li>"
end if 

if request("action")="edit" then
successmsg="<li>软件修改成功!</li>"
end if

successmsg=successmsg&"<br><li><a href=admin_downadd.asp>继续添加</a></li>"
call success()

else
  call error()
end if
%>

⌨️ 快捷键说明

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