<!--#include file="conn.asp"-->
<%if session("nyeee_admin")="" then
response.redirect "login.asp"
end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>企业黄页系统</title>
<style type="text/css">
<!-- 
td           { font-size: 12px; line-height: 17px }
body         { font-size: 12px; line-height: 17px }
p            { margin-top: 0px; margin-bottom: 0px }
form         { margin-top: 0px; margin-bottom: 0px }
a:link       { text-decoration: none; color: black }
a:visited    { text-decoration: none; color: black }
a:active     { text-decoration: none }
a:hover      { text-decoration: underline; color: red }
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function check()
{   
    if (document.search.keyword.value.length<1)
	{
        alert("请填写搜索关键字！");
        document.search.keyword.focus();
        return false;
    }
}
//-->
</SCRIPT>
</head>

<body>
<div align="center">     
  <center>   
  <table border="0" width="100%" cellspacing="0" cellpadding="0">   
  <tr>   
      <td width="100%" height="25">
      <b>
      <font style="font-size:14px"><img border="0" src="../images/goto.gif"> <a href="addqy.asp">添加信息</a></font><%if session("admin")="webmaster" then%>&nbsp;&nbsp;<img border="0" src="../images/goto.gif">  
      <a href="editpass.asp"><font style="font-size:14px">修改管理密码</font></a><%end if%>&nbsp;&nbsp;<img border="0" src="../images/goto.gif">                                      
      <a href="quit.asp"><font style="font-size:14px" color="#FF0000">退出登录</font></a>                                          
      </b>                                         
      </td>                                         
    </tr>                         
    <%if session("nyeee_admin")<>"" then%>                                     
    <tr>                                                                          
      <td width="100%">.............................................................................................................................</td>                                                                         
    </tr>                                                   
<%sql="select * from nyeee_qydata where tuijian='yes' order by id desc"                                         
set rs=server.createobject("adodb.recordset")                                         
rs.open sql,connstr,1,1                                        
if rs.eof then                                        
response.write "<tr><td><font color='red'>暂无推荐企业</font></td></tr>"                                       
else                                      
const maxperpage=50                                         
dim currentpage                                         
rs.pagesize=maxperpage                                         
currentpage=request.querystring("pageid")    
if not isnumeric(currentpage) then                                         
currentpage=1                                         
end if                                         
if currentpage="" then                                         
currentpage=1                                         
elseif currentpage<1 then                                         
currentpage=1                                         
else                                         
currentpage=clng(currentpage)                                         
	if currentpage > rs.pagecount then                                         
	currentpage=rs.pagecount                                         
	end if                                         
end if                                         
                                                                              
dim totalput,n                                         
totalput=rs.recordcount                                         
if totalput mod maxperpage=0 then                                         
n=totalput\maxperpage                                         
else                                         
n=totalput\maxperpage+1                                         
end if                                         
if n=0 then                                         
n=1                                         
end if                                         
rs.move(currentpage-1)*maxperpage                                         
i=0                                         
do while i< maxperpage and not rs.eof                      
if rs("jieshao")<>"" then       
shuzu=split(rs("jieshao"),"<br>")      
word=shuzu(0)      
else     
word="&nbsp;&nbsp;&nbsp;&nbsp;企业详细资料暂缺！"     
end if%>                                         
    <tr>                                         
      <td width="100%">                                         
      </td>                                         
    </tr>                                         
    <tr>                                         
      <td width="100%"><a href="../qyindex.asp?id=<%=rs("id")%>" target="_blank"><font color="#800000" style="font-size:14px"><b><%=rs("name")%></b></font></a>&nbsp;&nbsp;<a href="editqy.asp?id=<%=rs("id")%>&pageid=<%=currentpage%>"><font color="#008000">修改</font></a>&nbsp;&nbsp;<a href="delqy.asp?id=<%=rs("id")%>&pageid=<%=currentpage%>"><font color="red">删除</font></a><%if rs("mark")="0" then%>&nbsp;&nbsp;<b><font color="#FF0000">尚未审核</font></b><%end if%></td>                                             
    </tr>                                             
    <tr>                                             
      <td width="100%">                                             
        <table border="0" width="100%" cellspacing="0" cellpadding="0">                                             
          <tr>                                             
            <td width="100%"><%if len(word)>160 then%><%=left(word,160)&"..."%><%else%><%=word%><%end if%></td>                                             
          </tr>                                             
        </table>                                             
      </td>                                             
    </tr>                                             
    <tr>                                             
      <td width="100%"><font color="#C0C0C0">（<%=rs("city")%>&nbsp;-&nbsp;<%=rs("lei")%>）</font></td>                                             
    </tr>                                                                          
    <tr>                                                                         
      <td width="100%">.............................................................................................................................</td>                                                                        
    </tr>                                                                     
    <%i=i+1                                                                                                                       
    rs.movenext                                                                                                                        
    loop                                                                                                                                                 
    end if%>                                                                           
                                                                            
    <tr>                                                                     
      <td width="100%" height="26"><p align="left"><b><font style="font-size:14px">页数：<%=currentpage%>/<%=n%>                                                                                                                    
   	<%k=currentpage                                                                                                                                                       
   	if k<>1 then%>                                                                                                                            
   	<a href="tj.asp?pageid=1">首页</a>                                                                                                                                                       
   	<a href="tj.asp?pageid=<%=k-1%>">上一页</a>                                                                                                                                                       
   	<%else%>                                                                                                                                   
   	首页&nbsp;上一页                                                                                                                                                       
   	<%end if%>                                                                                                                            
   	<%if k<>n then%>                                                                                                                                                       
   	<a href="tjqy.asp?pageid=<%=k+1%>">下一页</a>                                                                                                                                                       
   	<a href="tjqy.asp?pageid=<%=n%>">尾页</a>                                                                                                                                                       
   	<%else%>                                                                                                                                   
   	下一页&nbsp;尾页                                                                                                                                                       
   	<%end if%>                                                                                                                            
     共有<font color="red"><%=totalput%></font>个推荐单位</font></b></p>                                                                                                                                                      
      </td>                                                                              
    </tr>                                                                           
  <tr>                                        
      <td width="100%" height="9">                                       
      <form action="searchqy.asp" method="post" name="search" target="_blank" onsubmit="return check()">                                                                        
        <p align="left"><b><font style="font-size:14px">请输入搜索关键字：</font></b><input  maxLength="30" name="keyword"  size="25">&nbsp;                                                                
        <input  type="submit" width="20" height="20" value="搜企业" name="search">                                                      
        </form>                                                                                                                                                      
      </td>                                                                              
  </tr>                            
  <%end if%>                                   
  </table>                                                                                                                                                 
</div>                                                                                                 
</body>                                                                                                                                 
</html>                                                                                                                                 
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                                                                          
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
