Recommended: ASP implements addition and subtraction operations in SQL statement date format I encountered a problem at work today, and I needed to query by time, but the query results were displayed incorrectly. For example, to find out the members registered on the website between 2007-10-12 and 2007-10-31, after selecting the date, click "Query &r
Asp implements rar compression and decompression source code, and can be done with just one file. Asp compresses directories or files, decompresses rar files, deletes specific files and other functions. This source code is convenient for everyone to develop and share.
Here is the winrar.asp code:
| The following is the quoted content: <!-- Name - Ayan Online Winrar Plugin copyright - Beiguo Pharmaceutical Garden BBS (www.spubbs.com) created - 2006/5/17 author - Ayan:[email protected] QQ:12895551 --> <%@LANGUAGE=VBSCRIPT CODEPAGE=936%> <title>Welcome to Ayan Online Winrar Plugin</title> <body> <TABLE border=0 width=80% align=center cellpacing=1 cellpadding=3 style=FONT-FAMILY: Verdana;font-size:14px;BORDER: #000000 1px solid;background-color:#f7f7f7> <tr> <th width=100% height=24 bgcolor=#e4e4e4><strong><font color=#FF0000>Ayan Online Winrar Plugin</font></strong>Latest update time 2006.5.17 [<a href=http://www.spubbs.com/dispbbs.asp?boardid=24&id=19979 target=_blank>Support Page</a>] </th> </tr> <tr> <td> <% Server.ScriptTimeout=99999 Dim winrar,cmddir Winrar=C:/Program Files/WinRAR/Winrar.exe 'Path of Winrar.exeProgra~1. cmddir=%windir%/system32/cmd.exe 'cmd.exe' path to cmd.exe user=spubbs.com 'Username pwd=spubbs.com 'Login, compress, decompress password, for security reasons, please set this password strong enough if request.Form(user)=user and request.Form(pwd)=pwd then response.write This folder path: &Server.Mappath(.)&<br> from=request.Form(from) where=request.Form(where) if from<> and where<> then Dim a,b,Shell,Runing,Runcode,Cmd if instr(where,:)=0 then a=Server.mappath(&where&) else a=where if instr(from,:)=0 then b=Server.mappath(&from&) else b=from 'response.Write b if right(b,1)<>/ and left(right(b,4),1)<>. then b=b&.rar On Error Resume Next Set Shell = Server.CreateObject(WScript.Shell) if request.QueryString(action)=1 then 'Decompress if not ReportFileStatus(b)then Response.Write(b& does not exist!):Response.End() Runing= cmddir& /c &winrar& x -ibck -t -y -o -p&pwd& 'Set the command to run the decompression. Cmd=Runing&b& &a&/ elseif request.QueryString(action)=0 then 'Compression if (not ReportFileStatus(a)) and (not ReportFolderStatus(a)) then Response.Write(a& does not exist!):Response.End() Cmd= cmddir& /c del /f /q &b Runcode = Shell.Run(Cmd,1,True) Runing= cmddir& /c &winrar& a -ibck -y -ep -o -p&pwd& 'Compression. Cmd=Runing&b& &a else 'Delete the file Cmd= cmddir& /c del /f /q &b end if Runcode = Shell.Run(Cmd,1,True) Runing = Shell.Run(cmddir& /c taskkill /im winrar.exe,1,false) Runing = Shell.Run(cmddir& /c exit,1,false) Set Shell=nothing ErrInfo %> <%else%> <form name=frm method=post action=?action=1 style=BORDER: #d9d9d9 1px solid;background-color:#f7f7f7> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <br> <br> Please enter the rar file address: <input name=from value=1.rar size=50><br> Unzip to: <input name=where value=. size=50> Please use the absolute path to the folder and add / <br> at the end <br> <input name=submit type=submit value= decompression><input type=hidden name=user value=<%=request.Form(user)%>> <input type=hidden name=pwd value=<%=request.Form(pwd)%>></FORM> <form name=frm method=post action=?action=0 style=BORDER: #d9d9d9 1px solid;background-color:#f7f7f7> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <br> Please enter the file address to compress: <input name=where value=./data/dvbbs7#.mdb size=50> Folders are also available<br> <br> Storage path and new file name: <input name=from value=../data/1.rar size=50> Automatically overwrite file with the same name<br> <br> <input name=submit type=submit value= Compression><input type=hidden name=user value=<%=request.Form(user)%>> <input type=hidden name=pwd value=<%=request.Form(pwd)%>></FORM> <% ErrInfo end if else login() end if Sub ErrInfo if not isempty(Runcode) and Runcode=0 Then Response.Write (the command was executed successfully, the command you submitted is as follows: <br>& Cmd) elseif not isempty(Runcode) then Response.Write (Command execution failed! There is insufficient permission or the program cannot run in DOS state. The command you submitted is as follows: <br> & Cmd) else end if If Err Then Response.Write <br>&err.description err.Clear End If %> <form name=frm method=post action=?action=2 style=BORDER: #d9d9d9 1px solid;background-color:#f7f7f7> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <br> Please enter the address to delete the file: <input name=from size=50 value=<%=from%>> Please use the absolute path to the folder and add / <br> at the end <input type=hidden name=where value=<%if where<> then response.Write where else response.Write .%>> <br> <input name=submit type=submit value=Delete> <input type=hidden name=user value=<%=request.Form(user)%>> <input type=hidden name=pwd value=<%=request.Form(pwd)%>> </FORM> <br> <% End Sub Function ReportFileStatus(filespec) Dim fso Set fso = CreateObject(Scripting.FileSystemObject) ReportFileStatus=false If (fso.FileExists(filespec)) Then ReportFileStatus = true Set fso = nothing End Function Function ReportFolderStatus(fldr) Dim fso Set fso = CreateObject(Scripting.FileSystemObject) ReportFolderStatus=false If (fso.FolderExists(fldr)) Then ReportFolderStatus = true Set fso = nothing End Function Sub login() %> <form name=frm method=post action=?action=2 style=BORDER: #d9d9d9 1px solid;background-color:#f7f7f7> <p>-------------------------------------------<strong>Login System</strong>-------------------------------------------------------<br> <br> username: <input name=user value=spubbs.com> </p> password: <input name=pwd type=password id=pwd> <br> <br> <input name=submit type=submit value=Login> </FORM> <%End sub%> </td> </tr> <tr> <td height=22 align=center bgcolor=#e8e8e8>Powered By: <a href = mailto:[email protected]>Ayan</a> <a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=12895551&Site=www.spubbs.com Online winrar&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:12895551:3 alt=Send an instant message to Ayan QQ:12895551 align=absbottom></a> Copyright ©2003 - 2006 <a href=http://www.spubbs.com>Beiguo Pharmaceutical Garden BBS</a></td> </tr> </table> </body> |
Share: How to improve the speed of access to Asp programs When using an asp program for web page design, it is mostly because you need to access the database and then display the data to the page. If there is a lot of data, the access speed of the page will slow down. In order to solve this problem, you can use the following techniques to improve the access speed of the page. Skills