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

📄 update_jkz.asp

📁 这是一个很好的图书管理借阅登记系统,有这爱好的可以下载下来看看,很完整的
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'----------------------------------------------------------
'***************** 风声无组件上传类 2.11 *****************
'速度测试
'本程序将保存您上传的文件,并记录上传速度及相关信息<br />
'上传速度主要由网速决定,测试结果仅供参考<br />
'该例以 gb2312(类默认,无须显示设置)字符集测试
'下面是上传程序(upload.asp)的代码和注释
'**********************************************************
'---------------------------------------------------------- 
OPTION EXPLICIT
Server.ScriptTimeOut=5000
%>
<!--#include file="conn.asp"-->
<!--#include file="UpLoadClass.asp"-->
<!--#include file="Code2Info.sc.asp"-->
<%
'dim nTime : nTime = Timer()
dim myrequest,lngUpSize,Lou_number,Lours,L_id
Set myrequest=new UpLoadClass
	myrequest.MaxSize  = 5000*1024
	myrequest.FileType = "gif/jpg/"
	myrequest.Savepath = "UpLoadFile/"
	lngUpSize = myrequest.Open()
	Lou_number = myrequest.Form("LouHB_number")
	L_id = myrequest.Form("LouHB_id")
	
	if myrequest.Form("LouHB_number")="" or myrequest.Form("LouHB_name")="" or myrequest.Form("LouHB_sex")="" or myrequest.Form("LouHB_year")="" or myrequest.Form("LouHB_type")="" then
	response.write "<script language=JavaScript>" & chr(13) & "alert('编号、姓名、年龄等必须填写完整!');" & "history.back()" & "</script>" 
	Response.End
	end if
	
	dim LouHBsql,Louconn
	set Louconn=Server.CreateObject("ADODB.Connection")
	Louconn.Open strDconn
	LouHBsql="select L_number from LHB_Office_JKZ where L_number='"&Lou_number&"' and id <> '"&L_id&"'"
	set Lours=Louconn.execute(LouHBsql)
	if not Lours.eof then
	Lours.close
	response.write "<script language=JavaScript>" & chr(13) & "alert('对不起,您录入健康证号码已经存在,请仔细核对!');" & "history.back()" & "</script>"
	response.End
	end if
%>
<%if session("LHB_MiMa")<>"" then%>
<!--#include file="LHB_head.asp"-->
<table width="768" border="0" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td width="754" valign="top"><!--#include file="LHB_DHT_01.asp"--></td>
  </tr>
</table>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" class="table4">
  <tr>
    <td height="30"><!--#include file="LHB_DHT_02.asp"--></td>
  </tr>
</table>
<br>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" class="table4">
	<%
	'Response.Write("<p>程序版本:"&myrequest.Version&"</p>")
	'Response.Write("<p id=""Title"">字 符 集:"&myrequest.Charset&"</p>")
	
	dim strFile1 : strFile1=myrequest.Form("Photo")
	dim intError : intError=myrequest.Form("photo_Err")
	dim lngSize1 : lngSize1=0
	'Response.Write("<p><strong>上传文件 1 信息</strong>")
	if intError>=0 then
		Response.Write "<tr><th colspan=2 align=center><img src='"&myrequest.Savepath&strFile1&"'></th></tr>"
		'Response.Write "<br />类 型:"&myrequest.Form("Photo_Type")
		'Response.Write "<br />源文件:"&myrequest.Form("Photo_Name")
		'Response.Write "<br />宽×高:"&myrequest.Form("photo_Width")&"×"&myrequest.Form("photo_Height")
		lngSize1=myrequest.Form("photo_Size")
		if intError>0 then strFile1="Err:"&intError&"/"&myrequest.Form("photo_Name")
		'Response.Write "<br />大 小:"&lngSize1&" Bytes"
		'Response.Write "<br />源路径:"&myrequest.Form("photo_Path")
		'Response.Write "<br />扩展名:"&myrequest.Form("photo_Ext")
	end if
	'Response.Write "<br />"&Err2Info(myrequest.Form("photo_Err"))
	'Response.Write("</p>")
	
	dim strFile2 : strFile2=myrequest.Form("Photo2")
	intError=myrequest.Form("photo2_Err")
	dim lngSize2 : lngSize2=0
	'Response.Write("<p><strong>上传文件 2 信息</strong>")
	if intError>=0 then
		Response.Write "<tr><th colspan=2 align=center><img src='"&myrequest.Savepath&strFile2&"'></th></tr>"
		'Response.Write "<br />文件名:<a href='"&myrequest.Savepath&strFile2&"' target='_blank'>"&strFile2&"</a>"
		'Response.Write "<br />类 型:"&myrequest.Form("Photo2_Type")
		'Response.Write "<br />源文件:"&myrequest.Form("Photo2_Name")
		'Response.Write "<br />宽×高:"&myrequest.Form("photo2_Width")&"×"&myrequest.Form("photo2_Height")
		lngSize2=myrequest.Form("photo2_Size")
		if intError>0 then strFile2="Err:"&intError&"/"&myrequest.Form("photo2_Name")
		'Response.Write "<br />大 小:"&lngSize2&" Bytes"
		'Response.Write "<br />源路径:"&myrequest.Form("photo2_Path")
		'Response.Write "<br />扩展名:"&myrequest.Form("photo2_Ext")
	end if
	'Response.Write "<br />"&Err2Info(myrequest.Form("photo2_Err"))
	'Response.Write("</p>")
	
	dim L_strFile1 : L_strFile1=replace(replace(left(myrequest.Form("LouHB_strFile1"),100),"|","["),"|","]")
	 '用于接受modify页input传送的值
	dim L_strFile2 : L_strFile2=replace(replace(left(myrequest.Form("LouHB_strFile2"),100),"|","["),"|","]")
	 '用于接受modify页input传送的值
	dim LouID : LouID=replace(replace(left(myrequest.Form("LouHB_id"),100),"|","["),"|","]")
	 '用于接受modify页id值
	dim L_number : L_number=replace(replace(left(myrequest.Form("LouHB_number"),8),"<","["),">","]")
	dim L_name : L_name=replace(replace(left(myrequest.Form("LouHB_name"),8),"<","["),">","]")
	Response.Write "<tr><td align=right>姓名:</td><td>"&L_name&"</td></tr>"
	dim L_sex : L_sex=replace(replace(left(myrequest.Form("LouHB_sex"),30),"<","["),">","]")
	dim L_year : L_year=replace(replace(left(myrequest.Form("LouHB_year"),30),"<","["),">","]")
	Response.Write "<tr><td align=right>年龄:</td><td>"&L_year&"</td></tr>"
	dim L_type : L_type=replace(replace(left(myrequest.Form("LouHB_type"),30),"<","["),">","]")
	dim L_end : L_end=replace(replace(left(myrequest.Form("LouHB_end"),30),"<","["),">","]")
	dim L_HIV : L_HIV=replace(replace(left(myrequest.Form("LouHB_HIV"),30),"<","["),">","]")
	dim L_check_year : L_check_year=replace(replace(left(myrequest.Form("LouHB_check_year"),30),"<","["),">","]")
	dim L_check_month : L_check_month=replace(replace(left(myrequest.Form("LouHB_check_month"),30),"<","["),">","]")
	dim L_check_day : L_check_day=replace(replace(left(myrequest.Form("LouHB_check_day"),30),"<","["),">","]")
	Response.Write "<tr><td align=right>体检日期:</td><td>"&L_check_year&"年"&L_check_month&"月"&L_check_day&"日</td></tr>"
	dim L_start_year : L_start_year=replace(replace(left(myrequest.Form("LouHB_start_year"),30),"<","["),">","]")
	dim L_start_month : L_start_month=replace(replace(left(myrequest.Form("LouHB_start_month"),30),"<","["),">","]")
	dim L_start_day : L_start_day=replace(replace(left(myrequest.Form("LouHB_start_day"),30),"<","["),">","]")
	Response.Write "<tr><td align=right>发证日期:</td><td>"&L_start_year&"年"&L_start_month&"月"&L_start_day&"日</td></tr>"
	dim L_work_name : L_work_name=replace(replace(left(myrequest.Form("LouHB_work_name"),30),"<","["),">","]")
	Response.Write "<tr><td align=right>制证人姓名:</td><td>"&L_work_name&"</td></tr>"
	dim L_BZ : L_BZ=replace(replace(left(myrequest.Form("LouHB_BZ"),30),"<","["),">","]")
	Response.Write "<tr><td align=right>备注:</td><td>"&L_BZ&"</td></tr>"
	
	Response.Write "<p>"&Error2Info(myrequest.Error)&"</p>"
	dim L_Error : L_Error = myrequest.Error
	if L_Error > 0 then
	Response.End
	end if
	
	Set myrequest=nothing
	
'	nTime = Timer()-nTime
'	dim dblTime : dblTime=FormatNumber(nTime,3)
	'Response.Write "<p>上传用时:"&dblTime&" s</p>"
	Response.Write("<tr><td  align=center><a class=5 href='index.asp'>[返回首页]</a></td><td align=center><a href=LHB_jkz.asp?id="&L_id&" target=_blank>打印健康证</a></td></tr>")
	
	' 上传处理完成
	' 开始数据库处理

	'dim lngFileSize : lngFileSize = lngSize1+lngSize2
	'if lngFileSize>0 then
		'Response.Write "<p>平均上传速率:"
	'	dim dblSpeed : dblSpeed = -1
		'if nTime>0 then dblSpeed=FormatNumber(lngFileSize/(1024*nTime),3)
		'这里用lngUpSize更合理,lngUpSize由Open返回
		'if nTime>0 then dblSpeed=FormatNumber(lngUpSize/(1024*nTime),3)
		'Response.Write dblSpeed&" k/s</p>"
		if strFile1  ="" then strFile1= L_strFile1
		if strFile2  ="" then strFile2= L_strFile2
		dim strIp : strIp=GetIp()
	
       dim conn,sql
       set conn=Server.CreateObject("ADODB.Connection")
       conn.Open strDconn
       
sql="update LHB_Office_JKZ set L_number='"&L_number&"',L_name='"&L_name&"',L_sex='"&L_sex&"',L_year='"&L_year&"',L_type='"&L_type&"',L_end='"&L_end&"',L_HIV='"&L_HIV&"',L_check_year='"&L_check_year&"',L_check_month='"&L_check_month&"',L_check_day='"&L_check_day&"',L_start_year='"&L_start_year&"',L_start_month='"&L_start_month&"',L_start_day='"&L_start_day&"',L_work_name='"&L_work_name&"',L_BZ='"&L_BZ&"',strFile1='"&strFile1&"',strSize1='"&lngSize1&"',strFile2='"&strFile2&"',strSize2='"&lngSize2&"',strIp='"&strIp&"' where id="&LouID
'response.write sql
'response.end
		conn.Execute(sql)
		conn.Close()
		set conn=nothing	
	'end if
	%>
<!--#include file="LHB_copy.asp"-->

<%else
Response.Redirect "login.asp"
end if%>

⌨️ 快捷键说明

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