<!--#include file="check_out.asp"-->
<!--#include file="conn.asp"-->

<html>
<head><title>江西师范大学2000级房地产班同学通讯录</title>
<link type="text/css" rel="stylesheet" href="css.css"/>
</head>
<body>

<%
  sql="select * from kefu"
if request.QueryString("chk")="search" then
  lxname=trim(request("lxname"))
  if lxname<>"" then
    sql=sql&" where lxname like '%"&lxname&"%'"
  end if
end if
page = trim(Request.QueryString("page"))

sql=sql&" order by id desc"

%>


<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="60" align="center" class="green16">江西师范大学2000级房地产班同学通讯录</td>
  </tr>
</table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="?chk=search">
        <tr>
          <td align="left" class="fb"><strong>姓名：</strong>
              <input name="lxname" type="text" id="lxname" size="15" />
              <input name="submit" type="submit" value=" 查询 " />
&nbsp;&nbsp;&nbsp;              <span class="f12hui">温馨提示：如您的资料有错误，请联系<a href="school_disp.asp?id=531" target="_blank" class="L12blue">饶亮</a>同学修改。</span></td>
          <td width="350" align="left" class="fb"><table width="300" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center" class="fb"><a href="member_add.asp" class="t1">添加个人资料</a></td>
              <td align="center" class="fb"><a href="member_list.asp" class="t1">查看全部同学资料</a></td>
              <td align="center" class="fb"><a href="login_out.asp" class="t1">退出登录</a></td>
            </tr>
          </table></td>
        </tr>
</form>
</table>
      <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td align="left" height="8"></td>
        </tr>
      </table>
      <table width="96%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#AFDBDE">
          <tr bgcolor="#FFFFFF">
          <td width="40" align="center" class="green12b">姓名</td>
          <td width="30" align="center" class="green12b">性别</td>
          <td align="center" class="green12b">所在单位</td>
          <td width="75" align="center" class="green12b">职位</td>
          <td width="80" align="center" class="green12b">办公电话</td>
          <td width="70" align="center" class="green12b">手机</td>
          <td align="center" class="green12b">Email</td>
          <td width="55" align="center" class="green12b">Q Q</td>
          <td align="center" class="green12b">详细地址</td>
        </tr>
      
<%
  set rs=server.CreateObject("adodb.recordset")
  rs.Cursortype = 3
  rs.open sql,conn,3,3
  pre = true
  last = true
i=0
page = trim(Request.QueryString("page"))
if len(page) = 0 then
    intpage = 1
    pre = false
	page=1
end if
if not rs.eof then
    rs.pagesize=80
 
    if cint(page) =< 1 then
       intpage = 1
       pre = false
    end if
    if cint(page)>=rs.PageCount then
        intpage = rs.PageCount
        last = false
		intpage = cint(page)
        else
		last=true
        intpage = cint(page)
    end if
    rs.AbsolutePage = intpage
 
  j=1

   do while not rs.eof  and i<rs.pagesize 
  %>
        <tr bgcolor="#FFFFFF">
          <td align="center"><a href="school_disp.asp?id=<%=trim(rs("id"))%>" target="_blank" class="L12red"><%=trim(rs("lxname"))%></a></td>
          <td align="center"><%=trim(rs("sex"))%></td>
          <td align="left"><%=trim(rs("company"))%></td>
          <td align="center"><%=trim(rs("work"))%></td>
          <td align="left"><%=trim(rs("tel"))%></td>
          <td align="center"><%=trim(rs("mob"))%></td>
          <td width="80"><%=trim(rs("Email"))%></td>
          <td align="center"><%=trim(rs("QQ"))%></td>
          <td align="left"><%=trim(rs("address"))%></td>
        </tr>
	<%j=j+1
    i=i+1
  rs.movenext
  loop
 
  %>	
      </table>
<table width="96%" height="26"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

<table width="96%" border="0" align="center" cellpadding="1" cellspacing="1" borderColorLight=#808080 borderColorDark=#ffffff bgcolor="#FFFFFF">
   <tr>
     <%if rs.pagecount>0 then%>
     <td width="13%" height="23" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第<%=intpage%>页 / 共<%=rs.PageCount%>页</td>
     <%else%>
    <td width="15%" height="23" align="left">当前页0/0</td>
	<%end if%>
	<td width="26%" align="left">共<%=rs.recordcount%>条记录</td>
    <td width="46%" align="right"> <a href="<%=url%>?page=1&lxname=<%=lxname%>">首页</a>| 
     <%if pre then%>
     <a href="<%=url%>?page=<%=intpage -1%>&lxname=<%=lxname%>">上页</a>|
	 <%end if%>
     <%if last then%>
      <a href="<%=url%>?page=<%=intpage +1%>&lxname=<%=lxname%>">下页</a>|
	  <%end if%>
      <a href="<%=url%>?page=<%=rs.PageCount%>&lxname=<%=lxname%>">尾页</a>|转到第
      <select name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;">
      <%
       for i = 1 to rs.PageCount
       if i = intpage then%>
       <option value="<%=url%>?page=<%=i%>&lxname=<%=lxname%>"selected><%=i%></option>
     <%else%>
       <option value="<%=url%>?page=<%=i%>&lxname=<%=lxname%>"><%=i%></option>
      <%
       end if
        next
        %>
     </select>页    </td>
  </tr>
</table>
<%
else
  response.write "<tr bgcolor=#FFFFFF><td colspan='10' width='100%' height='50'' align='center'>无相关内容!</td>"
end if
rs.close
set rs=nothing
%>
      <table width="80%" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td align="left" class="fb">&nbsp;</td>
        </tr>
      </table>
      <table width="96%" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left" class="fb">系统制作：<a href="http://www.21it.com" target="_blank">江西世纪网络</a></td>
          </tr>
</table>
        </body>
</html>
<%
if trim(request.QueryString("act"))="del" then
  delid=trim(request.QueryString("id"))
  lxname=trim(request.QueryString("lxname"))
  page=trim(request.QueryString("page"))
   if not IsInt(delid) or delid="" then
    response.write "对不起参数错误！"
	response.end
  else
    sql="delete from kefu where id="&delid
    conn.execute sql
	response.redirect "?lxname="&lxname&"&page="&page
  end if
end if
%>

