WenJian.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:5k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="Inc/xkon.Asp"--><!--#Include File="Inc/upload_5xsoft.Inc"--><%
- Call QuanXian("1",0)
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Dim ZhangHao
- ZhangHao=s.QueryString("ZhangHao")
- If ZhangHao="" Then
- ZhangHao=Zi_ZhangHao
- End If
- Private Sub WenJianLieBiao()
- Dim FSO,FS,Files,File,WenJian_LieBiao,p,PageCount,FileCount,AllFiles,i,WenJian
- p=s.QueryString_Long("p")
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- If FSO.FolderExists(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&ZhangHao)) Then
- Set FS=FSO.GetFolder(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&ZhangHao))
- Set Files=FS.Files
- FileCount=Files.Count
- For Each File In Files
- If File.Name<>"U.Txt" Then
- AllFiles=AllFiles&"#x"&"kon.c"&"n#"&File.Name
- End If
- Next
- Set Files=Nothing
- If FileCount Mod Const_Page_Ys = 0 Then
- PageCount=FileCountConst_Page_Ys
- Else
- PageCount=FileCountConst_Page_Ys+1
- End If
- If p>PageCount Then
- P=1
- End If
- If AllFiles="" Then
- WenJian_LieBiao="没有找到任何文件<br/>"
- Else
- Dim JianJie,JianJie1,JianJie2
- Set JianJie=FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&Zi_ZhangHao&"/U.Txt"),1,False)
- If Not JianJie.AtEndOfStream Then
- JianJie1=Split(JianJie.ReadAll,"&xkon&")
- End If
- Set JianJie=Nothing
- WenJian=Split(AllFiles,"#xkon.cn#")
- For i=1 To Const_Page_Ys
- If (p-1)*Const_Page_Ys+i=FileCount Then Exit For
- JianJie2=Split(JianJie1((p-1)*Const_Page_Ys+i),"&xkon.cn&")
- WenJian_LieBiao=WenJian_LieBiao&WenJian((p-1)*Const_Page_Ys+i)&"<br/>简介:"&JianJie2(0)&"<br/><a href=""File/"&Read_SZ("Folder_ZiYuan")&"/"&ZhangHao&"/"&WenJian((p-1)*Const_Page_Ys+i)&""">下载</a>"
- If ZhangHao=Zi_ZhangHao Then
- WenJian_LieBiao=WenJian_LieBiao&"<a href=""WenJian.Asp?l=s&File="&Server.UrlEncode(WenJian((p-1)*Const_Page_Ys+i))&"{(xkon.cn)链接}"">删除</a>"
- End If
- WenJian_LieBiao=WenJian_LieBiao&"<br/>"
- Next
- WenJian_LieBiao=WenJian_LieBiao&Cpage(PageCount,p,"WenJian.Asp?ZhangHao="&ZhangHao&"{(xkon.cn)链接}&")
- End If
- Set FS=Nothing
- Else
- WenJian_LieBiao="没有找到任何文件<br/>"
- FSO.CreateFolder(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&ZhangHao))
- End If
- Set FSO=Nothing
- c.Write(xkon_FenXi(Replace(Replace(Replace(Read_Text("WenJian"),xkon_S("文件列表"),WenJian_LieBiao),xkon_S("资源数"),FileCount-1),xkon_S("文件数"),FileCount)))
- End Sub
- Private Sub j()
- c.Write(xkon_FenXi(Read_Text("WenJian;j")))
- End Sub
- Private Sub j2()
- If Read_SZ("YH_ShangChuan")="0" Then Call xkon_Error("禁止上传文件")
- Dim File,Upload,JianJie,GeShi,GeShi1,i,ShangChuan,J2_Name
- ShangChuan=False
- GeShi=Split(Read_SZ("ShangChuan_GeShi"),",")
- Set Upload=New Upload_5xsoft
- JianJie=Upload.Form("JianJie")
- Set File=Upload.File("File")
- If File.FileSize=0 Then Call xkon_Error("请先选择文件")
- If File.FileSize>CLng(Read_SZ("ShangChuan_DaXiao")) Then Call xkon_Error("文件太大")
- GeShi1=Split(File.FileName,".")
- For i=0 To UBound(GeShi)
- If Trim(GeShi1(UBound(GeShi1)))=GeShi(i) Then ShangChuan=True:Exit For
- Next
- If ShangChuan=False Then Call xkon_Error("不支持该格式")
- J2_Name=Year(Date)&Month(Date)&Day(Date)&Hour(Time)&Minute(Time)&Second(Time)&"."&GeShi1(UBound(GeShi1))
- File.SaveAs Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&Zi_ZhangHao&"/"&J2_Name)
- Set File=Nothing
- Set Upload=Nothing
- Dim FSO,FS
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- Set FS=FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&Zi_ZhangHao&"/U.Txt"),8,True)
- FS.Write("&xkon&"&JianJie&"&xkon.cn&"&J2_Name)
- FS.Close
- Set FS=Nothing
- Set FSO=Nothing
- c.Write(xkon_FenXi("上传成功<br/><a href=""WenJian.Asp?n={(xkon.cn)链接}"">返回我的文件</a>"))
- End Sub
- Private Sub Delete()
- Dim File,NeiRong,NeiRong1,NeiRong2,i
- File=s.QueryString("File")
- Dim FSO,FS
- Set FSO=Server.CreateObject("Scripting.FileSystemObject")
- If FSO.FileExists(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&Zi_ZhangHao&"/"&File)) Then
- Set FS=FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&Zi_ZhangHao&"/U.Txt"))
- NeiRong=FS.ReadAll
- FS.Close
- Set FS=Nothing
- NeiRong1=Split(NeiRong,"&xkon&")
- For i=1 To UBound(NeiRong1)
- NeiRong2=Split(NeiRong1(i),"&xkon.cn&")
- If NeiRong2(1)=File Then
- NeiRong=Replace(NeiRong,"&xkon&"&NeiRong1(i),""):Exit For
- End If
- Next
- Set FS=FSO.OpenTextFile(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&Zi_ZhangHao&"/U.Txt"),2,True)
- FS.Write(NeiRong)
- FS.Close
- Set FS=Nothing
- FSO.DeleteFile(Server.Mappath("File/"&Read_SZ("Folder_ZiYuan")&"/"&Zi_ZhangHao&"/"&File))
- End If
- Set FSO=Nothing
- c.Write(xkon_FenXi("删除成功<br/><a href=""WenJian.Asp?n={(xkon.cn)链接}"">返回我的文件</a>"))
- End Sub
- Call H_Title("我的文件")
- Dim l
- l=s.QueryString("l")
- Select Case l
- Case ""
- Call WenJianLieBiao()
- Case "j"
- Call j()
- Case "s"
- Call Delete()
- Case "j2"
- Call j2()
- End Select
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>