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

Dim csid,keyword
Dim ClassID:ClassID = Cls.Code_ID("ClassID")

Sub Format_Search(ByVal sT,ByVal sF,ByVal sL,ByVal sType)
	Dim ObjSea
	Set ObjSea = New Cls_Search
	ObjSea.inc_url = PageUrl
	ObjSea.inc_sql = sql_add
	Call ObjSea.Format_Search(sT,sF,sL,sType,0)
	PageUrl = ObjSea.inc_url
	sql_add = ObjSea.inc_sql
	keyword = Cls.Code_Html(ObjSea.keyword,1,0)
	Set ObjSea = nothing
End Sub

Sub SQL_ClassID(sVar)
	If ClassID<>0 Then
	Dim cSQL,cRs,cChildStr
		cSQL = "SELECT ClassChildStr FROM [AsaiMHClass] WHERE ChannelIDs=" & iChannelIDs & " And C_ID=" & ClassID
		Set cRs = Cls.Exec(cSQL,1)
		If cRs.BOF And cRs.EOF Then
			Set cRs = Nothing
			Exit Sub
		Else
			cChildStr = cRs("ClassChildStr")
		End If
		Set cRs = Nothing
		If sVar="" Then
			sVar="ClassID in (" & cChildStr & ")"
		Else
			sVar=sVar&" And ClassID in (" & cChildStr & ")"
		End If
		PageUrl=PageUrl&"ClassID="&ClassID&"&"
	End If
End Sub

Sub Chk_Cid()
	If isnumeric(csid) Then
		cid=csid
	Else
		cid=mid(csid,1,instr(csid,"_")-1)
	End If
End Sub

Sub Class_Cid()
	Cid=Cls.Code_ID("c_id")
	Cid=Int(Cid)
End Sub

function cs_nd(csv)
	dim csnd
	cs_nd=true
	if not isnumeric(csv) then
		cs_nd=false
		exit function
	End If
	if cint(csv)<1 then
     		cs_nd=false
     		exit function
  	End If
End Function

'//编辑器
Function ShowEditor(sechannelid,setypeid,frms,names,tits,stobj,word)
	Dim HtmlStr
	HtmlStr = HtmlStr & vbcrlf & "<tr>"
	HtmlStr = HtmlStr & vbcrlf & "<td>"&tit_fir&tits&"：<br /><br /><br />[<a href=""javascript:Editor1.insertHTML('[PageCute]');"" class=blue>手工分页符</a>] <br /><br />"
        If login_mode = format_power2(1,1) then
		HtmlStr = HtmlStr & vbcrlf &  "<input type=checkbox name=remote value='yes'><br />下载远程图</td>"
	else
		HtmlStr = HtmlStr & vbcrlf &  "</td>"
	end if
	HtmlStr = HtmlStr & vbcrlf & "<td>"
	HtmlStr = HtmlStr & vbcrlf & LoadEditor(sechannelid,setypeid,frms,names,stobj,word)
	HtmlStr = HtmlStr & vbcrlf & "</td>"
	HtmlStr = HtmlStr & vbcrlf & "</tr>"
	ShowEditor = HtmlStr
End Function

Function LoadEditor(sechannelid,setypeid,frms,names,stobj,word)
        Dim EditorStr,EditorStyle
	if sechannelid = 0 then
		EditorStyle = "AsaiMHEditor"
	else
		EditorStyle = ""&Cls.ChannelDir&"Editor"
	end if
'        EditorStr = EditorStr & vbcrlf &  "<SCRIPT language=""javascript"">"
'        EditorStr = EditorStr & vbcrlf &  "var Sm="""&Cls.Web_Dir&"Editor/"";//----编辑器的网址"
'        EditorStr = EditorStr & vbcrlf &  "var Se=""AsaiEdit/"";//----编辑器的文件夹"
'        EditorStr = EditorStr & vbcrlf &  "var sy=""25991E"";//----边框深一点的颜色"
'        EditorStr = EditorStr & vbcrlf &  "var qy=""E4F9E4"";//----背景浅一点的颜色"
'        EditorStr = EditorStr & vbcrlf &  "var by=""F3FDEF"";//----背景白色的底纹"
'        EditorStr = EditorStr & vbcrlf &  "var an="""&names&""";//----所要编辑的文本框名称"
'        EditorStr = EditorStr & vbcrlf &  "</scr ipt>"
'        EditorStr = EditorStr & vbcrlf &  "<SCR IPT language=""JavaScript"" src="""&Cls.Web_Dir&"Editor/AsaiEdit/AsaiEdit.js"" charset=""gb2312""></SCR IPT>"
'        EditorStr = EditorStr & vbcrlf &  "<textarea name="""&names&""" id="""&names&""" cols=""88"" rows=""8"" style=""display:none;"">"&Cls.LoadContent(word)&"</textarea>"
        EditorStr = EditorStr & vbcrlf &  "<textarea name="&names&" id="&names&" rows=6 cols=60 style='display:none'>"&Cls.LoadContent(word)&"</textarea>"
        EditorStr = EditorStr & vbcrlf &  "<iframe id=""Editor1"" src="""&Cls.Web_Dir&"Editor/Html/AsaiMHEditor.htm?id="&names&"&cid="&sechannelid&"&style="&EditorStyle&"&extcss="&Cls.Web_Dir&"Css/ext.css&TObj="&stobj&""" frameborder=""0"" scrolling=""No"" width=""570"" height=""350""></iframe>"
	    EditorStr = EditorStr & vbcrlf &  "<script language=""javascript"" type=""text/javascript"">"
	    EditorStr = EditorStr & vbcrlf &  "function doSubmit(){"
		if setypeid >0 then
		EditorStr = EditorStr & vbcrlf &  "if (checkPost("&setypeid&")!=false){"
		EditorStr = EditorStr & vbcrlf &  frms & ".submit();"
	    EditorStr = EditorStr & vbcrlf &  "}"
		else
		EditorStr = EditorStr & vbcrlf &  frms & ".submit();"
		end if
	    EditorStr = EditorStr & vbcrlf &  "}"
	    EditorStr = EditorStr & vbcrlf &  "</script>"
		LoadEditor = EditorStr
End Function

Function LoadSkinEditor(sechannelid,setypeid,frms,names,stobj,word)
        Dim EditorStr,EditorStyle
	if sechannelid = 0 then
		EditorStyle = "AsaiMHEditor"
	else
		EditorStyle = ""&Cls.ChannelDir&"Editor"
	end if
        EditorStr = EditorStr & vbcrlf &  "<div id='"&names&"'></div><script type='text/javascript'>function init(){et = new word('"&names&"', '"&replace(Cls.LoadContent(word),vbcrlf,"")&"', 0);}if(window.Event){window.onload = init;}else{init();}</script>"
		if setypeid >0 then
		EditorStr = EditorStr & vbcrlf &  ""
		else
		EditorStr = EditorStr & vbcrlf & ""
		end if
		LoadSkinEditor = EditorStr
End Function

Function ShowUBBEditor(setype,frms,names,tits,word,types,width,height)
        Dim HtmlStr
		HtmlStr = ""
		HtmlStr = HtmlStr & vbcrlf & "<tr class=tr>"
	    HtmlStr = HtmlStr & vbcrlf & "<td valign=top>"&tit_fir&tits&"："
		HtmlStr = HtmlStr & vbcrlf & "</td>"
		HtmlStr = HtmlStr & vbcrlf & "<td>"& LoadUBBEditor(setype,frms,names,word,types,width,height)&"</td>"
		HtmlStr = HtmlStr & vbcrlf & "</tr>"
		ShowUBBEditor = HtmlStr
End Function

Function LoadUBBEditor(setype,frms,names,word,types,width,height)
		Dim oEditor,EditorCode
		Set oEditor = New UBBEditor_Cls
		oEditor.EditMode	= 0
		oEditor.BasePath	= Cls.Web_dir&"Editor/UBB/"
		oEditor.InstanceName	= names
		oEditor.ToolbarSet	= types 'Default,Simple,Basic
		oEditor.Width		= width
		oEditor.Height		= height
		oEditor.Value	= Cls.ReWord(word)
		EditorCode ="<link href="""&Cls.Web_dir&"Editor/UBB/ubb.css"" rel=""stylesheet"" type=""text/css"">" 
		
		'等待修正?
		
	    EditorCode = EditorCode & vbcrlf &  "<script language=""javascript"" type=""text/javascript"">"
	    EditorCode = EditorCode & vbcrlf &  "function doQuickSubmit(){"
		EditorCode = EditorCode & vbcrlf &  "if ((event.ctrlKey && event.keyCode==13) || (event.altKey && event.keyCode==83))"
        EditorCode = EditorCode & vbcrlf &  "{"
		select case setype
		case "4_0"
		EditorCode = EditorCode & vbcrlf &  "if (frm_post_check(0)!=false){"
		EditorCode = EditorCode & vbcrlf &  frms & ".submit();"
	    EditorCode = EditorCode & vbcrlf &  "}"	
		case "4_1"
		EditorCode = EditorCode & vbcrlf &  "if (frm_post_check(1)!=false){"
		EditorCode = EditorCode & vbcrlf &  frms & ".submit();"
	    EditorCode = EditorCode & vbcrlf &  "}"				
		case "10"
		EditorCode = EditorCode & vbcrlf &  "if (checkBlogPost()!=false){"
		EditorCode = EditorCode & vbcrlf &  frms & ".submit();"
	    EditorCode = EditorCode & vbcrlf &  "}"
		case "gbadd"
		EditorCode = EditorCode & vbcrlf &  "if (checkgbook()!=false){"
		EditorCode = EditorCode & vbcrlf &  frms & ".submit();"
	    EditorCode = EditorCode & vbcrlf &  "}"
		case else
		EditorCode = EditorCode & vbcrlf &  frms & ".submit();"
		end select
	    EditorCode = EditorCode & vbcrlf &  "}"
	    EditorCode = EditorCode & vbcrlf &  "}"
	    EditorCode = EditorCode & vbcrlf &  "</script>"		
		EditorCode = EditorCode & vbcrlf &  oEditor.CreateEditor()
		Set oEditor = Nothing
        LoadUBBEditor = EditorCode
End Function

Function LoadIcon(ByVal wt)
        Dim HtmlStr
		HtmlStr = ""
		wt=Int(9*Rnd)  '取随机数
		For i=0 to 10
		HtmlStr = HtmlStr & vbcrlf & "<input type=radio name=icon value='"&i&"'"
        If i=Int(wt) Then HtmlStr = HtmlStr & " checked"
		HtmlStr = HtmlStr & "> <img src="&Cls.Web_Dir&"Images/Em/icon/"&i&".gif border=0 align=absmiddle>&nbsp;"
		Next
		LoadIcon = HtmlStr
End Function

'//* 标题颜色 *//
Function ShowColor(ByVal iColor,ByVal jColor)
    Dim HtmlStr
	HtmlStr = HtmlStr & vbcrlf &  "&nbsp;#&nbsp;<input type=text name="&iColor&" value='"&jColor&"' maxlength=6 size=6 onclick=""SelectColor('"&iColor&"');"""
	If Len(jColor) = 6 then HtmlStr = HtmlStr & vbcrlf &  " style=""background:#"&jColor&";"""
	HtmlStr = HtmlStr & vbcrlf &  " readonly>&nbsp;&nbsp;<a href=""javascript:ClearColor('"&iColor&"')"" class=blue>清空颜色值</a>"
	ShowColor = HtmlStr
End Function

'//* 频道后台发布信息（单）图片上传 *//
Function ShowPicUpload(oChannelIDs,oPic,oIspic)
    Dim HtmlStr
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>"&tit_fir&"图片：</td>"
	HtmlStr = HtmlStr & vbcrlf &  "<td><input type=text name=pic value='"&oPic&"' size=50 maxlength=100 onclick=""doPreview('pic','"&Cls.Web_dir&"','"&Cls.Web_Dir&Cls.Web_Upload&"')"">&nbsp;&nbsp;<Input type=button name=selectfile onclick=""javascript:SelectFiles('"&oChannelIDs&"','0','pic','')"" Value='从已上传文件中选择' class=btn></td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>上传图片：</td>"
	HtmlStr = HtmlStr & vbcrlf &  "<td><iframe frameborder=0 id=UploadFiles width='100%' height=30 scrolling=no src='"&Cls.Web_Dir&"include/Upload.asp?ID="&oChannelIDs&"&Type=0&Obj="&oIspic&"&TObj=TempUploadFiles'></iframe></td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
    ShowPicUpload = HtmlStr
End Function

Function ShowUploadList()
Dim HtmlStr
    HtmlStr = HtmlStr & Vbcrlf & "	<tr id=uploadlist style='display:none'><td>已上传：</td>"
    HtmlStr = HtmlStr & Vbcrlf & "     <td>"
    HtmlStr = HtmlStr & Vbcrlf & " 	<table border=0 cellpadding=0 cellspacing=0 >"
    HtmlStr = HtmlStr & Vbcrlf & " 	      <tr><td width='*'>"
    HtmlStr = HtmlStr & Vbcrlf & " 			      <select name=""TempUploadFiles"" style=""width:400px;height:132px;"" size=""2"" onclick=""doPreview('TempUploadFiles','"&Cls.Web_Dir&"','"&Cls.Web_Dir&Cls.Web_Upload&"')""></select><br />"
    HtmlStr = HtmlStr & Vbcrlf & " 				  <input type=""button"" class=""btn"" name=""SetDefaultPic"" value=""设为首页图片"" onclick=""SetPicUrl('TempUploadFiles','pic');"">"
    HtmlStr = HtmlStr & Vbcrlf & " 				  <input type=""button"" class=""btn"" name=""InsEditor"" value=""插入编辑器"" onclick=""InsertEditor('TempUploadFiles','"&Cls.Web_Dir&"','"&Cls.Web_RealURL&Cls.Web_Dir&Cls.Web_Upload&"');"">"
    HtmlStr = HtmlStr & Vbcrlf & " 				  <input type=""hidden"" name=""UploadFiles"" value="""">"
    HtmlStr = HtmlStr & Vbcrlf & "               </td><td width=15></td><td width=180>"
    HtmlStr = HtmlStr & Vbcrlf & " 			  <fieldset style=""height:100%""><legend>预览</legend><table border=0 cellpadding=0 cellspacing=1 width=""180"" height=""150"" valign=top><tr><td align=center valign=middle id=tdPreview height=""100%""></td></tr></table></fieldset>			"
    HtmlStr = HtmlStr & Vbcrlf & " 				</td></tr></table>"
    HtmlStr = HtmlStr & Vbcrlf & " 			</td></tr>"
    ShowUploadList= HtmlStr
End Function

'//* 频道后台发布信息（小）图片上传 *//
Function ShowsPicUpload(oChannelIDs,oPic,oIspic)
    Dim HtmlStr
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>"&tit_fir&"缩略图：</td>"
	HtmlStr = HtmlStr & vbcrlf &  "<td><input type=text name=pic value='"&oPic&"' size=50 maxlength=100  onclick=""doPreview('pic','"&Cls.Web_dir&"','"&Cls.Web_Dir&Cls.Web_Upload&"')"">&nbsp;&nbsp;<Input type=button name=selectfile onclick=""javascript:SelectFiles('"&oChannelIDs&"','0','pic','')"" Value='从已上传文件中选择' class=btn></td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>上传缩略图：</td>"
	HtmlStr = HtmlStr & vbcrlf &  "<td><iframe frameborder=0 id=UploadFiles width='100%' height=30 scrolling=no src='"&Cls.Web_Dir&"include/Upload.asp?ID="&oChannelIDs&"&Type=0&Obj="&oIspic&"&TObj=TempUploadFiles'></iframe></td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowsPicUpload = HtmlStr
End Function

'//* 后台频道分类列表 *//
Sub Left_Channel_Class(ByVal sUrl,ByVal sChannel)
    Dim HtmlStr
	Dim ClassName,nccid,ClassChild,ClassDepth,foo,fi,cc,oFolder,up_down,fos,Classid
%>
<table cellspacing=1 cellpadding=2 class=table>
<%
	SQL="Select C_ID,ClassID,ClassName,ClassChild,ClassDepth from AsaiMHClass Where ChannelIDs="&sChannel&" And ClassDepth<"&Cls.ClassDepth&" Order By ClassID,ClassOrder,ClassDepth"
	Set Rs=Cls.Exec(SQL,1)
	Do While Not Rs.Eof
		nccid=Rs("C_ID")
		Classid=Rs("ClassID")
		ClassName=Rs("ClassName")
		ClassChild=Rs("ClassChild")
		ClassDepth=Rs("ClassDepth")
		fos=""
		foo=""
		up_down=2
		cc="tr"
		If ClassDepth=0 Then
			up_down=1
			cc="tr3"
			oFolder=img_admin("tree_folder0","")
		Else
			If ClassChild=0 Then
				foo=foo&img_admin("tree_minus","")
			Else
				foo=foo&img_admin("tree_plus","")
			End If
			For fi=2 To ClassDepth
				fos=fos&img_admin("tree_empty","")
			Next
			oFolder=img_admin("tree_folder1","")
		End If
		foo=fos&foo
%>
<tr class=<%Response.write  cc%> align=center>
<td align=left><a href='<%Response.write  sUrl%>ClassID=<%Response.write  nccid%>'><%Response.write  foo&ClassName%></a><%Response.write  "&nbsp;&nbsp;<font class=tims title='下有"&ClassChild&"个子类'>("&ClassChild&")</font>"%></td>
</tr>
<%
		Rs.MoveNext
	Loop
	Rs.Close
	Response.write vbcrlf &  "</table>"
End Sub

Function LoadClassSelect(ByVal oChannelIDs,ByVal oClassID,ByVal oClassDepth)
	Dim sql3,rs3,n_id,chi,sTmp,n_css
	sTmp= "<select name=ClassID size=1><option>请选择"&Tit_Fir&"分类</option>"
	sql3="Select C_ID,ClassName,ClassParent,ClassParentStr,ClassDepth,ClassChild,ClassID from AsaiMHClass Where ChannelIDs="&oChannelIDs&" And ClassDepth<"&oClassDepth&" Order By ClassID,ClassOrder,ClassDepth"
	Set Rs3=Cls.Exec(sql3,1)
	Do While Not Rs3.Eof
		n_id=Int(Rs3(0))
		n_css=""
		If Int(Rs3(5)<>0) then
		n_id=-1
		n_css=" class=Gys" 
		End If
		If Int(Rs3(2))=0 Then
			sTmp=sTmp&"<option value='"&n_id&"'"&n_css
			If oClassID=n_id Then sTmp=sTmp&" selected"
			sTmp=sTmp&">"&rs3(1)&"</option>"
		Else
			sTmp=sTmp&"<option value='"&n_id&"'"&n_css
			If (oClassID=n_id and n_id > 0) Then sTmp=sTmp&" selected"
			sTmp=sTmp&">"
			For chi=1 To Int(rs3(4))-1
				sTmp=sTmp&"│"
			Next
			sTmp=sTmp&"├"&rs3(1)&"</option>"
		End If
		Rs3.Movenext
	Loop
	Rs3.Close:Set Rs3=Nothing
	sTmp=sTmp&"</select> "&redx&"&nbsp;<font color=red>如有下级分类，请选择所属下级分类</font>"
	LoadClassSelect=sTmp
End Function

'//* 后台频道标题、副标题、标题颜色*//
Function ShowTopic(ByVal oIncludeInfo,ByVal iTopic,ByVal jTopic,ByVal iColor,ByVal jColor,ByVal iSubtitle,ByVal jSubtitle)
      Dim HtmlStr
      HtmlStr = HtmlStr & vbcrlf &  "<tr valign=top>"
      HtmlStr = HtmlStr & vbcrlf &  "<td>"&tit_fir&"标题：</td>"
      HtmlStr = HtmlStr & vbcrlf &  "<td>"
	  HtmlStr = HtmlStr & vbcrlf &  "<select name='IncludeInfo' size=1>"
      HtmlStr = HtmlStr & vbcrlf &  "<option  value='0' selected>[为空]</option>"
      HtmlStr = HtmlStr & vbcrlf &  "<option value='1'"
	  if oIncludeInfo=1 then HtmlStr = HtmlStr & vbcrlf &  " selected"
	  HtmlStr = HtmlStr & vbcrlf &  ">[话题]</option>"
	  HtmlStr = HtmlStr & vbcrlf &  "<option value='2'"
	  if oIncludeInfo=2 then HtmlStr = HtmlStr & vbcrlf &  " selected"
	  HtmlStr = HtmlStr & vbcrlf &  ">[图文]</option>"
      HtmlStr = HtmlStr & vbcrlf &  "<option value='3'"
	  if oIncludeInfo=3 then HtmlStr = HtmlStr & vbcrlf &  " selected"
	  HtmlStr = HtmlStr & vbcrlf &  ">[组图]</option>"
      HtmlStr = HtmlStr & vbcrlf &  "<option value='4'"
	  if oIncludeInfo=4 then HtmlStr = HtmlStr & vbcrlf &  " selected"
	  HtmlStr = HtmlStr & vbcrlf &  ">[推荐]</option>"
      HtmlStr = HtmlStr & vbcrlf &  "<option value='5'"
	  if oIncludeInfo=5 then HtmlStr = HtmlStr & vbcrlf &  " selected"
	  HtmlStr = HtmlStr & vbcrlf &  ">[观点]</option>"
      HtmlStr = HtmlStr & vbcrlf &  "</select>"
	  HtmlStr = HtmlStr & vbcrlf &  "&nbsp;<input type=text name="&iTopic&" value='"&jTopic&"' size=40 maxlength=50>"&redx&""
      HtmlStr = HtmlStr & vbcrlf &  ShowColor(iColor,jColor)
      HtmlStr = HtmlStr & vbcrlf &  "</td>"
      HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	    HtmlStr = HtmlStr & vbcrlf &  "<tr>"
      HtmlStr = HtmlStr & vbcrlf &  "<td>副 标 题：</td><td><input type=text name="&iSubtitle&" size=66 maxlength=100 value='"&jSubtitle&"'></td>"
      HtmlStr = HtmlStr & vbcrlf &  "</tr>"
      ShowTopic = HtmlStr
End Function

'//* 读取当前频道分类 *//
Function ShowClassSel(oChannelIDs,oClassID,oClassDepth)
    Dim HtmlStr 
	HtmlStr = HtmlStr & vbcrlf & "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>所属分类：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  LoadClassSelect(oChannelIDs,oClassID,oClassDepth)
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowClassSel = HtmlStr
End Function

'//* 读取当前频道专题 *//
Function ShowSpecialSel(oChannelIDs,oSpecialID)
	If Not Cls.SpecialTrue Then Exit Function
	Dim HtmlStr
	Dim sql3,rs3,n_id
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>所属专题：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<select name=SpecialID value='"&oSpecialID&"' size=1>"
	HtmlStr = HtmlStr & vbcrlf &  "<option value='0'>不属于任何专题</option>"
	sql3="Select ID,Topic from AsaiMHSpecial Where ChannelIDs="&oChannelIDs&" Order By ID"
	Set Rs3=Cls.Exec(sql3,1)
	Do While Not Rs3.Eof
		n_id=Int(Rs3(0))
		HtmlStr = HtmlStr & vbcrlf &  vbcrlf&"<option value='"&n_id&"'"
		If oSpecialID=n_id Then HtmlStr = HtmlStr & vbcrlf &  " selected"
		HtmlStr = HtmlStr & vbcrlf &  ">"&rs3(1)&"</option>"
		Rs3.Movenext
	Loop
	Rs3.Close:Set Rs3=Nothing
	HtmlStr = HtmlStr & vbcrlf &  "</select>"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowSpecialSel = HtmlStr
End Function

'//* 读取当前频道关键字 *//
Function ShowComeFrom(oComTo,oPsComto,oAuthor,oPsAuthor)
    Dim HtmlStr,PsComto,PsAuthor
   	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"&tit_fir&"来源：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<input type=text name=comto value='"&oComTo&"' size=40 maxlength=20>&nbsp;"
	HtmlStr = HtmlStr & vbcrlf &  "<select  onChange=""comto.value=this.value;"">"
	HtmlStr = HtmlStr & vbcrlf &  "<option value="""" selected>选择来源</option>"
	    PsComto=Split(oPsComto,",")
		For i = 0 To UBound(PsComto)
			HtmlStr = HtmlStr & vbcrlf &  "<option value=""" & PsComto(i) & """>" & PsComto(i) & "</option>"
		Next
	HtmlStr = HtmlStr & vbcrlf &  "</select>"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
   	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"&tit_fir&"作者：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td><input type=text name=author value='"&oAuthor&"' size=40 maxlength=20>&nbsp;"
	HtmlStr = HtmlStr & vbcrlf &  "<select onChange=""author.value=this.value;"">"
	HtmlStr = HtmlStr & vbcrlf &  "<option value="""" selected>选择作者</option>"
	    PsAuthor=Split(oPsAuthor,",")
		For i = 0 To UBound(PsAuthor)
			HtmlStr = HtmlStr & vbcrlf &  "<option value=""" & PsAuthor(i) & """>" & PsAuthor(i) & "</option>"
		Next
	HtmlStr = HtmlStr & vbcrlf &  "</select>"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
    ShowComeFrom = HtmlStr
End Function 

Function ShowKeyWord(oKeyWord,oPsKeyWord)
	Dim HtmlStr,PsKeyWord
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>相关"&tit_fir&"：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<input type=text id=Keyes name=Keyes value='"&oKeyWord&"' size=40 maxlength=20>&nbsp;"
	HtmlStr = HtmlStr & vbcrlf &  "<select  onChange=""ks(this.value);"">"
	HtmlStr = HtmlStr & vbcrlf &  "<option value="""" selected>选择关键字</option>"
	    PsKeyWord=Split(oPsKeyWord,",")
		For i = 0 To UBound(PsKeyWord)
			HtmlStr = HtmlStr & vbcrlf &  "<option value=""" & PsKeyWord(i) & """>" & PsKeyWord(i) & "</option>"
		Next
	HtmlStr = HtmlStr & vbcrlf &  "</select>"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<script language=javascript>"
	HtmlStr = HtmlStr & vbcrlf &  "function ks(kv){"
	HtmlStr = HtmlStr & vbcrlf &  "var ov=document.getElementById(""Keyes"");"
	HtmlStr = HtmlStr & vbcrlf &  "if (ov.value!=""""){"
	HtmlStr = HtmlStr & vbcrlf &  "ov.value+="",""+kv;"
	HtmlStr = HtmlStr & vbcrlf &  "}"
	HtmlStr = HtmlStr & vbcrlf &  "else{"
	HtmlStr = HtmlStr & vbcrlf &  "ov.value+=kv;"
	HtmlStr = HtmlStr & vbcrlf &  "}"
	HtmlStr = HtmlStr & vbcrlf &  "}"
	HtmlStr = HtmlStr & vbcrlf &  "</script>"
	ShowKeyWord = HtmlStr
End Function

Function ShowFleaType(oType)
	Dim HtmlStr
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>供求类型：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<select name=types>"
	HtmlStr = HtmlStr & vbcrlf &  "<option value='0'"
	If oType=0 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">供方</option>" & vbcrlf & "<option value='1'"
	If oType=1 Then HtmlStr = HtmlStr &  " selected"	
	HtmlStr = HtmlStr & ">求方</option>" & vbcrlf & "</select>"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowFleaType = HtmlStr
End Function

Function ShowYpType(oType)
	Dim HtmlStr,YpType
	YpType=","&oType&","
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>经营类型：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<input name=Types type=checkbox Value=1"
	If Instr(YpType,",1,")>0 Then HtmlStr = HtmlStr & " checked"
	HtmlStr = HtmlStr & "> 生产型 " & vbcrlf & "<input name=Types type=checkbox Value=2"
	If Instr(YpType,",2,")>0 Then HtmlStr = HtmlStr & " checked"
	HtmlStr = HtmlStr & "> 贸易型 " & vbcrlf & "<input name=Types type=checkbox Value=3"
	If Instr(YpType,",3,")>0 Then HtmlStr = HtmlStr & " checked"
	HtmlStr = HtmlStr & "> 服务型 " & vbcrlf & "<input name=Types type=checkbox Value=4"
	If Instr(YpType,",4,")>0 Then HtmlStr = HtmlStr & " checked"
	HtmlStr = HtmlStr & "> 政府|机构及其它 "&redx
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowYpType = HtmlStr
End Function

Function ShowYpTrade(oTrade)
	Dim HtmlStr
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>所属行业：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<select name=Trade>"
	HtmlStr = HtmlStr & vbcrlf &  "<option value='1'"
	If oTrade=1 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">国营</option>" & vbcrlf & "<option value='2'"
	If oTrade=2 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">贸易型</option>" & vbcrlf & "<option value='3'"
	If oTrade=3 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">集体</option>" & vbcrlf & "<option value='4'"
	If oTrade=4 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">乡镇</option>" & vbcrlf & "<option value='5'"
	If oTrade=5 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">股份制</option>" & vbcrlf & "<option value='6'"
	If oTrade=6 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">有限责任公司</option>" & vbcrlf & "<option value='7'"
	If oTrade=7 Then HtmlStr = HtmlStr & " selected"
	HtmlStr = HtmlStr & ">中外合资</option>" & vbcrlf & "<option value='8'"
	If oTrade=8 Then HtmlStr = HtmlStr &  " selected"	
	HtmlStr = HtmlStr & ">外商独资</option>" & vbcrlf & "</select> "&redx
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowYpTrade = HtmlStr
End Function

'//* 发布信息出处、编辑属性 *//
Function ShowPutInfo(oUserName,oTim)
    Dim HtmlStr
	if oUserName<>"s" then
	HtmlStr = HtmlStr & vbcrlf &  "<tr id=putinfo1 style='display:none'>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>发 布 人：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<input type=text name=username value='"&oUserName&"' size=30 maxlength=20>"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	end if
	if oTim <>"s" then
	HtmlStr = HtmlStr & vbcrlf &  "<tr id=putinfo2 style='display:none'>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>发布时间：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	HtmlStr = HtmlStr & vbcrlf &  "<input type=text name=tim value='"&oTim&"' size=30 maxlength=20>&nbsp;<input type=button name=st_btn value='选择' onclick='javascript:select_time(tim);return false;' class=btn>"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	end if
	ShowPutInfo = HtmlStr
End Function

'//* 频道后台发布信息相关属性 *//
Function ShowRelateInfo(oIsGood,oIsTop,oIsfocus,oHidden,oCounter)
    Dim HtmlStr
    If oCounter<>"s" Then
	HtmlStr = HtmlStr & vbcrlf &  "<tr id=relateinfo1 style='display:none'>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>初始点击：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
    HtmlStr = HtmlStr & vbcrlf &  "<input type=text name=counter value='"&oCounter&"' size=10 maxlength=10>&nbsp;人次"
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	End If
	HtmlStr = HtmlStr & vbcrlf &  "<tr id=relateinfo2 style='display:none'>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>文章属性：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	If oIsGood<>"s" Then	
	  HtmlStr = HtmlStr & vbcrlf &  "<input type=checkbox name=isgood value='yes'"
	    If oIsGood=True Then HtmlStr = HtmlStr & " checked"
	  HtmlStr = HtmlStr & vbcrlf &  ">推荐"&tit_fir&"&nbsp;&nbsp;"
    End If
	If oIsfocus<>"s" Then
	  HtmlStr = HtmlStr & vbcrlf &  "<input type=checkbox name=Isfocus value='yes'"
	    If oIsfocus=True Then HtmlStr = HtmlStr & " checked"
    HtmlStr = HtmlStr & vbcrlf &  ">焦点"&tit_fir&"&nbsp;&nbsp;"
	End If
	If oIsTop<>"s" Then
	  HtmlStr = HtmlStr & vbcrlf &  "<input type=checkbox name=Istop value='yes'"
	    If oIsTop=True Then HtmlStr = HtmlStr & " checked"
    HtmlStr = HtmlStr & vbcrlf &  ">固顶"&tit_fir&"&nbsp;&nbsp;"
	End If
	If oHidden<>"s" Then
	  HtmlStr = HtmlStr & vbcrlf &  "<input type=checkbox name=hidden value='yes'"
	    If oHidden=false Then HtmlStr = HtmlStr & " checked"
	  HtmlStr = HtmlStr & vbcrlf &  ">隐藏/审核"
	End If	
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowRelateInfo = HtmlStr 
End Function

'//* 特殊限制 *//
Function ShowLimit(oPower,oPt,oEmoney)
    Dim HtmlStr
    Dim dim_t
    dim_t=Cls.Cache_Get("user_group")
    HtmlStr = HtmlStr & vbcrlf &  "<tr id=limit1 style='display:none'>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>访问扣除：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
    HtmlStr = HtmlStr & vbcrlf &  "<input type=text name=emoney value='"&oEmoney&"' size=10 maxlength=10>&nbsp;"&Cls.web_unit
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
    HtmlStr = HtmlStr & vbcrlf &  "<tr id=limit2 style='display:none'>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>访问等级：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
      For i=0 To ubound(dim_t,2)
      HtmlStr = HtmlStr & vbcrlf &  "<input type=checkbox name=power value='"&i+1&"'"
        If instr(1,"."&oPower&".","."&i+1&".")>0  Then HtmlStr = HtmlStr & vbcrlf &  " checked"
        HtmlStr = HtmlStr & vbcrlf &  ">"&dim_t(1,i)
      Next
      Erase dim_t
      HtmlStr = HtmlStr & vbcrlf &  "<input type=checkbox name=power value='0'"
        If instr(1,"."&oPower&".",".0.")>0 Then HtmlStr = HtmlStr & vbcrlf &  " checked"
        HtmlStr = HtmlStr & vbcrlf &  ">游客"
	HtmlStr = HtmlStr & vbcrlf &  ShowHelp("","相关说明","1.如果"&Cls.web_unit&"大于0，表示浏览需要扣除相应的"&Cls.web_unit&"数目，当用户的"&Cls.web_unit&"小于此数目时，将无法浏览。<br />2.如果没有选择权限，表示没有用户等级限制，任何等级的用户都可以浏览。若选择，则只有相应的用户等级才可以浏览!") &"</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowLimit = HtmlStr
End Function

Function ShowMoreItem(isChk1,isChk2)
    Dim HtmlStr
    HtmlStr = HtmlStr & vbcrlf &  "<tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>更多选项：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td>"
	if isChk1<>"s" then
	HtmlStr = HtmlStr & "<input type=checkbox name=showuploadlist onclick=showadv1()"
	if isChk1 = 1 then HtmlStr = HtmlStr & " checked"
	HtmlStr = HtmlStr & ">显示已上传框"
	end if
	if isChk2<>"s" then
	if isChk1<>"s" then  HtmlStr = HtmlStr & "&nbsp;&nbsp;"
	HtmlStr = HtmlStr & "<input type=checkbox name=showmoreitem onclick=showadv2()"
	if isChk2 = 1 then HtmlStr = HtmlStr & " checked"
	HtmlStr = HtmlStr & ">显示更多选项"
	end if
	HtmlStr = HtmlStr & vbcrlf &  "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<script language=""javascript"" type=""text/javascript"">"
	HtmlStr = HtmlStr & vbcrlf &  "function showadv1(){"
	HtmlStr = HtmlStr & vbcrlf &  "if (document.add_frm.showuploadlist.checked == true) {"
	HtmlStr = HtmlStr & vbcrlf &  "uploadlist.style.display = """";"
	HtmlStr = HtmlStr & vbcrlf &  "}else{"
	HtmlStr = HtmlStr & vbcrlf &  "uploadlist.style.display = ""none"";"
	HtmlStr = HtmlStr & vbcrlf &  "}"
	HtmlStr = HtmlStr & vbcrlf &  "}"
	HtmlStr = HtmlStr & vbcrlf &  "function showadv2(){"
	HtmlStr = HtmlStr & vbcrlf &  "if (document.add_frm.showmoreitem.checked == true) {"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""putinfo1"")) putinfo1.style.display = """";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""putinfo2"")) putinfo2.style.display = """";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""relateinfo1"")) relateinfo1.style.display = """";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""relateinfo2"")) relateinfo2.style.display = """";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""limit1"")) limit1.style.display = """";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""limit2"")) limit2.style.display = """";"
	HtmlStr = HtmlStr & vbcrlf &  "}else{"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""putinfo1"")) putinfo1.style.display = ""none"";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""putinfo1"")) putinfo2.style.display = ""none"";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""relateinfo1"")) relateinfo1.style.display = ""none"";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""relateinfo2"")) relateinfo2.style.display = ""none"";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""limit1"")) limit1.style.display = ""none"";"
	HtmlStr = HtmlStr & vbcrlf &  "if (chkdiv(""limit2"")) limit2.style.display = ""none"";"
	HtmlStr = HtmlStr & vbcrlf &  "}"	
	HtmlStr = HtmlStr & vbcrlf &  "}"
	if isChk1<>"s" then
	if isChk1 = 1 then HtmlStr = HtmlStr & vbcrlf & "showadv1();"
	end if
	if isChk2<>"s" then
	if isChk2 = 1 then HtmlStr = HtmlStr & vbcrlf & "showadv2();"
	end if
	HtmlStr = HtmlStr & vbcrlf &  "</script>"
    ShowMoreItem = HtmlStr
End Function

Function ShowBrief(nBrief,oBrief)
    Dim HtmlStr
    HtmlStr = HtmlStr & vbcrlf &  "<tr valign=top>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>"&tit_fir&"摘要：</td>"
    HtmlStr = HtmlStr & vbcrlf &  "<td><textarea name="&nBrief&" rows=5 cols=85>"&Cls.ReWord(oBrief)&"</textarea></td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowBrief = HtmlStr 
End Function

'//* 频道后台发布服务器路径定义 *//
Function ShowServerList(oChannelIDs,oServerID)
    Dim HtmlStr
  	dim n_id,sql3,rs3
	HtmlStr = HtmlStr & vbcrlf &  "<tr>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>服务器选择：</td>"
	HtmlStr = HtmlStr & vbcrlf &  "<td>"
    HtmlStr = HtmlStr & vbcrlf &  "<select name=server_id value='"&oServerID&"' size=1>"
	HtmlStr = HtmlStr & vbcrlf &  ">↓请选择下载服务器↓</option>"
    HtmlStr = HtmlStr & vbcrlf &  "<option value='0'>非本地服务器</option>"
  	sql3="Select S_ID,S_Name from AsaiMHServer Where ChannelIDs="&oChannelIDs&" Order By S_ID"
  	set rs3=Cls.Exec(sql3,1)
  	do while not rs3.eof
    	n_id=int(rs3(0))
    	HtmlStr = HtmlStr & vbcrlf &  vbcrlf&"<option value='"&n_id&"'"
        If oServerID=n_id Then HtmlStr = HtmlStr & vbcrlf &  " selected"
        HtmlStr = HtmlStr & vbcrlf &  ">"&rs3(1)&"</option>"
    	rs3.movenext
  	loop
  	rs3.close
  	set rs3=nothing
	HtmlStr = HtmlStr & vbcrlf & "</select>"
	HtmlStr = HtmlStr & vbcrlf & "</td>"
	HtmlStr = HtmlStr & vbcrlf &  "</tr>"
	ShowServerList = HtmlStr
end Function

'显示城市
function ShowCity(s1,s2)
		Dim tmpstr
        tmpstr = "<select onchange='setcity();' name='province' >"
        tmpstr = tmpstr & "<option value=''>--请选择省份--</option>"
        tmpstr = tmpstr & "<option "
        tmpstr = tmpstr & "value=安徽>安徽</option> <option value=北京>北京</option> "
        tmpstr = tmpstr & "<option value=重庆>重庆</option> <option "
        tmpstr = tmpstr & "value=福建>福建</option> <option value=甘肃>甘肃</option> "
        tmpstr = tmpstr & "<option value=广东>广东</option> <option "
        tmpstr = tmpstr & "value=广西>广西</option> <option value=贵州>贵州</option> "
        tmpstr = tmpstr & "<option value=海南>海南</option> <option "
        tmpstr = tmpstr & "value=河北>河北</option> <option value=黑龙江>黑龙江</option> "
        tmpstr = tmpstr & "<option value=河南>河南</option> <option "
        tmpstr = tmpstr & "value=香港>香港</option> <option value=湖北>湖北</option> "
        tmpstr = tmpstr & "<option value=湖南>湖南</option> <option "
        tmpstr = tmpstr & "value=江苏>江苏</option> <option value=江西>江西</option> "
        tmpstr = tmpstr & "<option value=吉林>吉林</option> <option "
        tmpstr = tmpstr & "value=辽宁>辽宁</option> <option value=澳门>澳门</option>"
        tmpstr = tmpstr & "<option value=内蒙古>内蒙古</option> <option "
        tmpstr = tmpstr & "value=宁夏>宁夏</option> <option value=青海>青海</option> "
        tmpstr = tmpstr & "<option value=山东>山东</option> <option "
        tmpstr = tmpstr & "value=上海>上海</option> <option value=山西>山西</option> "
        tmpstr = tmpstr & "<option value=陕西>陕西</option> <option "
        tmpstr = tmpstr & "value=四川>四川</option> <option value=台湾>台湾</option> "
        tmpstr = tmpstr & "<option value=天津>天津</option> <option "
        tmpstr = tmpstr & "value=新疆>新疆</option> <option value=西藏>西藏</option> "
        tmpstr = tmpstr & "<option value=云南>云南</option> <option "
        tmpstr = tmpstr & "value=浙江>浙江</option> <option "
        tmpstr = tmpstr & "value=海外>海外</option></select>"
        tmpstr = tmpstr & " <select name='city' id = 'city' >"
        tmpstr = tmpstr & "</select>"
        tmpstr = tmpstr & "<script src="""&Cls.web_dir&"style/getcity.js""></script>"
        tmpstr = tmpstr & "<script>initprovcity('"&s1&"','"&s2&"');</script>"
        ShowCity = tmpstr
End Function

'//* 简单帮助说明 *//
Function ShowHelp(ByVal tVar,ByVal tt,ByVal rVar)
	Dim tit_var
	If tVar<>"" Then tit_var="title='"&tVar&"'"
	'tt = Replace(tt,"<br />","\n\n")
	tt = "<b>"&tt&"</b>"
	'rVar = Replace(rVar,"<br />","\n\n")
	ShowHelp = ("<a class=helplink href=""?"" onclick=""showHelpTip(event, '"&tt&"<br />"&rVar&"', true); return false""><img src='Images/Help.gif' border=0 align=absmiddle "&tit_var&"></a>")
End Function

Function Ulr_Home(oChannelID,oTit,oAdd,oTits,oEdit,oNo,oId)
Dim Tmpl,ssql,rss
     If oEdit=1 then
     if oNo=0 then
     Tmpl=Tmpl&"<tr><td>影片地址：</td><td>没有提供</td></tr>"
     else
     ssql="select * from AsaiMHMusicSong where id="&oId
     set rss=Cls.exec(ssql,1)
     for i=1 to oNo
     Tmpl=Tmpl&vbcrlf&"<tr><td>"&tit_fir&"地址 "&i&"：</td>" & _
     vbcrlf&"<td><input type=text name=Url"&i&" size=50 value='"&rss("Url")&"' maxlength=255>&nbsp;&nbsp;本集名称：&nbsp;&nbsp;<input type=text name=Name"&i&" size=10 value='"&rss("Name")&"' maxlength=20>"
     if oNo>1 then Tmpl=Tmpl&vbcrlf&"<a href='?action=delurl&ChannelIDs="&oChannelID&"&id="&oId&"&vid="&rss("id")&"'><font color=red>删除</font></a></td></tr>"
     rss.movenext
     next
     rss.close
     end if
     end if
     Tmpl=Tmpl&vbcrlf&"<tr>" & _
	 vbcrlf&"<td>"&oTit&"影片：</td><td>" & _
     vbcrlf&"前缀：<input type=text name=t1 value='' size=20>" & _
     vbcrlf&"集数：<input type=text name="&oAdd&" value=2 size=2>" & _
     vbcrlf&"后缀：<input type=text name=t2 value='' size=5>" & _
	 vbcrlf&"<input type=button class=btn name=Button onclick=""seturl();"" value='设置'> "&redx&"&nbsp;&nbsp;"&_
     vbcrlf&"<tr><td>"&oTits&tit_fir&"地址</td><td id='addid'></td></tr>"
 Ulr_Home=Tmpl
End Function

Function Server_InitSelect(oTxts,oServer_id,oChannelID,oServerID)
  	dim Tmpl,n_id,sql3,rs3
	Tmpl=Tmpl&"<tr>" & _
	vbcrlf&"<td>"&oTxts&"服务器选择：</td>" & _
	vbcrlf&"<td>" & _
    vbcrlf&"<select name='"&oServer_id&"' value='"&oServerID&"' size=1>" & _
	vbcrlf&">↓请选择下载服务器↓</option>" & _
    vbcrlf&"<option value='0'>非本地服务器</option>"
  	sql3="Select S_ID,S_Name From AsaiMHServer Where ChannelIDs="&oChannelID&" Order By S_ID"
  	set rs3=Cls.Exec(sql3,1)
  	do while not rs3.eof
    	n_id=int(rs3(0))
    	Tmpl=Tmpl&vbcrlf&"<option value='"&n_id&"'"
        If oServerID=n_id Then Tmpl=Tmpl&vbcrlf&" selected"
        Tmpl=Tmpl&vbcrlf&">"&rs3(1)&"</option>"
    	rs3.movenext
  	loop
  	rs3.close
  	set rs3=nothing
	Tmpl=Tmpl&vbcrlf&"</select>" & _
	vbcrlf&"</td>" & _
	vbcrlf&"</tr>"
    Server_InitSelect=Tmpl
End Function

Function Ok_Home(oReward,oSolves,oReplys,oExpired)
Dim Tmpl
dim ddim,dnum,dim_Ok
dim_Ok=split(Cls.ChannelOption,"|")
     Tmpl=Tmpl&"<tr class=bg_td>" & _
     vbcrlf&"<td>"&tit_fir&"悬赏分：</td>" & _
     vbcrlf&"<td><select name=Reward  size=1>"
     ddim=split(dim_Ok(4),":")
     for i=0 to ubound(ddim)
     Tmpl=Tmpl&vbcrlf&"<option"
     if int(oReward)=int(ddim(i)) then Tmpl=Tmpl&vbcrlf&" selected"
     Tmpl=Tmpl&vbcrlf&">"&int(ddim(i))&"</option>"
     next
     erase ddim
     Tmpl=Tmpl&vbcrlf&"</select>&nbsp;&nbsp;" 
     If oSolves<>"s" Then
	 Tmpl=Tmpl&vbcrlf&"是否解决：<input type=checkbox name=Solves value='yes'"
	 if int(oSolves)=1 then Tmpl=Tmpl&vbcrlf&" checked"
	 Tmpl=Tmpl&vbcrlf&">&nbsp;&nbsp;&nbsp;&nbsp;" 
     End If
     If oReplys<>"s" Then
	 Tmpl=Tmpl&vbcrlf&"回答数：<input type=text name=replys value='"&oReplys&"' size=10 maxlength=7>&nbsp;&nbsp;&nbsp;&nbsp;" 
     End If
	 Tmpl=Tmpl&vbcrlf&"过期时间：<input type=text name=Expired value='"&oExpired&"' size=15 maxlength=20>&nbsp;&nbsp;<input type=button name=st_btn value='选择' onclick='javascript:select_time(Expired);return false;' class=Ok_btn>" & _
     vbcrlf&"</td>" & _
     vbcrlf&"</tr>" 
Ok_Home=Tmpl
End Function

Function Music_Home(ABCD,Sex,Comp,bir,lang)
Dim Tmpl
dim ddim,dnum,dim_Ok
dim_Ok=split(Cls.ChannelOption,"|")
     Tmpl=Tmpl&"<tr class=bg_td>" & _
     vbcrlf&"<td colspan=2>"&tit_fir&"字母索引：" & _
     vbcrlf&"<select name=ABCD  size=1>"
     ddim=split(dim_Ok(7),":")
     for i=0 to ubound(ddim)
     Tmpl=Tmpl&vbcrlf&"<option"& _
     vbcrlf&" selected"& _
     vbcrlf&">"&ddim(i)&"</option>"
     next
     erase ddim
    Tmpl=Tmpl&"</select>" & _
     vbcrlf&"&nbsp;&nbsp;"&tit_fir&"性别：" & _
     vbcrlf&"<select name=Sex  size=1>"
     ddim=split(dim_Ok(8),":")
     for i=0 to ubound(ddim)
     Tmpl=Tmpl&vbcrlf&"<option"& _
     vbcrlf&" selected"& _
     vbcrlf&">"&ddim(i)&"</option>"
     next
     erase ddim
     Tmpl=Tmpl&"</select>&nbsp;&nbsp;" & _
     vbcrlf&""&tit_fir&"隶属公司：" & _
     vbcrlf&"<select name=Comp  size=1>"
     ddim=split(dim_Ok(9),":")
     for i=0 to ubound(ddim)
     Tmpl=Tmpl&vbcrlf&"<option"& _
     vbcrlf&" selected"& _
     vbcrlf&">"&ddim(i)&"</option>"
     next
     erase ddim
     Tmpl=Tmpl&vbcrlf&"</select>&nbsp;&nbsp;"& _
         vbcrlf&""&tit_fir&"专集语言：" & _
     vbcrlf&"<select name=lang  size=1>"
     ddim=split(dim_Ok(10),":")
     for i=0 to ubound(ddim)
     Tmpl=Tmpl&vbcrlf&"<option"& _
     vbcrlf&" selected"& _
     vbcrlf&">"&ddim(i)&"</option>"
     next
     erase ddim
     Tmpl=Tmpl&vbcrlf&"</select>&nbsp;&nbsp;"& _
     vbcrlf&"歌手生日：<input type=text name=bir value='"&bir&"' size=10 maxlength=20>&nbsp;&nbsp;<input type=button name=st_btn value='选择' onclick='javascript:select_time(bir);return false;' class=btn>" & _
     vbcrlf&"</td>" & _
     vbcrlf&"</tr>" 
Music_Home=Tmpl
End Function

'-----------------------------------栏目选择------------------------------------
function sel_s_id(Url,oChannelIDs,oClassDepth,oClassID)
dim sTmp,Music_id,chi
sTmp=sTmp&vbcrlf&"<select class=input name=ClassID size=1 onchange=""window.open('"&Url&"&ClassID='+this.options[this.selectedIndex].value+'&n_id="&n_id&"','_self')"">"&_
	      vbcrlf&"<option color=red>选择栏目</option>"
	sql3="Select C_ID,ClassName,ClassParent,ClassParentStr,ClassDepth,ClassChild,ClassID from AsaiMHClass Where ChannelIDs="&oChannelIDs&" And ClassDepth<"&oClassDepth&" Order By ClassID,ClassOrder,ClassDepth"
	Set Rs3=Cls.Exec(sql3,1)
	Do While Not Rs3.Eof
		Music_id=Int(Rs3(0))
		If Int(Rs3(5)<>0) then  Music_id=-1
		If Int(Rs3(2))=0 Then
			sTmp=sTmp&"<option value='"&Music_id&"' class=bg_2"
			If oClassID=Music_id Then sTmp=sTmp&" selected"
			sTmp=sTmp&">"&rs3(1)&"</option>"
		Else
			sTmp=sTmp&"<option value='"&Music_id&"'"
			If (oClassID=Music_id and Music_id > 0) Then sTmp=sTmp&" selected"
			sTmp=sTmp&">"
			For chi=1 To Int(rs3(4))-1
				sTmp=sTmp&"│"
			Next
			sTmp=sTmp&"├"&rs3(1)&"</option>"
		End If
		Rs3.Movenext
	Loop
	Rs3.Close:Set Rs3=Nothing
	sTmp=sTmp&"</select>"
	sel_s_id=sTmp
end function

'-----------------------------------歌手选择------------------------------------
Function sel_n_id(url)
Dim sTmp
sTmp=sTmp&vbcrlf&"<select class=input name=n_id size=1 onchange=""window.open('"&url&"&ClassID="&ClassID&"&n_id='+this.options[this.selectedIndex].value,'_self')"">"&_
          vbcrlf&"<option color=red>歌手专集</option>"
if ClassID<>"" then
sql="select * from AsaiMHMusicSinger where ClassID="&ClassID
set rs=Cls.exec(sql,1)
Do while not rs.eof
sTmp=sTmp&"<option value="&CStr(rs("id"))&" class=bg_2"
if n_id=cstr(rs("id")) and n_id<>"" then sTmp=sTmp&" selected" 
sTmp=sTmp&">"&rs("name")&"</option>"
rs.MoveNext
Loop
rs.close
end if
sTmp=sTmp&"</select>"
sel_n_id=sTmp
end function

'-----------------------------------专辑选择------------------------------------
Function sel_d_id(url)
Dim sTmp
sTmp=sTmp&vbcrlf&"<select class=input name=d_id size=1>"&_
          vbcrlf&"<option color=red>选择专集</option>"
if n_id="" then exit function
sql="select * from AsaiMHMusicDisk where n_id="&n_id
set rs=Cls.exec(sql,1)
Do while not rs.eof
sTmp=sTmp&" <option value="&CStr(rs("id"))&" class=bg_2"
 if d_id=cstr(rs("id")) and d_id<>"" then sTmp=sTmp&" selected" 
 sTmp=sTmp&">"&rs("name")&"</option>"
 rs.MoveNext
Loop
rs.close
sTmp=sTmp&"</select>"
sel_d_id=sTmp
end function

Function put_close(tvar)
dim n_put
n_put="<div align=center><font color=red>对不起！本站暂时关闭 <font class=blue>"&tit&"</font> 的功能。</font><br /><br />如有需要，请与管理员联系。谢谢！</div>"
  Cls.ReadPage "mod_close"
  Cls.HtmlRcod "n_put",n_put
  Cls.HtmlRcod "tit_dir","发表"&Cls.ChannelTit
  Cls.HtmlRcod "ChannelTit",Cls.ChannelTit
  Cls.HtmlRcod "ChannelName",Cls.ChannelName
  Cls.OutPage
End Function
%>
