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

📄 adduser1.asp

📁 我的课程设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<!--#include file="ADOFunctions.asp"-->
<!--#include file="inc/upload_5xsoft.inc" -->
<%
      Dim rs
      set upload=new upload_5xSoft
	  
	  set file=upload.file("file1")
	  uname=replace(trim(upload.Form("name")),"'","")
      ucard=replace(trim(upload.Form("card")),"'","")

      upsw=upload.Form("passwd")
      usex=upload.form("sex")
      udept=replace(trim(upload.Form("dept")),"'","")
      
      formPath="upload/"
      fname = ucard & "." & GetExtendName(file.FileName)
      file.SaveAs Server.mappath(formPath&fname)   ''保存文件
      if file.fileSize>0 then
	  Set rs=GetRecordset("BOOK.mdb","borrowers")
	  rs.Addnew 
	  rs("cardno")=ucard
	  rs("name")=uname
	  rs("dept")=udept
	  rs("sex")=usex
	  rs("psw")=upsw
      rs("picture")=fname
      rs.update
	  rs.close
	  set rs=nothing
	  set file=nothing
      set upload=nothing

      response.Redirect("adduser.asp")
	 
	  function GetExtendName(FileName)
      dim ExtName
      ExtName = LCase(FileName)
      ExtName = right(ExtName,3)
      ExtName = right(ExtName,3-Instr(ExtName,"."))
      GetExtendName = ExtName
      End function
      
	  end if
%>

⌨️ 快捷键说明

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