?? adduser1.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 + -