<!-- #include file="include/admin_onlogin.asp" -->
<%
'****************************************************
' 关键词管理 for Joekoe CMS 1.2 Free
' 作者: Goffice
' Web: http://www.yan163.com.com
' Copyright (C) 2004 yjcity.com All Rights Reserved.
'****************************************************
dim keysname
del_user_true=true
del_upload_true=true
ntit="关键词"
select case jk_mod
case "article"
  data_name="article"
  keysname="keyes"
  index_url="article"
case "news"
  data_name="news"
  keysname="keyes"
  index_url="news"
case "ypage"
  data_name="ypage"
  keysname="keyes"
  index_url="ypage"
case "trade"
  data_name="trade"
  keysname="keyes"
  index_url="trade"
case "gallery"
  data_name="gallery"
  keysname="keyes"
  index_url="gallery"
case else
  data_name="article"
  keysname="keyes"
  index_url="article"
end select
call admin_master(1,0)
'call admin_cid_sid()
call admin_header(0,0)
%>

<tr><td colspan=2 align=center>
  <table border=0 cellspacing=0 cellpadding=2>
  <form action='?' method=get>
  <input type=hidden name=jk_mod value='<%response.write jk_mod%>'>
  <input type=hidden name=c_id value='<%response.write cid%>'>
  <input type=hidden name=s_id value='<%response.write sid%>'>
  <tr>
  <td>搜索（<%response.write ntit%>）：</td>
  <td><input type=text name=keyword value='<%response.write trim(request.querystring("keyword"))%>' size=15 maxlength=20></td>
  <input type=hidden name=sea_type value='<%response.write keysname%>'>
  <input type=hidden name=sea_term value='only'>
  <td><input type=submit value='搜索'></td>
  </tr>
  </form>
  </table>
</td></tr>
</table>
<%
call joekoe_chk_main()
call admin_ender(1)

sub joekoe_chk_main()
  dim topic
  call format_search(keysname,keysname,2,1)
%>

<table cellspacing=1 cellpadding=3 class=table>
<tr align=center>
<td class=td width='7%'>序号</td>
<td class=td width='*'>关键词</td>
</tr>
<%
  sql="select count( "&keysname&" ) from ( select DISTINCT "&keysname&" from "&data_name&sql_add&" GROUP BY "&keysname&" order by "&keysname&" desc)"
  set rs=joekoe_cms.exec(sql,1)
  rssum=rs(0)
  rs.close
  call format_pagecute()
  sql="select top "&nummer*viewpage&" "&keysname&" from ( select DISTINCT "&keysname&" from "&data_name&sql_add&" GROUP BY "&keysname&" order by "&keysname&" desc)"
  call joekoe_cms.exec(sql,-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
    topic=rs(""&keysname&"")
%>
<tr align=center>
<td class=tims><%response.write (viewpage-1)*nummer+i%></td>
<td>
<a href="#" onclick="javascript:jk_insert_ems('<%response.write joekoe_cms.code_html(topic,1,20)%>');"><%response.write joekoe_cms.code_html(topic,1,20)%></a>
</td>
</tr>
<%
    rs.movenext
  next
  rs.close
%>
<tr class=tr1>
<td colspan=3>
现有<font class=red><%response.write rssum%></font>个<%response.write ntit%>，
页次：<font class=red><%response.write viewpage%></font>/<font class=red><%response.write thepages%></font>
分页：<%response.write jk_pagecute(nummer,thepages,viewpage,pageurl,5,"#ff0000")%>
</td>
</tr>
<%
dim qety
qety="+=',"
if request.querystring("ty")="1" then qety="='"
%>
<script language="JavaScript" type="text/JavaScript">

function jk_insert_ems(keyesvar)
{
  eval("opener.window.<%response.write trim(request.querystring("info_frm"))%>.<%response.write trim(request.querystring("info_word"))%>.value<%response.write qety%>"+keyesvar+"';");
}
</script>
<%
end sub

'****************************************************
' 关键词管理 for Joekoe CMS 1.2 Free
' 作者: Goffice
' Web: http://www.yan163.com.com
' Copyright (C) 2004 yjcity.com All Rights Reserved.
'****************************************************
%>