<!-- #include file="include/config.asp" -->
<!-- #include file="../include/jk_pagecute.asp" -->
<!-- #include file="../include/jk_page_cute.asp" -->
<!-- #include file="../style/data_sort_web.asp" -->
<%
dim nummer,nums,rssum,page,viewpage,thepages,pageurl,sql_add,nid,nname,username,url,sqladd
pageurl="?"
nummer=3
nums=nummer
sql_add=""
types="web"
n_sort="web"
tit="推荐站点"

call cid_sid()
call getsortname()
call web_head(0,0,0,0,0)
call vouch_load(1,0,1)
'----------------------------左边 开始----------------------------
call website_left_sort(tit,0)
call vouch_left()
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
call vouch_search(tit,1,"")
response.write ukong
dim tmp1,body
if cid>0 then
  sql_add=sql_add&" and c_id="&cid
  pageurl=pageurl&"c_id="&cid&"&"
  if sid>0 then
    sql_add=sql_add&" and s_id="&sid
    pageurl=pageurl&"s_id="&sid&"&"
  end if
end if
keyword=code_search(request.querystring("keyword"))
if action="search" and keyword<>"" then
  sea_type=trim(request.querystring("sea_type"))
  sea_term=trim(request.querystring("sea_term"))
  if sea_type<>"username" then sea_type="name"
  if sea_term<>"only" then sea_term="all"
  sql_tmp=sql_key(keyword,sea_type,2,sea_term)
  if sql_tmp<>"" then
    sqladd=sqladd&" and "&sql_tmp
    sql_tmp=""
    pageurl=pageurl&"action=search&sea_type="&sea_type&"&keyword="&server.urlencode(keyword)&"&"
  end if
end if
sql="select count(id) from website where hidden=1 "&sql_add&sqladd
set rs=joekoe_cms.exec(sql,1)
rssum=rs(0)
rs.close
call format_pagecute()
sql="select top "&nummer*viewpage&" * from website where hidden=1 "&sql_add&sqladd&" order by id desc"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,1
if int(viewpage)>1 then rs.move (viewpage-1)*nummer
if int(viewpage*nummer)>int(rssum) then nums=nummer-(viewpage*nummer-rssum)
for i=1 to nums
  nid=rs("id")
  nname=rs("name")
  username=rs("username")
  url=rs("url")
    tmp1=tmp1&vbcrlf&"<tr class=bg_td><td height=30>" & _
         vbcrlf&"  <table border=0 cellspacing=0 cellpadding=0 width='100%'>" & _
         vbcrlf&"  <tr align=center>" & _
         vbcrlf&"  <td width='75%'>" & _
         vbcrlf&"    <table border=0 width='98%'>" & _
         vbcrlf&"    <tr><td width='18%'></td><td width='30%'</td><td width='18%'></td><td width='34%'></td></tr>" & _
         vbcrlf&"    <tr><td>网站名称：</td><td colspan=3>[<a href='website_view.asp?id="&nid&"' target=_blank><font color=blue>"&nname&"</font></a>]</td></tr>" & _
         vbcrlf&"    <tr><td>国家地区：</td><td>"&rs("country")&"</td><td>站点语言：</td><td>"&rs("lang")&"</td></tr>" & _
         vbcrlf&"    <tr><td>推 荐 人：</td><td>"&format_user_view(username,1,0)+"</td><td>添加时间：</td><td>"&joekoe_cms.time_type(rs("tim"),4)&"</td></tr>" & _
         vbcrlf&"    <tr><td>站点属性：</td><td>"
if rs("isgood")=true then
      tmp1=tmp1&"<font class=red>推荐</font>"
else
      tmp1=tmp1&"普通"
end if
    tmp1=tmp1&vbcrlf&"</td><td>浏览人气：</td><td class=red>"&rs("counter")&"</td></tr>" & _
         vbcrlf&"    <tr><td>网站地址：</td><td colspan=3><a href='website_view.asp?id="&nid&"' target=_blank>"&url&"</a></td></tr>" & _
         vbcrlf&"    <tr><td colspan=2>网站介绍：</td><td colspan=2 align=center><a href='javascript:;' onclick=""javascript:window.external.AddFavorite('"&url&"','"&nname&"')"" style='target: ' _self?>〖加入收藏夹〗</a></td></tr>" & _
         vbcrlf&"    <tr><td colspan=4 align=center><table border=0 cellspacing=0 cellpadding=2 width='96%' class=tf><tr><td class=bw>"&joekoe_cms.code_html(rs("remark"),1,0)&"</td></tr></table></td></tr>" & _
         vbcrlf&"    </table>" & _
         vbcrlf&"  </td>" & _
         vbcrlf&"  <td width='25%'>"&pic_fk(rs("pic"),1,"website_view.asp?id="&nid)&"</td>" & _
         vbcrlf&"  </tr>" & _
         vbcrlf&"  </table>" & _
         vbcrlf&"</td></tr>"
	  rs.movenext
next
rs.close
tmp1=tmp1&vbcrlf&"  <tr><td height=30>" & _
vbcrlf&"  现有 <font class=red>"&rssum&"</font> 个"&tit&" ，" & _
vbcrlf&"  页次：<font class=red>"&viewpage&"</font>/<font class=red color=#ffffff>"&thepages&"</font>&nbsp;" & _
vbcrlf&"  &nbsp;分页："&jk_pagecute(nummer,thepages,viewpage,pageurl,5,"#ff0000")&"" & _
vbcrlf&"</td><tr>"
  call vouch_center_table(tit,tmp1,1,"")  
response.write ukong
'----------------------------中间 结束----------------------------
call vouch_end()
call web_end(0,0)

sub website_left_sort(nsn,ntt)
  dim tmp1,surl,body
  surl="website.asp?types="&types&"&"
  if types<>"web" then surl="gallery.asp?"
  tmp1=nsort_left_type(surl,ntt)
   call vouch_left_table(nsn,tmp1,0,"")  
end sub
%>
