<!-- #Include File="Include/AMH_Onlogin.asp" -->
<title><%Response.Write Cls.Web_Name%> - 更多主题列表</title>
<link type=text/css href='Images/admin.Css' rel=stylesheet>
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V2.0》，简称“AsaiMHV2”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

PageUrl = "?ChannelIDs="&iChannelIDs
tit_fir="主题"
Call AMH_Table(0)
Call AsaiMHSpecial_List()
'Call Web_Copy()
Call AMH_Ender(tit)
'//* 网站关键字列表 *//
Sub AsaiMHSpecial_List()
	Dim Topic,Remark,Hidden
%>
<form name=add_frm action='<%Response.Write PageUrl%>' method=post>
<tr>
<td class=td colspan=4><b>已经选定的主题：</b></td>
</tr>
<tr>
<td colspan=4><input type=text name=SpecialList size=22 maxlength=200 readonly=readonly>&nbsp;&nbsp;&nbsp;&nbsp;<input type=button name=del1 onclick='del(1)' value='删除最后'> <input type=button name=del2 onclick='del(0)' value='删除全部'></td>
</tr>
<tr align=center>
<td class=td width='10%'>序号</td>
<td class=td width='30%'><%Response.Write tit_fir%>名称</td>
<td class=td width='50%'>主题简介</td>
<td class=td width='10%'>状态</td>
</tr>
<%
  dim obj_page
  set obj_page=new Cls_PageCute
  obj_page.pageurl=pageurl
  obj_page.nummer=10
  obj_page.page_t=1
  obj_page.page_p=5
  obj_page.page_unit="个"
  obj_page.page_tit=tit_fir
  obj_page.v_id="id"
  Call obj_page.p_init("*","AsaiMHSpecial","ChannelIDs="&iChannelIDs,"id desc")
  sql=obj_page.sql_count
  set rs=Cls.exec(sql,1)
  obj_page.rssum=rs(0)
  rs.close
  call obj_page.p_main("*","AsaiMHSpecial","ChannelIDs="&iChannelIDs,"id desc")
  for i=1 to obj_page.page_num
    ChannelIDs = Rs("ChannelIDs")
	Topic = Rs("Topic")
	Remark = Rs("Remark")
	Hidden = Rs("Hidden")
	 If Hidden = 0 Then
		 Hidden = "<font class=blue>隐藏</font>"
	 Else
		 Hidden = "<font class=red>开启</font>"
	 End If
%>
<tr align=center>
<td class=tims><%Response.Write obj_page.page_now+i%></td>
<td><a href='#' onclick='add("<%response.write Cls.Code_Html(Topic,1,0)%>")'><font class=blue><%Response.Write Cls.Code_Html(Topic,1,0)%></font></a></td>
<td align=left title='<%Response.Write Cls.Code_Html(Remark,1,0)%>'><%Response.Write Cls.Code_Html(Remark,1,20)%></td>
<td><%Response.Write Hidden%></td>
</tr>
<%
		Rs.MoveNext
	 Next
	Rs.Close
%>
<tr class=tr1>
<td colspan=4>
  <table border=0>
  <tr class=tr1>
  <td></td>
  <td><%Response.Write obj_page.page_var%></td>
  <td width=3></td>
  <td>分页：</td>
  <td><%Response.Write obj_page.page_cute%></td>
  </tr>
  </table>
</td>
</tr>
<script language="javascript">
add_frm.SpecialList.value=opener.add_frm.bbs_Special.value;
var oldSpecial="";
function add(obj)
{
    if(obj==""){return false;}
    if(opener.add_frm.bbs_Special.value=="")
    {
        opener.add_frm.bbs_Special.value=obj;
        add_frm.SpecialList.value=opener.add_frm.bbs_Special.value;
        return false;
    }
    var singleSpecial=obj.split(",");
    var ignoreSpecial="";
    for(i=0;i<singleSpecial.length;i++)
    {
        if(checkSpecial(opener.add_frm.bbs_Special.value,singleSpecial[i]))
        {
            ignoreSpecial=ignoreSpecial+singleSpecial[i]+" "
        }
        else
        {
            opener.add_frm.bbs_Special.value=opener.add_frm.bbs_Special.value+","+singleSpecial[i];
            add_frm.SpecialList.value=opener.add_frm.bbs_Special.value;
        }
    }
    if(ignoreSpecial!="")
    {
        alert(ignoreSpecial+" 主题已经存在，此操作已经忽略！");
    }
}
function del(num)
{
    if (num==0 || opener.add_frm.bbs_Special.value=="" || opener.add_frm.bbs_Special.value==",")
    {
        opener.add_frm.bbs_Special.value="";
        add_frm.SpecialList.value="";
        return false;
    }
    var strDel=opener.add_frm.bbs_Special.value;
    var s=strDel.split(",");
    opener.add_frm.bbs_Special.value=strDel.substring(0,strDel.length-s[s.length-1].length-1);
    add_frm.SpecialList.value=opener.add_frm.bbs_Special.value;
}
function checkSpecial(SpecialList,thisSpecial)
{
  if (SpecialList==thisSpecial){
        return true;
  }
  else{
    var s=SpecialList.split(",");
    for (j=0;j<s.length;j++){
        if(s[j]==thisSpecial)
            return true;
    }
    return false;
  }
}
</script>
</form>
<%
End Sub
%>
