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

📄 editupfile.asp

📁 e灵通在线考试系统商业破解版
💻 ASP
字号:
<!--#include file="conn.asp"-->
 <!--#include FILE="upload_5xsoft.asp"-->

<%
  if session("adminname")="" then
  response.redirect "relogin.asp"
  end if
  
dim upload,file,formName,formPath,iCount,newname
set upload=new upload_5xSoft ''建立上传对象

  flag=upload.form("flag")
 tmid=upload.form("tmid")
  readno=upload.form("readno")
 %> 
<html>
<head>
<title>文件上传</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>

<center>
<form method="POST">
   

<%



formPath= "examimage/" 
for each formName in upload.file ''列出所有上传了的文件
 set file=upload.file(formName)  ''生成一个文件对象
 if file.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
 
   newname=year(date)&month(date)&day(date)&hour(time)&minute(time)&second(time)&file.FileName
  file.SaveAs Server.mappath(formPath&newname)   ''保存文件
  
 end if
 next
 set file=nothing

set upload=nothing  ''删除此对象

if flag=1 then

sql1="select * from tbread  where tmid="&tmid&" and readno="&readno
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2
rs1("pic")=newname
rs1.update

  response.redirect "admindatabaseeditread.asp?tmid="&tmid&"&readno="&readno
  
else

sql1="select * from tbtk  where tmid="&tmid&" "
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2
rs1("photo")=newname
rs1.update

  response.redirect "admindatabaseedit.asp?tmid="&tmid
end if

%></center></form> </body></html>

⌨️ 快捷键说明

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