<%
function chkstr(str)
chkstr=true
if not isnumeric(str) then
chkstr=false
end if
if len(str) <> 11 then
chkstr=false
end if
end function
if chkstr(trim(request("phonenum"))) then
%>
<%
'手机吉凶
'on error resume next
dim phonenum,temp
phonenum=cstr(trim(request("phonenum")))
phonenum=mid(phonenum,8)
phonenum=int(phonenum)
phonenum=phonenum/80
temp=int(phonenum)
phonenum=phonenum-temp
phonenum=int(phonenum*80)
phonenum=cstr(phonenum)
if phonenum="0" then
phonenum="81"
end if
%>
<%
dim sql,num,title,jx,content
sql="select * from shouji where num='"&phonenum&"'"
set rs=conn.execute(sql)
if not (rs.bof and rs.eof) then
num=rs("num")
title=rs("title")
jx=rs("jx")
content=rs("content")
end if
%>
<%
'输出
If Err Then
response.Write "手机吉凶查询内容出错!"
err.Clear
Response.End
End If
dim tempstr
if xing<>"" then
tempstr=xing&ming
else
tempstr="这位先生或者女士"
end if
tempstr=tempstr&",您的手机 "&cstr(trim(request("phonenum")))&"
"
tempstr=tempstr&"吉凶指数为: "&num&"
"
tempstr=tempstr&"状态为: "&title&"
"&jx&"
"&content
%>