会员查询 调用外部数据库
作者:cmscn 日期:2005-10-09
<!-- #include file="include/skin.asp" -->
<!-- #include file="include/jk_ubb.asp" -->
<%
tit="个人会员查询"
call web_head(0,0,0,0,0)
'----------------------------左边 开始----------------------------
%>
<!-- #include file="include/inc_index_zhuce.inc" -->
<%
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write img_skin("m_help")&tit%></td></tr>
<tr class=bg_td><td align=center>
<table border="0" cellspacing="0" cellpadding="0" align=center>
<form name="form1" method="post" action="">
<select name="select">
<option selected>执业会员</option>
<option>非执业会员</option>
</select>
<select name="type3">
<option value="zcpa" selected>注册会计师</option>
<option value="zcpv">注册资产评估师</option>
<option value="fcpa">会计师</option>
<option value="fcpv">资产评估师</option>
</select>
<select name="type2">
<option value="name" selected>姓名</option>
<option value="iid">会员证号</option>
</select>
<input name="text1" type="text" value="">
<script language="javascript">
function login_true()
{
if (document.form1.text1.value=="") { alert("请输入你要查询的关键字,如,姓名,编号等!"); document.form1.text1.focus(); return false; }
}
</script>
<input type="submit" name="submit" value="查询" onclick="jacascript:return login_true();">
</form>
</table></td></tr></table>
<%
dim text1,type2,type3
text1=request.form("text1")
type3=trim(request.form("type3"))
type2=trim(request.form("type2"))
if text1="" then
call search_error()
else
call showinfo()
end if
call web_end(0,0)
sub showinfo()
dim iid,name,sex
call turn_conn()
joekoe_cms.connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("data_jk/accountant.mdb")
sql="select * from "&type3&" where "&type2&"='"&text1&"'"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
response.write "<table cellspacing=1 cellpadding=4 class=table>"
response.write " <tr><td class=td0><img src='skin/skin_1/small/m_help.gif'> 查询结果</td></tr>"
response.write " <tr class=bg_td><td align=center>"
response.write "<table align=center border=0 cellpadding=3 cellspacing=1 width=580 align=center bgcolor=#CCCCCC>"
response.write "<tr><td bgcolor=#FFFFFF>"
response.write "会员编号</td><td bgcolor=#FFFFFF>"
response.write "姓名<br></td><td bgcolor=#FFFFFF>"
response.write "性别<br></td><td bgcolor=#FFFFFF>"
response.write "单位"
response.write "</td></tr>"
response.write "<tr>"
response.write " <td bgcolor=#FFFFFF>"&rs("iid")&"</td>"
response.write " <td bgcolor=#FFFFFF>"&rs("name")&"</td>"
response.write " <td bgcolor=#FFFFFF>"&rs("sex")&"</td>"
if type3="zcpa" or type3="zcpv" then
response.write " <td bgcolor=#FFFFFF>"&rs("nname")&"</td>"
end if
response.write " </tr>"
response.write "</table></td></tr></table>"
end if
rs.close
set rs=nothing
end sub
sub turn_conn()
if joekoe_cms.isconn then
conn.close
set conn=nothing
joekoe_cms.isconn=false
end if
end sub
sub search_error()
%>
<table border=0 width='96%'>
<tr><td height=280 align=center>
<table border=0>
<tr><td colspan=2 height=30>您可能没有填写“查询关键字”,请查看以下帮助说明:</td></tr>
<tr><td width=10></td><td><%response.write img_skin("m_help2")%>在查询时必须填写“查询关键字”;</td></tr>
<tr><td></td><td><%response.write img_skin("m_help2")%>“关键字”中不能含有单引号(');</td></tr>
<tr><td></td><td><%response.write img_skin("m_help2")%>“关键字”中含有的加号(+)将被视为空格处理;</td></tr>
<tr><td></td><td><%response.write img_skin("m_help2")%>祝您在使用本站的“会员查询”时轻松愉快。</td></tr>
</table>
</td></tr>
</table>
<%
end sub
%>
引用内容
<!-- #include file="include/skin.asp" -->
<!-- #include file="include/jk_ubb.asp" -->
<%
tit="团体会员查询"
call web_head(0,0,0,0,0)
'----------------------------左边 开始----------------------------
%>
<!-- #include file="include/inc_index_zhuce.inc" -->
<%
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write img_skin("m_help")&tit%></td></tr>
<tr class=bg_td><td align=center>
<table border="0" cellspacing="0" cellpadding="0" align=center>
<form name="form1" method="post" action="">
<select name="type2">
<option value="tcpa" selected>会计事务所</option>
<option value="tcpv">资产评估机构</option>
</select>
<select name="popo">
<option value="nname" selected>名称</option>
<option value="iid">编号</option>
<option value="name">法人代表</option>
<option value="phone">联系电话</option>
</select>
<input name="text2" type="text" value="">
<script language="javascript">
function login_true()
{
if (document.form1.text2.value=="") {alert("请输入你要查询的关键字,如,名称,编号,电话等!");document.form1.text2.focus(); return false; }
}
</script>
<input type="submit" name="submit" value="查询" onclick="jacascript:return login_true();">
</form>
</table></td></tr></table>
<%
dim text2,type2,popo
text2=request.form("text2")
type2=trim(request.form("type2"))
popo=trim(request.form("popo"))
if text2="" then
call search_error()
else
call showinfo()
end if
'----------------------------中间 结束----------------------------
call web_end(0,0)
sub showinfo()
dim iid,name,sex,text
call turn_conn()
joekoe_cms.connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("data_jk/accountant.mdb")
sql="select * from "&type2&" where "&popo&"='"&text2&"'"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
response.write "<table cellspacing=1 cellpadding=4 class=table>"
response.write " <tr><td class=td0><img src='skin/skin_1/small/m_help.gif'> 查询结果</td></tr>"
response.write " <tr class=bg_td><td align=center>"
response.write "<table align=center border=0 cellpadding=3 cellspacing=1 width=580 align=center bgcolor=#CCCCCC>"
response.write "<tr><td bgcolor=#FFFFFF>"
response.write "会员编号</td><td bgcolor=#FFFFFF>"
response.write "名称</td><td bgcolor=#FFFFFF>"
response.write "地址</td><td bgcolor=#FFFFFF>"
response.write "邮编</td><td bgcolor=#FFFFFF>"
response.write "电话</td><td bgcolor=#FFFFFF>"
response.write "法人代表</td>"
response.write "</tr><tr>"
response.write " <td bgcolor=#FFFFFF>"&rs("iid")&"</td>"
response.write " <td bgcolor=#FFFFFF>"&rs("nname")&"</td>"
response.write " <td bgcolor=#FFFFFF>"&rs("address")&"</td>"
response.write " <td bgcolor=#FFFFFF>"&rs("code")&"</td>"
response.write " <td bgcolor=#FFFFFF>"&rs("phone")&"</td>"
response.write " <td bgcolor=#FFFFFF>"&rs("name")&"</td>"
response.write " </tr>"
response.write "</table></td></tr></table>"
end if
rs.close
set rs=nothing
end sub
sub turn_conn()
if joekoe_cms.isconn then
conn.close
set conn=nothing
joekoe_cms.isconn=false
end if
end sub
sub search_error()
%>
<table border=0 width='96%'>
<tr><td height=280 align=center>
<table border=0>
<tr><td colspan=2 height=30>您可能没有填写“查询关键字”,请查看以下帮助说明:</td></tr>
<tr><td width=10></td><td><%response.write img_skin("m_help2")%>在查询时必须填写“查询关键字”;</td></tr>
<tr><td></td><td><%response.write img_skin("m_help2")%>“关键字”中不能含有单引号(');</td></tr>
<tr><td></td><td><%response.write img_skin("m_help2")%>“关键字”中含有的加号(+)将被视为空格处理;</td></tr>
<tr><td></td><td><%response.write img_skin("m_help2")%>祝您在使用本站的“会员查询”时轻松愉快。</td></tr>
</table>
</td></tr>
</table>
<%
end sub
%>
评论: 7 | 引用: 0 | 查看次数: 541
发表评论