<!--#include virtual="noSQL.asp"-->
<!--#include file="../../SQLconn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>保存文件</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body  topmargin="5" leftmargin="5">

<p>
<%
Set Upload=Server.createobject("Persits.Upload.1") 
uploadlimitsize=0.3                          '改变这个设置可以改变上传文件的大小限制，单位兆。
Upload.SetMaxSize uploadlimitsize*1024*1024, True 
Upload.Save  
if err.number <> 0 then 
response.write  "出现错误: " & err.number & "、" & err.description &"" 
end if 
if err.number = 8 then 
response.write "<br><br><br><br><div align=""center"">保存数据失败!<br><br> 你上传的相片文件超过300K限制，请处理好相片再重新报名!<br><br>可以用画图工具截图，或者ＱＱ截图后保存等等方法把文件变小！</div>" 
response.end 
end if 


			xuexiao=Upload.Form("xuexiao").value
			banbie=Upload.Form("banbie").value
			xingming=Upload.Form("xingming").value
			xingbie=Upload.Form("xingbie").value
			shengri=Upload.Form("shengri").value
			shenfenzheng=Upload.Form("shenfenzheng").value
			xuejihao=Upload.Form("xuejihao").value
			techang=Upload.Form("techang").value
			hujidizhi=Upload.Form("hujidizhi").value
			xianzhudizhi=Upload.Form("xianzhudizhi").value			
			xuexi=Upload.Form("xuexi").value
			huojiang=Upload.Form("huojiang").value			
			
			xingming1=Upload.Form("xingming1").value
			guangxi1=Upload.Form("guangxi1").value
			danwei1=Upload.Form("danwei1").value
			dianhua1=Upload.Form("dianhua1").value
			
			xingming2=Upload.Form("xingming2").value
			guangxi2=Upload.Form("guangxi2").value
			danwei2=Upload.Form("danwei2").value
			dianhua2=Upload.Form("dianhua2").value
			
			mima=Upload.Form("mima").value
			
			 
			set FileObj1=Upload.Files("file1") 
			
			
			
					

			set RsSave=server.createobject("adodb.recordset")
			RsSavesql="select * from stuBaoMing where  身份证号码='"&shenfenzheng&"'" 			
			RsSave.open RsSavesql,conn,1,3
			if  RsSave.eof and  RsSave.bof then
						
					RsSave.addnew			
					RsSave("学校")=xuexiao
					RsSave("班别")=banbie
					RsSave("姓名")=xingming
					RsSave("性别")=xingbie
					RsSave("出生日期")=shengri
					RsSave("身份证号码")=shenfenzheng
					RsSave("学籍号")=xuejihao
					RsSave("特长")=techang
					RsSave("户籍地址")=hujidizhi
					RsSave("现住地址")=xianzhudizhi
					RsSave("学习情况")=xuexi			
					RsSave("获奖情况")=huojiang			 
								
					RsSave("监护人姓名1")=xingming1
					RsSave("监护人关系1")=guangxi1
					RsSave("监护人单位1")=danwei1
					RsSave("监护人电话1")=dianhua1
					
					RsSave("监护人姓名2")=xingming2
					RsSave("监护人关系2")=guangxi2
					RsSave("监护人单位2")=danwei2
					RsSave("监护人电话2")=dianhua2
					
					RsSave("密码")=mima
					
					RsSave("填报日期")=now()
					RsSave("填报IP")=Request.ServerVariables("REMOTE_ADDR")
					
					IF FileObj1.FileName<>"" THEN
					   RsSave("照片").appendchunk FileObj1.Binary
					end if   			 
					RsSave.update%>
					
					<br><br><br><br><br><br>
					<table width="50%" border="0" align="center" bgcolor="#E4F3F8" class="mtable">
					  <tr>
						<td height="222"><p>&nbsp;</p>
						<p>&nbsp;</p>
						<p>&nbsp;</p>
						<div align="center"><a href="Studentview.asp?shenfenzheng=<%=shenfenzheng%>&mima=<%=mima%>"  target="_self" class="STYLETITLE2">报名数据保存成功！查看我的报名情况</a></div>
						<p>&nbsp;</p>
						<p>&nbsp;</p>
						<p>&nbsp;</p></td>
					  </tr>
					</table>
					
					
					
			<%else%>
			
			
			<br><br><br><br><br><br><table width="50%" border="0" align="center" bgcolor="#E4F3F8" class="mtable">
  <tr>
    <td height="222"><p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <div align="center">您已经报过名，请不要重复报名，请<a href="StudentFind.asp" target="rightFrame" class="STYLE1">查看修改</a>！</div>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p></td>
  </tr>
</table>
			
			<%end if
		
     
		Upload.Dispose ' 释放内存 
		Set Upload = Nothing 
 
    '    response.redirect   "StudentView.asp?shenfenzheng="&shenfenzheng&"&mima="&mima
			%>



</body>  
  
</html>  




 