<!-- #include file="conn.asp" -->
<%
ls1=Request.Cookies("CJ_ls")
ds1=Request.Cookies("CJ_ds")
%>
<%
CZ=request("B1")
if CZ="保存" then
t1=request("t1")'身份证
t2=request("t2")'姓名
t3=request("t3")'考生号
t4=request("t4")
t5=request("t5")'学校
d1=request("d1")
d2=request("d2")
d3=request("d3")
d5=request("d5")
tss=""
if len(t1)<>18 then
tss=tss&"身份证必须为18位</br>"
end if
if (len(t2)=0 or t2="请输入") then
tss=tss&"姓名不能空</br>"
end if
if len(t3)<11 then
tss=tss&"考生号为11或14位</br>"
end if
if len(t5)=0 or t5="请输入" then
tss=tss&"毕业学校必填"
end if
'Response.Write (len(tss)>0)&tss
'Response.end
《——--以下不执行》if len(tss)>0 then%>
<script language=javascript>
alert('<%=tss%>')
window.history.go(-1)
</script>
<%end if
sql="select * from ybm where sfz='"&t1&"'"
set rs=server.createobject("adodb.recordset")
rs.open SQL,conn,3,2
kk=rs.recordcount
if kk>0 then%>
<script language=javascript>
alert('本身份证号已登记!')
window.history.go(-1)
</script>
<%end if
sql="select * from ybm where bl='"&d1&"' and xx='"&d4&"' and lxr='"&ds1&"'"
set rs=server.createobject("adodb.recordset")
rs.open SQL,conn,3,2
k0=rs.recordcount
if k0>=30 then%>
<script language=javascript>
alert('本人此校报名超过30人!')
window.history.go(-1)
</script>
《+++-》<%end if
sql="insert into ybm(bsj,bl,xm,xb,sfz,ksh,xx,zy,dh,lx,lxr) values(#"&now()&"#,'"&d1&"','"&t2&"','"&d2&"','"&t1&"','"&t3&"','"&t5&"','"&d5&"','"&t4&"','"&d3&"','"&ds1&"')"
' sql="update ybm set bl='"&d1&"',sfz='"&t2&"'xm='"&t1&"',xb='"&d2&"',ksh='"&t3&"',xx='"&d4&"',zy='"&d5&"',dh='"&t4&"',lx='"&d3&"',lxr='"&ds1&"' where id="&ids1
conn.execute(sql)
response.redirect "cx.asp"
end if
if CZ="返回" then
response.redirect "main.asp"
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>A</title>
</head>
<body topmargin="0" leftmargin="0">
<form method="POST" action="ybm.asp">
<table border="1" width="1000" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td height="80" colspan="2" bgcolor="#000080">
<p align="center"><font size="6" color="#FFFF00"><b>预报名登记</b></font></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">报考类型</font></td>
<td height="80" width="597">
<select size="1" name="D1" style="font-size: 24pt" tabindex="1">
<option value="三年高职">三年高职</option>
<option value="五年高职">五年高职</option>
</select><font size="5" color="#800000">*</font></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">身份证号</font></td>
<td height="80" width="597">
<input type="text" name="T1" size="21" style="font-size: 24pt" maxlength="18" minlength="18" onblur="if(this.value.length==0){alert('必须输入内容');this.form.focus();}" onchange="if(this.value.length!=18){alert('长度必须是18位');}" onFocus="if(this.value=='请输入') this.value='';" value="请输入" tabindex="2"><font size="5" color="#800000">*要求18位</font></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">姓名</font></td>
<td height="80" width="597">
<input type="text" name="T2" size="8" style="font-size: 24pt" minlength="1" onblur="if(this.value.length==0){alert('姓名必须输入内容');}" onFocus="if(this.value=='请输入') this.value='';" value="请输入" tabindex="3"><font size="5" color="#800000">*要求不空</font></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">性别</font></td>
<td height="80" width="597">
<select size="1" name="D2" style="font-size: 24pt" tabindex="4">
<option value="男">男</option>
<option value="女">女</option>
</select></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">考生号</font></td>
<td height="80" width="597">
<input type="text" name="T3" size="14" style="font-size: 24pt" maxlength="14" minlength="11" onblur="if(this.value.length==0){alert('考生号必须输入内容');}" onchange="if(this.value.length<11|this.value.length>14){alert('考生号长度必须11-14位');}" onFocus="if(this.value=='请输入') this.value='';" value="请输入" tabindex="5"><font size="5" color="#800000">*11或14位</font></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">毕业学校</font></td>
<td height="80" width="597">
<font size="5" color="#FF0000">
<select size="1" name="D4" style="font-size: 24pt" onchange="document.getElementsByName('T5')[0].value=this.value" tabindex="6">
<option selected value="输入值">输入值</option>
<%sql="select * from jxb"
set rs=conn.execute(sql)
do while rs.eof=false%>
<option <%if jx1=rs("mc") then %>selected<%end if%> value="<%=rs("mc")%>"><%=rs("mc")%></option>
<%rs.movenext
loop
%>
</select></font><p>
<input type="text" name="T5" size="20" style="font-size: 24pt" minlength="1" onblur="if(this.value.length==0){alert('毕业学校必须输入');}" onFocus="if(this.value=='请输入') this.value='';" value="请输入" tabindex="7"><font size="5" color="#800000">*必
有内容</font></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">预报专业</font></td>
<td height="80" width="597">
<font size="5" color="#FF0000">
<select size="1" name="D5" style="font-size: 24pt" tabindex="8">
<%sql="select * from zyb"
set rs=conn.execute(sql)
do while rs.eof=false%>
<option <%if zy1=rs("mc") then %>selected<%end if%> value="<%=rs("mc")%>"><%=rs("mc")%></option>
<%rs.movenext
loop
%>
</select></font></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">学生电话</font></td>
<td height="80" width="597">
<input type="text" name="T4" size="14" style="font-size: 24pt" maxlength="11" value="请输入" onFocus="if(this.value=='请输入') this.value='';" tabindex="9"></td>
</tr>
<tr>
<td height="80" width="400" align="right"><font size="6">学生类型</font></td>
<td height="80" width="597">
<font size="5" color="#FF0000">
<select size="1" name="D3" style="font-size: 24pt" tabindex="10">
<option value="普通文科">普通文科</option>
<option value="普通理科">普通理科</option>
<option value="对口升学">对口升学</option>
</select>(三年高职填写)</font></td>
</tr>
<tr>
<td height="80" colspan="2" bgcolor="#008000">
<p align="center">
<input type="submit" value="保存" name="B1" style="font-size: 24pt">
<input type="submit" value="返回" name="B1" style="font-size: 24pt">
</td>
</tr>
</table>
</form>
</body>
</html>