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

📄 resavemb.asp

📁 关于网络渗透技术的详细讲解
💻 ASP
字号:
<!--#include file=conn.asp-->
<% 
scfile=request("scfile")
mbid=request("mbid")
title=request("biaoti")
zyyear=request("zyyear")
zyid=request("zyid")
fp=request("fp")
%>
<!--#include FILE="inc.asp"-->
<%
  if session("username")="" then
  response.redirect "admin.asp"
  else
	if session("flag")<>1 then
		response.write "<br><p align=center>您没有操作的权限</p>"
		response.end
	end if
  end if


   dim sql
   dim rs
   dim founderr
   founderr=false
   on error resume next
   call conn_init()

set rs=server.CreateObject("adodb.recordset")
sql="select * from moban where id="&mbid
rs.open sql,conn,1,3
rs("filename")=title
rs("lbid")=zyid
rs("year")=zyyear
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
set upload=new upload_5xsoft
set file=upload.file("sf_file")
'--------------------------------------------------------------------
if scfile="" then
%>
<link rel="stylesheet" href="../style.css">
<title>完成</title>
<body bgcolor="#FFFFFF" text="#000000">
<table width="95%" border="0" align="center" cellpadding="5" height="167">
  <tr align="center" valign="middle"> 
    <td height="128"> 
      <p>你已经更新了第<%=mbid%>号模板文件的参数,<a href=mbfiles/<%=fp%>>下载</a></p>
      </td>
  </tr>
</table>
<%
response.end
else
upfilename = split(file.FileName,".")
upfileext = upfilename(ubound(upfilename))
'------------在下面设置上传文件类型,增加( and upfileext<>"文件类型" )----------
if upfileext<>"doc" and upfileext<>"xls" and upfileext<>"txt" and upfileext<>"DOC" and upfileext<>"XLS" and upfileext<>"TXT" then
	response.write "<br><br><br><br><br>错误:上传的文件格式不对! <a href='javascript:history.go(-1)'>退回上一步</a>"
	response.end
end if
if file.fileSize<1 then
   response.write"<script language=javascript>alert('您没有选择文件:\n\n-----请点击浏览按钮,从弹出的窗口中选择要上传的文件。\n\n-----然后点击上传按钮就可以把文件上传了。\n\n-----不过要注意上传文件的格式哦。');history.back()</script>"
   response.end 
end if
if file.fileSize<10 or file.fileSize>100*1024 then '-------修改默认的数值 100 单位(KB)-----
	response.write "<br><br><br><br><br>错误:上传的文件大小超过了限制! <a href='javascript:history.go(-1)'>退回上一步</a>"
	response.end
end if
file.saveas Server.mappath("mbfiles/"&fp)
set file=nothing
set upload=nothing
'------------------------------------------------------------------------------------------------------------------
%>
<link rel="stylesheet" href="../style.css">
<title>完成</title>
<body bgcolor="#FFFFFF" text="#000000">
<table width="95%" border="0" align="center" cellpadding="5" height="167">
  <tr align="center" valign="middle"> 
    <td height="128"> 
      <p>你已经成功覆盖了办税模板文件: "<%=title%>",<a href=mbfiles/<%=fp%>>下载</a></p>
      </td>
  </tr>
</table>
<%
end if
%>

⌨️ 快捷键说明

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