?? index.asp
字號(hào):
<%
'#############################################
'## 中國(guó)居民身份證驗(yàn)證查詢系統(tǒng) ##
'## ----------------------------------------##
'## 程序編寫:海 豹 ##
'## 作者QQ:103201165 ##
'## 網(wǎng)站:http://www.sz800.com ##
'## 程序演示:http://www.sz800.com/sfz ##
'#############################################
%>
<!-- #include file=conn.asp-->
<link type="text/css" rel="stylesheet" href="../images/css.css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style3 {
color: #FFFFFF;
font-weight: bold;
}
.style5 {color: #FFFFFF}
.style6 {color: #000000}
-->
</style>
<table width=760 align=center bgcolor="#6AC4FF" >
<tr>
<td align=left valign="top">
歡迎訪問:<a href=http://www.sz800.com>深圳800信息網(wǎng)</a><br>
<form action="index.asp" name=form1 method=post>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="37%" height="30" valign="middle" align=center>身份證號(hào)碼:
<input name=xian size=18 type=text>
<input name=submit type=submit value="快速查詢"></td>
</tr>
</table>
</form>
</td></tr>
</table>
<table align=center border="0" cellpadding="3" cellspacing="1" width="300" align=center bgcolor="#0099FF">
<%
xian=request("xian")
lenx=len(xian)
if xian<>"" then
if not IsNumeric(left(xian,15)) and xian<>"" then
response.write "<script>alert('請(qǐng)輸入正確身份證號(hào)碼!');window.history.back();</script>"
end if
if lenx=15 or lenx=18 then
if lenx=15 then
yy="19"&mid(xian,7,2)
mm=mid(xian,9,2)
dd=mid(xian,11,2)
aa=mid(xian,15,1)
end if
if lenx=18 then
yy=mid(xian,7,4)
mm=mid(xian,11,2)
dd=mid(xian,13,2)
aa=mid(xian,17,1)
end if
if cint(mm)>12 or cint(dd)>31 then
response.write "<script>alert('請(qǐng)輸入正確的身份證號(hào)碼!');window.history.back();</script>"
end if
else
response.write "<script>alert('請(qǐng)輸入正確的身份證號(hào)碼!');window.history.back();</script>"
end if
set rs=server.createobject("adodb.recordset")
sql="select * from sfz where bm="&left(xian,6)
rs.open sql,conn,3,3
if not rs.eof then
%>
<%
if aa mod 2=0 then
xb="女"
else
xb="男"
end if
%>
<tr><td bgcolor=ffffff>
查詢號(hào)碼:<%=xian%></td></tr><td bgcolor=ffffff>
原戶籍地:<%=rs("dq")%><br></td></tr><td bgcolor=ffffff>
出生年月:<%=yy&"年"&mm&"月"&dd&"日"%><br></td></tr><td bgcolor=ffffff>
性 別:<%=xb%>
<%
if lenx=18 then
if mid(xian,18,1)<>cstr(sfzjy(xian)) then
response.write "</td></tr><td bgcolor=ffffff>"
response.write "提示:身份證校驗(yàn)位錯(cuò)誤!"
else
response.write "</td></tr><td bgcolor=ffffff>"
response.write "結(jié)果:身份證號(hào)碼校驗(yàn)為合法號(hào)碼!"
end if
else
response.write "</td></tr><td bgcolor=ffffff>"
response.write "新身份證:"&left(xian,6)&"19"&right(xian,9)&cstr(sfzjy(xian))
end if
%>
</td>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
FUNCTION sfzjy(num)
if len(num)=15 then
cID = left(num,6)&"19"&right(num,9)
elseif len(num)=17 or len(num)=18 then
cID = left(num,17)
end if
nSum=mid(cID,1,1) * 7
nSum=nsum+mid(cID,2,1) * 9
nSum=nsum+mid(cID,3,1) * 10
nSum=nsum+mid(cID,4,1) * 5
nSum=nsum+mid(cID,5,1) * 8
nSum=nsum+mid(cID,6,1) * 4
nSum=nsum+mid(cID,7,1) * 2
nSum=nsum+mid(cID,8,1) * 1
nSum=nsum+mid(cID,9,1) * 6
nSum=nsum+mid(cID,10,1) * 3
nSum=nsum+mid(cID,11,1) * 7
nSum=nsum+mid(cID,12,1) * 9
nSum=nsum+mid(cID,13,1) * 10
nSum=nsum+mid(cID,14,1) * 5
nSum=nsum+mid(cID,15,1) * 8
nSum=nsum+mid(cID,16,1) * 4
nSum=nsum+mid(cID,17,1) * 2
'*計(jì)算校驗(yàn)位
check_number=12-nsum mod 11
If check_number=10 then
check_number="X"
elseIf check_number=12 then
check_number="1"
elseif check_number=11 then
check_number="0"
End if
sfzjy=check_number
End function
%>
</tr>
</table>
<br>
<center>
<hr width=760>
<SPAN class=chn><a href="../ad/adsz800.htm"><font color="#FF0000">廣告服務(wù)</font></a>---<a href="../iereplace.htm" target="_blank">修復(fù)IE</a>---<a href="../fenleiad.htm">深圳160黃頁(yè)信息</a>---<a href="http://www.szcredit.com.cn" target="_blank">深圳企業(yè)信用查詢</a>---<a href="../lianxi/lianxi01.htm">聯(lián)系我們</a><br>
<br>
深圳匯深網(wǎng)信息科技有限公司 版權(quán)所有 2004-2005 <font color="#000000"><a href="../icp.htm">ICP證:粵B2-20040803</a></font>
</SPAN>
</center>
</BODY>
</HTML> <script src="http://fc.sz160.com.cn/tongji/mystat.asp?siteid=64"></script>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -