📄 checkuserl.asp
字号:
COLOR: #000000;
FONT-FAMILY: 宋体;
background-color: #ffffff;
SCROLLBAR-ARROW-COLOR: #FFffff;
SCROLLBAR-3DLIGHT-COLOR: #006633;
scrollbar-Base-Color: #006633;
SCROLLBAR-TRACK-COLOR: #FFF0E6;
}
-->
</STYLE>
</HEAD>
<BODY>
<%
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 函数名称:FileHeadTitle()
' 功能说明:整个软件通用的文件头的标题
' 创建时间:2003-07-31 12:04
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileHeadTitle()
%>
<script language="JavaScript">
function FileBackUp(FilePath)
{
if(confirm('你确信要备份 '+ FilePath+ ' 吗?'))
{ window.location = '<%=Url%>?action=FileBackUp&TestFilePath='+FilePath;}
else
{return false;}
}
function FileDelete(FilePath)
{
if(confirm('你确信要删除此文件吗?'))
{ window.location = '<%=Url%>?action=FileDelete&TestFilePath='+FilePath;}
else
{return false;}
}
function FolderDelete(FolderPath)
{
if(confirm('你确信要删除此文件夹吗?'))
{ window.location = '<%=Url%>?action=FolderDelete&TestFilePath='+FolderPath;}
else
{return false;}
}
</script>
<table border=0 width=700 cellspacing=1 cellpadding=2 align="center">
<tr align="center">
<td width="50"><strong><font color="#000000">[操作]</font></strong></td>
<td width="80">[<a href="<%=Url%>?action=main">系统信息</a>]</td>
<td width="80">[<a href="<%=Url%>?action=SupportObject">系统组件</a>]</td>
<td width="80">[<a href="<%=Url%>?action=Current">当前信息</a>]</td>
<td width="85"><strong>[系统驱动器]</strong></td>
<% Call systemDrive() %>
<td> </td>
</tr>
<tr align="center">
<td> </td>
<td>[<a href='###' onclick="window.open('<%=Url%>?action=BackUpDataBase','','width=500,height=250,left=100,top=100')">数据库备份</a>]</td>
<td>[<a href='###' onclick="window.open('<%=Url%>?action=ExecuteSql','','width=500,height=300,left=100,top=100')">执行 Sql</a>]</td>
<td>[<a href='<%=Url%>?action=Out'> 退 出 </a>]</td>
<td>[<a href="<%=Url%>?action=Search" target="_blank"> 搜 索 </a>]</td>
<td colspan="20"> </td>
</tr>
</table><br>
<%
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 函数名称:fileFooter()
' 功能说明:整个软件通用的文件尾
' 创建时间:2003-07-31 12:04
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub fileFooter()
%>
<table border=0 width=700 cellspacing=0 cellpadding=0 align="center">
</table>
</BODY>
</HTML>
<%
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 过程名称:FileNewCreate()
' 功能说明:新建文件
' 创建时间:2003-07-31 13:20
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileNewCreate()
Call fileHead()
If Not FSO.FolderExists(TestFilePath) Then
Response.Write("<script>alert('当前文件夹不存在,请重新选择!');history.back();</script>")
Response.End()
End If
tmpStr = ""
tmpStr = tmpStr & "<form action='"&Url&"?action=FileCopySave' name='form1' method='POST'>"
tmpStr = tmpStr & "<table border=0 width=480 cellspacing=1 cellpadding=2 align=center>"
tmpStr = tmpStr & "<th colspan=2>文件上传</th>"
tmpStr = tmpStr & "<tr><td width=120 align=right><strong>上传地址:</strong></td><td><input type=text value='"&TestFilePath&"' name='FileUploadPath' style=width:350px></td></tr>"
tmpStr = tmpStr & "<tr><td align=right><strong>文件名字:</strong></td><td><input type=text value='' name=uploadfile style=width:350px></td></tr>"
tmpStr = tmpStr & "<tr><td colspan=2 align=center><input type=submit value='上传'> <input type=reset value='重设'> <input type=button value='关闭' onclick='javascript:window.close();'></td></tr></table></form>"
Response.Write tmpStr
Response.End
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 过程名称:FileCopy()
' 功能说明:文件的拷贝
' 创建时间:2003-07-31 13:20
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileCopy()
Call fileHead()
If Not FSO.FileExists(TestFilePath) Then
StrErr = StrErr & "指定的文件不存在,请刷新页面重试!\n"
End If
CheckStrErr()
Set File = FSO.GetFile(TestFilePath)
ParentFolder = File.ParentFolder
tmpStr = ""
tmpStr = tmpStr & "<form action='"&Url&"?action=FileCopySave' name='form1' method='POST'>"
tmpStr = tmpStr & "<table border=0 width=480 cellspacing=1 cellpadding=2 align=center>"
tmpStr = tmpStr & "<th colspan=2>文件复制</th>"
tmpStr = tmpStr & "<tr><td width=100 align=right><strong>目标地址:</strong></td><td><input type=text value='"&ParentFolder&"' name=uploadAdd style=width:350px></td></tr>"
tmpStr = tmpStr & "<tr><td align=right><strong>复制的文件:</strong></td><td><input type=text value='"&TestFilePath&"' name=uploadfile style=width:350px></td></tr>"
tmpStr = tmpStr & "<tr><td colspan=2 align=center><input type=submit value='拷贝'> "
tmpStr = tmpStr & "<input type=reset value='重设'> <input type=button value='关闭' onclick='javascript:window.close();'></td></tr></table></form>"
Response.Write tmpStr
Response.End
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 过程名称:FileCopySave()
' 功能说明:文件拷贝的保存
' 创建时间:2003-07-31 13:20
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileCopySave()
Dim uploadAdd,uploadfile
uploadAdd = Trim(Request.Form("uploadAdd"))
uploadfile = Trim(Request.Form("uploadfile"))
If Len(uploadAdd) <= 0 Then
StrErr = StrErr & "请输入要复制到的目标地址!\n"
End If
If Len(uploadfile) <= 0 Then
StrErr = StrErr & "请输入要复制的文件!\n"
End If
If Not FSO.FolderExists(uploadAdd) Then
StrErr = StrErr & "复制的目标地址不存在,请重新选择!\n"
End If
If Not FSO.FileExists(uploadfile) Then
StrErr = StrErr & "要复制的文件不存在,请重新选择!\n"
End If
CheckStrErr()
Set File = FSO.GetFile(uploadfile)
If FSO.FileExists(uploadAdd&"\"&File.Name) Then
Response.Write "<script>"
Response.Write " if(confirm('您要复制的文件在目标地址已经存在,请确认是否替换?'))"
Response.Write " window.location = '"&Url&"?action=FileCopySaveQuery&FileCopySaveOver=1&TestFilePath="&Replace(uploadfile,"\","/")&"&FileCopyToPath="&Replace(uploadAdd,"\","/")&"';"
Response.Write " else "
Response.Write " window.location = '"&Url&"?action=FileCopySaveQuery&FileCopySaveOver=0&TestFilePath="&Replace(uploadfile,"\","/")&"&FileCopyToPath="&Replace(uploadAdd,"\","/")&"';"
Response.Write "</script>"
Response.End
End If
File.Copy (uploadAdd&"\"&File.Name)
Response.Write("<script>")
Response.Write("alert('"&File.Name&"文件拷贝成功,请刷新页面查看!');window.close();</script>")
Response.End
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 过程名称:FileCopySaveQuery()
' 功能说明:文件的复制的判断
' 创建时间:2003-07-31 13:20
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileCopySaveQuery()
Dim FileCopySaveOver,FileCopyToPath
FileCopySaveOver = Trim(Request.QueryString("FileCopySaveOver"))
FileCopyToPath = Trim(Request.QueryString("FileCopyToPath"))
FileCopyToPath = Replace(FileCopyToPath,"/","\")
If (Len(TestFilePath) <= 0) or (Len(FileCopyToPath) <= 0) Then
StrErr = "系统出现了未知的错误,请重新执行!\n"
End If
If (Not FSO.FileExists(TestFilePath)) or (Not FSO.FolderExists(FileCopyToPath)) Then
StrErr = "系统出现了未知的错误,请重新执行!\n"
End If
CheckStrErr()
If FileCopySaveOver = "1" Then
Set File = FSO.GetFile(TestFilePath)
File.Copy (FileCopyToPath&"\"&File.Name)
tmpStr = "<script>alert('文件拷贝成功,请刷新页面查看!');window.close();</script>"
Else
tmpStr = "<script>history.go(-2);</script>"
End If
Response.Write tmpStr
Response.End
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 过程名称:FileUpload()
' 功能说明:文件上传
' 创建时间:2003-07-31 13:20
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileUpload()
Call fileHead()
If Not FSO.FolderExists(TestFilePath) Then
StrErr = StrErr & "指定的目录不存在,请刷新页面重试!\n"
End If
CheckStrErr()
tmpStr = ""
tmpStr = tmpStr & "<form action='"&Url&"?action=FileUploadSave' name='form1' method='POST' enctype='multipart/form-data'>"
tmpStr = tmpStr & "<table border=0 width=480 cellspacing=1 cellpadding=2 align=center>"
tmpStr = tmpStr & "<th colspan=2>文件上传</th>"
tmpStr = tmpStr & "<tr><td width=100 align=right><strong>上传地址:</strong></td><td><input type=text value='"&TestFilePath&"' name='FileUploadPath' style=width:350px></td></tr>"
tmpStr = tmpStr & "<tr><td align=right><strong>上传文件:</strong></td><td><input type=file value='' name='FileUploadName' style=width:350px></td></tr>"
tmpStr = tmpStr & "<tr><td colspan=2 align=center><input type=submit value='上传'> "
tmpStr = tmpStr & "<input type=reset value='重设'> <input type=button value='关闭' onclick='javascript:window.close();'></td></tr></table></form>"
Response.Write tmpStr
Response.End
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 过程名称:FileUploadSave()
' 功能说明:文件上传保存
' 创建时间:2003-07-31 13:20
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileUploadSave()
Dim FileUploadPath,uploadfile,objUpload,FileName,FileNameBackUp
Dim tmpState
Set objUpload = New upload_5xsoft
FileUploadPath = Trim(objUpload.Form("FileUploadPath"))
If Len(FileUploadPath) <= 0 Then
StrErr = "请填写文件上传的目标地址!\n"
End If
If Not FSO.FolderExists(FileUploadPath) Then
StrErr = StrErr & "您访问的目录不存在,请重新选择!\n"
End If
Set File = objUpload.File("FileUploadName")
FileName = File.FileName
If Len(FileName) <= 0 Then
StrErr = StrErr & "请先选择文件之后再上传!\n"
End If
If File.FileSize <= 0 Then
StrErr = StrErr & "您上传的文件的大小小于0,不能上传,请重新选择!\n"
End If
CheckStrErr()
tmpStr = Right(FileName,(Len(FileName) - Instr(1, FileName, ".", 0)))
tmpState = 0
For i = 0 To Ubound(FileUploadExt)
If LCase(FileUploadExt(i)) = LCase(tmpStr) Then
tmpState = 1
Exit For
End If
Next
If tmpState = 0 Then
Response.Write "<script>alert('您上传的文件类型不在系统允许的 \n 范围内,请重新选择文件!');history.back();</script>"
Response.End
End If
If FSO.FileExists(FileUploadPath&"\"&FileName) Then
FileNameBackUp = Replace(FileName,"."&tmpStr,"."&FileBackUpExt)
File.SaveAs FileUploadPath&"\"&FileNameBackUp
Response.Write "<script>"
Response.Write " if(confirm('您上传的文件已经存在,请确认是否替换?'))"
Response.Write " window.location = '"&Url&"?action=FileUploadSaveQuery&FileUploadSaveOver=1&TestFilePath="&Replace(FileUploadPath&"\"&FileNameBackUp,"\","/")&"&OldFilePath="&Replace(FileUploadPath&"\"&FileName,"\","/")&"';"
Response.Write " else "
Response.Write " window.location = '"&Url&"?action=FileUploadSaveQuery&FileUploadSaveOver=0&TestFilePath="&Replace(FileUploadPath&"\"&FileNameBackUp,"\","/")&"&OldFilePath="&Replace(FileUploadPath&"\"&FileName,"\","/")&"';"
Response.Write "</script>"
Response.End
End If
File.SaveAs FileUploadPath&"\"&FileName
Response.Write("<script>")
Response.Write("alert('"&FileName&"文件上传成功,请刷新页面查看!');window.close();</script>")
Response.End
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 过程名称:FileUploadSaveQuery()
' 功能说明:判断用的选择,有关上传文件的。
' 创建时间:2003-07-31 13:20
' 修改时间:2003-07-31 13:20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub FileUploadSaveQuery()
Dim FileUploadSaveOver,OldFilePath
FileUploadSaveOver = Trim(Request.QueryString("FileUploadSaveOver"))
OldFilePath = Trim(Request.QueryString("OldFilePath"))
OldFilePath = Replace(OldFilePath,"/","\")
If (Len(TestFilePath) <= 0) or (Len(OldFilePath) <= 0) Then
StrErr = "系统出现了未知的错误,请重新执行!\n"
End If
If (Not FSO.FileExists(TestFilePath)) or (Not FSO.FileExists(OldFilePath)) Then
StrErr = "系统出现了未知的错误,请重新执行!\n"
End If
CheckStrErr()
Set File = FSO.GetFile(TestFilePath)
If FileUploadSaveOver = "1" Then
tmpStr = Right(OldFilePath,(Len(OldFilePath) - Instr(1, OldFilePath, ".", 0)))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -