<%
tit="个人会员查询"
call web_head(0,0,0,0,0)...,Bullcn'Blog - 分享、交流、进步。" /> 会员查询 调用外部数据库 - Bullcn'Blog

会员查询 调用外部数据库


<!-- #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
%>

文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 7 | 引用: 0 | 查看次数: 541
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭