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

📄 opensoft.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
字号:
<!--#include file="include/conn.asp"-->
<!--#include file="include/ms_publicfunction.asp"-->
<%'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1   Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com   www.maosin.net
'      QQ:57861417  
'电子邮箱:maosin@163.com  maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
From_url = Cstr(Request.ServerVariables("HTTP_REFERER")) 
Serv_url = Cstr(Request.ServerVariables("SERVER_NAME")) 
if mid(From_url,8,len(Serv_url)) <> Serv_url then 
response.write "<b>非法链接!<br><span id=yu>3</span><a href=javascript:countDown></a>秒钟后系统将自动返回首页......</b>" 
response.write "<meta http-equiv=refresh content=3;url=index.asp>" 
response.write "<SCRIPT>valignbottom()</SCRIPT>" 
response.write "<script>function countDown(secs){yu.innerText=secs;if(--secs>0)setTimeout('countDown('+secs+')',1000);}countDown(3);</script>" 
response.end 
end if 
id=Request.QueryString("id")
rsid=Request.QueryString("rsid")
if not isInteger(id) then
	response.redirect("include/errmsg.asp?MSError=errmPage&strTitle=参数出错&strMsg=参数不是数字字符")
	response.end
end if
if not isInteger(rsid) then
response.redirect("include/errmsg.asp?MSError=errmPage&strTitle=参数出错&strMsg=参数不是数字字符")
response.end
end if
sql="select down_url,down_size,popedom,jifen,money,buyUser from ms_down where id="&id
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,connstr,1,3
if not rs.eof and not rs.bof then
	dim popedom,jifen,money,buyid,myurl,fileName,fileSize
	popedom=rs("popedom")
	jifen=rs("jifen")
	money=rs("money")
	buyuser=rs("buyuser")
	urlrs=split(rs("down_url"),"|")
	urlstr=split(urlrs(rsid),"$:")
	myurl=urlstr(0)
	fileName=mid(myurl,instrRev(myurl,"/")+1)
	fileSize=rs("down_size")
	if popedom>0 then
	if session(userVar)=userVal then
		userInfo=session("userInfo")
		if popedom=1 then
		if csng(userinfo(2))>=1 then
		if csng(userInfo(3))<jifen then
			 response.write("<script language=""javascript"">alert('很遗憾,您的"&pointName&"不足,此下载需要"&pointName&jifen&" "&pointUnits&"以上的会员才能下载,目前您的"&pointName&userinfo(3)&" "&pointUnits&"');</script>")
		else
			if instr(myurl,serv_url)=0 then
				if (instr(1,myurl,"http://",1)<>0) or (instr(1,myurl,"ftp://",1)<>0) then
				response.redirect(myurl)
				else
				on error resume next
				Set objStream=Server.CreateObject("ADODB.Stream")
				if Err.Number=-2147221005 then
					response.Redirect(myurl)
				else
					objStream.open
					S.Mode=3
					objStream.type=1
					objstream.LoadFromFile(server.MapPath(myurl))
					filesize=objStream.Size
					response.AddHeader "Content-Disposition","attachment;filename="&filename
					Response.AddHeader "Content-Length", filesize
					response.Charset="UTF-8"
					Response.ContentType="application/octet-stream"
					response.binarywrite objStream.read
					objstream.close
					Set objstream=Nothing
				end if
				err.clear
				end if
			else
				response.redirect(myurl)
			end if
		end if
		else
			response.Write("此下载需要本站会员才能下载,请赶快注册或登录吧!")
		end if
		elseif popedom=2 then
			if cint(userInfo(2))>=2 then
				dim isbuy:isbuy=0
				if getBuyUser(buyuser,userInfo(1))=true then
					isbuy=1
				else
					isbuy=0
				end if
				if isbuy=0 and money>0 then
					if userInfo(4)<money then
						response.write("<script>alert('对不起您的"&moneyName&"不足,请赶快允值');</script>")
						response.end
					end if
					rs("buyUser")=rs("buyUser")&","&userinfo(1)
					rs.update
					conn.execute("update ms_user set user_money=user_money-"&money&" where user_id="&userinfo(0))
					userInfo(4)=csng(userInfo(4))-money
					session("userinfo")=userInfo
					userInfo=session("userinfo")
					if instr(myurl,serv_url)=0 then
						if (instr(1,myurl,"http://",1)<>0) or (instr(1,myurl,"ftp://",1)<>0) then
						response.redirect(myurl)
						else
						on error resume next
						Set objStream=Server.CreateObject("ADODB.Stream")
						if Err.Number=-2147221005 then
							response.Redirect(myurl)
						else
							objStream.open
							S.Mode=3
							objStream.type=1
							objstream.LoadFromFile(server.MapPath(myurl))
							filesize=objStream.Size
							response.AddHeader "Content-Disposition","attachment;filename="&filename
							Response.AddHeader "Content-Length", filesize
							response.Charset="UTF-8"
							Response.ContentType="application/octet-stream"
							response.binarywrite objStream.read
							objstream.close
							Set objstream=Nothing
						end if
						err.clear
						end if
					else
						response.redirect(myurl)
					end if
				else
					if instr(myurl,serv_url)=0 then
						if (instr(1,myurl,"http://",1)<>0) or (instr(1,myurl,"ftp://",1)<>0) then
						response.redirect(myurl)
						else
						on error resume next
						Set objStream=Server.CreateObject("ADODB.Stream")
						if Err.Number=-2147221005 then
							response.Redirect(myurl)
						else
							objStream.open
							S.Mode=3
							objStream.type=1
							objstream.LoadFromFile(server.MapPath(myurl))
							filesize=objStream.Size
							response.AddHeader "Content-Disposition","attachment;filename="&filename
							Response.AddHeader "Content-Length", filesize
							response.Charset="UTF-8"
							Response.ContentType="application/octet-stream"
							response.binarywrite objStream.read
							objstream.close
							Set objstream=Nothing
						end if
						err.clear
						end if
					else
						response.redirect(myurl)
					end if
				end if
			else
				response.write("<script language=""javascript"">alert('此下载需VIP会员以上级才能下载,目前您的权限不够!');</script>")
			end if
		end if
	end if
	else
		if instr(myurl,serv_url)=0 then
			if (instr(1,myurl,"http://",1)<>0) or (instr(1,myurl,"ftp://",1)<>0) then
			response.redirect(myurl)
			else
			on error resume next
			Set objStream=Server.CreateObject("ADODB.Stream")
			if Err.Number=-2147221005 then
				response.Redirect(myurl)
			else
				objStream.open
				S.Mode=3
				objStream.type=1
				objstream.LoadFromFile(server.MapPath(myurl))
				filesize=objStream.Size
				response.AddHeader "Content-Disposition","attachment;filename="&filename
				Response.AddHeader "Content-Length", filesize
				response.Charset="UTF-8"
				Response.ContentType="application/octet-stream"
				response.binarywrite objStream.read
				objstream.close
				Set objstream=Nothing
			end if
			err.clear
			end if
		else
			response.redirect(myurl)
		end if
	end if
else
	response.write("没有此软件或此软件已删除")
	response.end
end if
response.Flush()
response.Clear()
rs.close
set rs=nothing
upsql="Update ms_down Set down_dcount=down_dcount+1 Where id="&id
conn.Execute(upsql)
'========================================================
'MaoSin CMS 1.1      Power by maosin.com
'Email: maosin@163.com , maosin@maosin.com
'Web: http://www.maosin.com  http://www.maosin.net
'Copyright (C) 2006 maosin.com All Rights Reserved.
'========================================================
%>

⌨️ 快捷键说明

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