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

📄 cls_tag.asp

📁 金路网络硬盘====特首快传系统 (Tso upload system 1.0) 使用ASP脚本编写,大量使用类封装,全面集成优化aspuplaod3.0批量上传
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		ClsPub.Tso_OutPut=ReplacePubTag(ClsPub.Tso_Header&ClsTemp.GetOutPut&ClsPub.Tso_Footer)
	End Sub
	
	Public Sub GetLogin()
		ClsPub.Tso_OutPut=ReplacePubTag(ClsPub.Tso_Header&ClsTemp.GetOutPut&ClsPub.Tso_Footer)
	End Sub
	
	Public Sub GetReg()
		ClsPub.Tso_OutPut=ReplacePubTag(ClsPub.Tso_Header&ClsTemp.GetOutPut&ClsPub.Tso_Footer)
	End Sub
	
	Public Sub XXupload()
	ClsTemp.SetVariable "Xupload","<iframe name=ifm2 onload=""style.pixelWidth=ifm2.document.body.scrollWidth;this.style.pixelHeight=ifm2.document.body.scrollHeight"" src=""Include/XXupload.asp"" frameBorder=0 scrolling=no></iframe>"
		ClsPub.Tso_OutPut=ReplacePubTag(ClsPub.Tso_Header&ClsTemp.GetOutPut&ClsPub.Tso_Footer)
	End Sub
	
	Public Sub tsoxinqi()
	ClsTemp.SetVariable "tsoxinqi","<iframe name=ifm3 onload=""style.pixelWidth=ifm3.document.body.scrollWidth;this.style.pixelHeight=ifm3.document.body.scrollHeight"" src=""tsoxinqi.asp"" frameBorder=0 scrolling=no></iframe>"
		ClsPub.Tso_OutPut=ReplacePubTag(ClsPub.Tso_Header&ClsTemp.GetOutPut&ClsPub.Tso_Footer)
	End Sub
	
	Public Sub GetEdit()
		Dim Temp
		F_Id=Request.QueryString("F_Id")
		Temp=ClsPub.DB_Query("Select F_Id,F_Title,F_Titles From Tso_FilesList Where F_Id="&F_Id&"")
		If IsArray(Temp) Then
		ClsTemp.SetVariable "F_Id",Temp(0,0)
		ClsTemp.SetVariable "Title",Temp(1,0)
		ClsTemp.SetVariable "Titles",Temp(2,0)
		End If
		ClsPub.Tso_OutPut=ReplacePubTag(ClsPub.Tso_Header&ClsTemp.GetOutPut&ClsPub.Tso_Footer)
	End Sub
	
	Private Function ReplacePubTag(StrContent)
	Dim t1,t2,lsabc,thetime,i
	  t1=timer
	  For i=1 TO 500000
	  lsabc= 1 + 1
	  Next
	  t2=Timer
	  thetime="1."&Cstr(Int(( (t2-t1)*10000 )+0.5)/10)
		Dim login1,login2
		login1="<table width=170 height=78 border=0 align=center cellpadding=0 cellspacing=0><form name=form1 action=Login.asp?Action=Login method=post onSubmit=return process_data(this)><tr align=center><td width=47 class=huei1>用户名</td><td width=74 height=26><input maxlength=20 name=name size=8 class=put></td><td width=49 rowspan=2><input type=image border=0 name=imageField src=images/xuan_button_06.gif width=37 height=40></td></tr><tr align=center><td class=huei1>密 码</td><td height=26><input name=password type=password  class=put size=8 maxlength=20></td></tr></form><tr align=center><td height=26 colspan=3><table width=170 border=0 cellspacing=0 cellpadding=0><tr align=center><td><a href=Reg.asp target=_blank><img src=images/xuan_button_07.gif name=免费注册 width=62 height=19 border=0 id=免费注册></a></td><td height=26><img src=images/xuan_button_08.gif name=忘记密码 width=62 height=19 border=0 id=忘记密码></td></tr></table></td></tr></table>"
		login2="<table width=170 height=78 border=0 align=center cellpadding=0 cellspacing=0><tr align=center><td class=huei1>会员级别:免费用户</td></tr><tr align=center><td class=huei1>剩余空间:无限空间</td></tr><tr align=center><td class=huei1><a href=Login.asp?action=Exit>退出网盘</a></td></tr></table>"
        StrContent=Replace(StrContent,"{{syspath}}",SysRoot)
		StrContent=Replace(StrContent,"{{skinpath}}",ClsPub.SkinPath)
		StrContent=Replace(StrContent,"{{sitename}}",ClsPub.Tso_Config(0))
        StrContent=Replace(StrContent,"{{sitetitle}}",ClsPub.Tso_Config(1))
		StrContent=Replace(StrContent,"{{siteurl}}",ClsPub.Tso_Config(2))
        StrContent=Replace(StrContent,"{{keywords}}",ClsPub.Tso_Config(3))
        StrContent=Replace(StrContent,"{{description}}",ClsPub.Tso_Config(4))
		StrContent=Replace(StrContent,"{{logo}}",ClsPub.Tso_Config(5))
		StrContent=Replace(StrContent,"{{banner}}",ClsPub.Tso_Config(6))
		StrContent=Replace(StrContent,"{{bottom}}",ClsPub.Tso_Config(7)&"<br>Powered By <a href=http://sever/disk/ target=_blank class=syfont12><b>TsoDisk v1.0</b></a> ,Welcome to use <b>tso1.0 system</b>")
		StrContent=Replace(StrContent,"{{email}}",ClsPub.Tso_Config(9))
		StrContent=Replace(StrContent,"{{vcode}}","")
		StrContent=Replace(StrContent,"{{links}}",Language("MyFiles",2))
		StrContent=Replace(StrContent,"{{showpage}}","")
		StrContent=Replace(StrContent,"{{addtime}}","")
		StrContent=Replace(StrContent,"{{textad}}",AdLink("TextAd"))
		StrContent=Replace(StrContent,"{{logoad}}",AdLink("LogoAd"))
		If Session("UserId")<>"" Then
		StrContent=Replace(StrContent,"{{login}}",login2)
		Else
		StrContent=Replace(StrContent,"{{login}}",login1)
		End If
		ReplacePubTag=StrContent
	End Function

	Private Function Upload()
		ClsPub.Chk_Post()
		ClsPub.SysConfig()
		Dim FormName,F_FileName,F_Viewname,IsCreatePreview,IsCreateLogoBox,FilePath,PreviewPath,UserCookieId

		ClsUp.UpLoadType=ClsPub.Tso_Config(14)                               '上传组件类型
		ClsUp.PreviewType=ClsPub.Tso_Config(15)                              '缩略图/水印组件 
		ClsUp.MaxSize=ClsPub.Tso_Config(16)                                  '文件大小限制
		ClsUp.InceptFileType=Trim(ClsPub.Tso_Config(17))				        '文件类型限制
		ClsUp.InceptMaxFile=ClsPub.Tso_Config(18)                            '上传总大小限制
		If ClsPub.Tso_Config(19)<>"0" Then
			ClsUp.RName=ClsPub.Tso_Config(19)                                '设置文件名前缀
		End If
		ClsUp.AutoDir=ClsPub.Tso_Config(20)                                  '文件目录创建方式
		ClsUp.FormatType=ClsPub.Tso_Config(21)                               '定义文件命名方法
		ClsUp.SetRanNums=ClsPub.Tso_Config(22)                               '定义提取文件的ID随机数
		FilePath=ClsUp.CreatePath(0,ClsPub.Tso_Config(23)) 
		ClsUp.UpLoadPath=FilePath											'文件保存路径 
		PreviewPath=ClsUp.CreatePath(1,ClsPub.Tso_Config(24))                '预览图片保存路径
		ClsUp.DrawType=ClsPub.Tso_Config(25)								    ' 0=不加载水印 ,1=加载水印文字,2=加载水印图片
		ClsUp.PreviewImageWidth=ClsPub.Tso_Config(26)					    ' 设置预览图片宽度
		ClsUp.PreviewImageHeight=ClsPub.Tso_Config(27)					    ' 设置预览图片高度
		ClsUp.DrawSizeType=ClsPub.Tso_Config(28)							    ' "0"=固定缩小,"1"=等比例缩小
		ClsUp.DrawFontSize=ClsPub.Tso_Config(30)					            ' 设置水印文字字体大小
		ClsUp.DrawFontColor=ClsPub.Tso_Config(31)						    ' 设置水印文字颜色
		ClsUp.DrawFontFamily=ClsPub.Tso_Config(32)							' 设置水印文字字体格式
		ClsUp.DrawFontBold=ClsPub.Tso_Config(33)								' 设置水印文字是否粗体
		If ClsPub.Tso_Config(25)=1 Then
			ClsUp.DrawInfo=ClsPub.Tso_Config(29)			                    ' 设置水印文字信息
		ElseIf ClsPub.Tso_Config(25)=2 Then
			ClsUp.DrawInfo=SysPath&ClsPub.Tso_Config(34)						' 设置水印图片信息
		End If
		ClsUp.DrawGraph=ClsPub.Tso_Config(35)							    ' 设置水印透明度
		ClsUp.TransitionColor=ClsPub.Tso_Config(36)							' 透明度颜色设置 水印图片去除底色
		ClsUp.DrawImageWidth=ClsPub.Tso_Config(37)						    ' 设置水印图片或文字区域宽度
		ClsUp.DrawImageHeight=ClsPub.Tso_Config(38)							' 设置水印图片或文字区域高度	
		ClsUp.DrawXYType=ClsPub.Tso_Config(39)								' "0"=左上,"1"=左下,"2"=居中,"3"=右上,"4"=右下
		ClsUp.SaveUpFile                                                    '执行上传
		If ClsUp.Count > 0 Then
			If ClsPub.Tso_Config(40)=1 Then
				IsCreatePreview=True
			Else
				IsCreatePreview=False
			End If
			If ClsPub.Tso_Config(25)=0 Then
				IsCreateLogoBox=False
			Else
				IsCreateLogoBox=True
			End If
			If ClsPub.Tso_Config(47)=1 Then
				UserCookieId=ClsPub.SafeRequest(4,CacheName&"_MyFiles",1,0,0)
				If Len(UserCookieId)<12 Then
					UserCookieId=ClsPub.CreateId(2,ClsPub.Tso_Config(49))
				End If
			Else
				UserCookieId=""
			End If
			For Each FormName In ClsUp.UpLoadFiles
				Set File = ClsUp.UpLoadFiles(FormName)
					F_FileName = FilePath & File.FileName
						F_Viewname = ""
					If IsCreatePreview=True Or IsCreateLogoBox=True Then
						If ClsUp.PreviewType <> 999 And File.FileType = 1 Then
							F_Viewname = PreviewPath & "Pre" & Replace(File.FileName, File.FileExt, "") & "jpg"
							Call ClsUp.CreateView(F_FileName, F_Viewname, File.FileExt,IsCreatePreview,IsCreateLogoBox)
						End If
					End If
					ClsPub.DB_Execute("Insert Into Tso_FilesList(F_Type,F_Ext,F_Path,F_PrePath,F_ContentType,F_Size,F_Width,F_Height,F_GetFileId,F_UserCookieId,F_UserID,F_AddTime,F_title,F_titles,F_UserIp)Values("&File.FileType&",'"&File.FileExt&"','"&FilePath&File.FileName&"','"&F_Viewname&"','"&Lcase(File.FileContentType)&"','"&File.FileSize&"',"&File.FileWidth&","&File.FileHeight&",'"&File.GetFileId&"','"&UserCookieId&"','"&ClsPub.Get_UserID&"',"&SqlNowString&",'"&Mid(File.FileName,InStrRev(File.FileName, "\")+1)&"','无备注信息','"&ClsPub.Get_UserIp&"')")
					TempValue=TempValue&ClsPub.GetCurrentUrl&"Get.asp?Id="&File.GetFileId&"|"
					
				Set File = Nothing
			Next
			
			If Trim(ClsPub.Tso_Config(14))<>"0" Then
				Call ClsPub.SetCookie("MyFiles",UserCookieId,Date()+ClsPub.Tso_Config(48)) 
			End If
			Upload=TempValue
		Else
			SysMsg=ClsUp.Description
			If SysMsg="" Then
				SysMsg=Language("Public",15)
			End If
			Call ClsPub.Alert("Back",0)
		End If
	End Function

	Private Sub GetFileFrom(FilePath,FileExt,FileContentType,FileSize)
		Dim sFilePath,FileStream,File,IsAttachment,FileNameString
		If ClsPub.Tso_Config(45)=1 Then
			Dim Server_V1,Server_V2
			Server_V1=Cstr(Request.ServerVariables("HTTP_REFERER"))
			Server_V2=Cstr(Request.ServerVariables("SERVER_NAME"))
			If Mid(Server_V1,8,Len(Server_V2))<>Server_V2 Then
				FilePath=SysPath&ClsPub.Tso_Config(46)
			End If
		End If
		FileNameString=ClsPub.Tso_Config(19)&ClsPub.CreateId(0,0)
		On Error Resume Next
		Set FileStream = Server.CreateObject(ServerObject_003) 
		FileStream.Open 
		FileStream.Type = 1 
		File = Server.MapPath(FilePath) 
		FileStream.LoadFromFile(File)
		If Err.Number <> 0 Then 
			  Err.Clear 
			  SysMsg=Language("Public",17)
			  Call ClsPub.Alert("Back",0)
			  Response.End
		End If 
		FileContentType = Trim(FileContentType)

		If FileContentType <> "image/gif" And FileContentType <> "image/pjpeg" And FileContentType <> "image/jpeg" Then 
			  IsAttachment = "attachment; " 
		Else 
			  IsAttachment = "" 
		End If
		Response.AddHeader "Content-Disposition", IsAttachment & "filename=" & FileNameString&"."&FileExt
		Response.AddHeader "Content-Length", FileSize 
		Response.Charset = "gb2312" 
		Response.ContentType = FileContentType
		If Lcase(FileExt)="gif" Then
			Server.Execute(FilePath) 
		Else
			Response.BinaryWrite FileStream.Read
		End If
	    Response.Flush 
		FileStream.Close 
		Set FileStream = Nothing
	End Sub

	Private Function AdLink(LinkType)
		If Clng(ClsPub.Tso_Config(51))=0 Then
			AdLink=""
			Exit Function
		End If
		Dim Temp,i,TempHtml,TableRows
		ClsPub.Name=LinkType
		If ClsPub.ObjIsEmpty() Then
			If LinkType="TextAd" Then
				ClsPub.Value=ClsPub.DB_Query("Select SiteName,SiteUrl,SiteDescribe From Tso_FriendLink Where FType=1 And IsOpen=-1")
			Else
				ClsPub.Value=ClsPub.DB_Query("Select SiteName,SiteUrl,LogoUrl,SiteDescribe From Tso_FriendLink Where FType=0 And IsOpen=-1")
			End If
		End If
		Temp=ClsPub.Value
		If Not IsArray(Temp) Then 
			AddLink=""
			Exit Function
		End If
		TempHtml="<table border=""0"" width=""100%""><tr>"&Chr(10)
		If LinkType="TextAd" Then
			TableRows=Split(ClsPub.Tso_Config(52),"*")
			For i=0 TO Ubound(Temp,2)
					TempHtml=TempHtml&"<td class=""textad""><a href="&Temp(1,i)&" title="&Temp(2,i)&">"&Temp(0,i)&"</a></td>"&Chr(10)
					If (i+1) Mod TableRows(1)=0 Then TempHtml=TempHtml&"</tr><tr>"
					If (i+1)*TableRows(1)>=TableRows(1)*TableRows(0) Then Exit For
			Next
		Else
			Dim LogoWH
			TableRows=Split(ClsPub.Tso_Config(53),"*")
			LogoWH=Split(ClsPub.Tso_Config(54),"*")
			For i=0 TO Ubound(Temp,2)
					TempHtml=TempHtml&"<td class=""logoad""><a href="&Temp(1,i)&" title="&Temp(3,i)&"><img src="&Temp(2,i)&" border=0 width="""&LogoWH(0)&""" height="""&LogoWH(1)&"""></a></td>"&Chr(10)
				If (i+1) Mod TableRows(1)=0 Then TempHtml=TempHtml&"</tr><tr>"
					If (i+1)*TableRows(1)>=TableRows(1)*TableRows(0) Then Exit For
			Next
		End If
		TempHtml=TempHtml&"</tr></table>"
		AdLink=TempHtml
	End Function
End Class
%>

⌨️ 快捷键说明

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