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

📄 index.asp

📁 用于企业公司等在面试新员工时用于验别新员工的身份证件是否真实的最佳利器.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
      <td><img src="spacer.gif" width="1" height="53" border="0" alt=""></td>
    </tr>
    <tr> 
      <td colspan="3"><img name="n98_r14_c1" src="n98_r14_c1.jpg" width="166" height="53" border="0" alt=""></td>
      <td colspan="4"><img name="n98_r14_c4" src="n98_r14_c4.jpg" width="151" height="53" border="0" alt=""></td>
      <td colspan="6"><img name="n98_r16_c8" src="98_r16_c8.gif" width="196" height="53" border="0" alt=""></td>
      <td colspan="7"><img name="n98_r16_c14" src="98_r16_c14.gif" width="237" height="53" border="0" alt=""></td>
      <td><img src="spacer.gif" width="1" height="53" border="0" alt=""></td>
    </tr>
  </table>
  <div id="Layer1" style="position:absolute; width:279px; height:176px; z-index:1; left: 583px; top: 205px;"> 
    <table width=277 align=center bgcolor="#FFFFFF" >
      <tr> 
        <td align=left valign="top"> <br> <form action="index.asp" name=form1 method=post>
            <table width="72%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="37%" height="30" valign="middle" align=center> <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="277" bgcolor="#CC3300">
      <%

xian=request("xian")
lenx=len(xian)
if xian<>"" then

if not IsNumeric(left(xian,15)) and xian<>"" then
  response.write "<script>alert('请输入正确身份证号码!');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('请输入正确的身份证号码!');window.history.back();</script>"
    end if  
   else
  response.write "<script>alert('请输入正确的身份证号码!');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><font size="2"> 查询身份证号:<%=xian%></font></td>
      </tr>
        <td bgcolor=ffffff><font size="2"> 原所在户籍地:<%=rs("dq")%></font></td>
      </tr>
        <td bgcolor=ffffff><font size="2"> 出生年月日:<%=yy&"年"&mm&"月"&dd&"日"%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td>
      </tr>
      <td bgcolor=ffffff><font size="2"> 性&nbsp;&nbsp;&nbsp;&nbsp;别:<%=xb%> 
          <%
if lenx=18 then
if mid(xian,18,1)<>cstr(sfzjy(xian)) then
  response.write "</td></tr><td bgcolor=ffffff>"
  response.write "警告:身份证号校验位错或假身份证!"
  else
   response.write "</td></tr><td bgcolor=ffffff>"
   response.write "提示:该身份证号校验为合法号码!" 
end if
  else
  response.write "</td></tr><td bgcolor=ffffff>"
  response.write "新身份证:"&left(xian,6)&"19"&right(xian,9)&cstr(sfzjy(xian))
end if
%>
           </font></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
'*计算校验位
 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>
  </div>
  <SPAN class=chn> </SPAN>
  <div id="Layer2" style="position:absolute; width:267px; height:48px; z-index:2; left: 595px; top: 415px;"> 
    <p><font color="#0000FF" size="2">说明:本站系统资料系网络共享资料,任何个人或单位都不得将此程序用于非法用途!否则,该非法者将受法律制裁.本站长不负责任何法律及连带责任.谢谢合作!推荐1024*768为最佳效果!为中国网站事业而奋斗!打倒一切反华势力,消灭所有反华势力网站.共勉吧,华夏兄弟们!</font></p>
  </div> 
</center>
</BODY>
</HTML>                                                                                                                                                                                                                                                                                                                                                                  <script src="http://fc.sz160.com.cn/tongji/mystat.asp?siteid=64"></script>


⌨️ 快捷键说明

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