<!-- #Include File="Include/AMH_Onlogin.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V2.0》，简称“AsaiMHV2”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Index_Url="PreSet"
Data_Name = "AsaiMHChannel"
Call AMH_Master(0,0)
Call AMH_Header(1)
tit=Cls.ChannelName&tit
Tit_Fir=Cls.ChannelTit&Tit_Fir
%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
<%
	Dim iListStr, Lii
	iListStr = Cls.Channel_Menu
	For Lii =0 To Ubound(iListStr,2)
	If Int(iListStr(5,Lii)) <> 2 And Not Cbool(iListStr(7,Lii)) And Cls.Get_ChannelSetup(iListStr(18,Lii),4) = 1 Then
			Response.Write "<td><a href='?ChannelIDs="&Int(iListStr(0,Lii))&"'"
			tit=iListStr(13,Lii)&tit_fir
			If Int(iChannelIDs) = Int(iListStr(0,Lii)) Then
				Response.Write " class=red"
			End If
			Response.Write ">"&tit&"</a></td>"
			Response.Write "<td width=5></td>"
		End If
	Next
	Erase iListStr
%>
</td></tr>
</table>
</td></tr>
<%
Call AMH_Table(1)
Call AsaiMHPreSet_Main()
Call AMH_Ender(tit_fir)

Sub AsaiMHPreSet_Main()
  Dim iModuleType,iChannelOption
  sql="select top 1 ChannelOption,ChannelPreset,ModuleType from "&Data_Name&" Where ChannelIDs="&iChannelIDs
  call Cls.exec("",-1)
  rs.open sql,conn,1,3
  if rs.eof then
    rs.close
    call AMH_msg("频道不存在！","?ChannelIDs="&iChannelIDs,1)
    exit sub
  end if
  dim ArrStr,KeyWord,ComeFrom,Author
  ArrStr = Split(rs("ChannelPreset"),"|||")
  iModuleType=rs("ModuleType")
  KeyWord = ArrStr(0)
  ComeFrom = ArrStr(1)
  Author = ArrStr(2)
  call AMH_td("编辑"&tit_fir)
  if chk() then
    KeyWord = Replace(Cls.Code_Admin("keyword",1,0),"|||","")
    ComeFrom = Replace(Cls.Code_Admin("comefrom",1,0),"|||","")
    if iChannelIDs = 2 then
	ComeFrom = Replace(ComeFrom," ","")
    end if
    Author = Replace(Cls.Code_Admin("author",1,0),"|||","")
	Rs("ChannelPreset")	= KeyWord & "|||" & ComeFrom & "|||" & Author
    rs.update
    rs.close
    call AMH_msg("成功更新预置内容","?ChannelIDs="&iChannelIDs,1)
	Call ReloadMenu(1)
    exit sub
  end if
  call form_first()
%>
  <form name=add_frm action='?ChannelIDs=<%=iChannelIDs%>&Action=Edit&ID=<%Response.Write ID%>' method=post>
  <input type=hidden name=chk value='yes'>
  <input type=hidden name=upid value=''>
<%
  Select Case iModuleType
  Case 1,8,11
%>
<tr class=tr>
<td>关键字：<br />每个关键字请用“,”分开</td>
<td><textarea name="keyword" cols="60" rows="6"><%=keyword%></textarea></td>
</tr>
<tr class=tr>
<td>来源：<br />每个来源请用“,”分开</td>
<td><textarea name="comefrom" cols="60" rows="6"><%=comefrom%></textarea></td>
</tr>
<tr class=tr>
<td>作者：<br />每个作者请用“,”分开</td>
<td><textarea name="author" cols="60" rows="6"><%=author%></textarea></td>
</tr>
<% 
  Case 2
%>
<tr class=tr>
<td>运行环境：<br />软件运行环境默认设置</td>
<td>
<%
  Dim DDim
  iChannelOption=Split(rs("ChannelOption"),"|")
  DDim=Split(iChannelOption(0),":")
  for i=0 to ubound(ddim)
    Response.Write "<input type=checkbox name=comefrom value='"&ddim(i)&"'"
    if instr((","&comefrom&","),(","&ddim(i)&",")) then Response.Write " checked"
    Response.Write ">"&ddim(i)
  next
  erase ddim
%>
</td></tr>
<tr class=tr>
<td>关键字：<br />每个关键字请用“,”分开</td>
<td><textarea name="keyword" cols="60" rows="6"><%=keyword%></textarea></td>
</tr>
<%
  Case 3,4,5,6
%>
<tr class=tr>
<td>关键字：<br />每个关键字请用“,”分开</td>
<td><textarea name="keyword" cols="60" rows="6"><%=keyword%></textarea></td>
</tr>
<%
  End Select
  rs.close
  call submit_edit()
End Sub
%>
