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

Dim ViewData			'浏览数据数组
Dim iSpecialID
iSpecialID = Cls.Code_ID("ID")

'//* 载入频道数据分类 *//
Public Sub Channel_Load(LoadType)
    Call Channel_Loader()
	Call Cid_Load()
	Call Class_Load()
	If LoadType = 0 Then
	   Call DoWebHead(0,0)
	ElseIf LoadType = 1 Then
	   Call DoWebHead(2,1)
	End If
End Sub

'//* 释放频道数据分类 *//
Public Sub Channel_End(Endtype)
	If IsArray(ViewData) Then Erase ViewData
	Call Class_End()
	If Endtype=0 Then Call DoWebEnd()
End Sub

'//* 频道数据分类并跳转网页 *//
Public Sub Channel_Redirect(frvar)
	Call Channel_End(0)
	Call Format_Redirect(frvar)
End Sub

Dim is_Download,v_id,v_username,v_name,v_tcolor,v_sizes,v_genre,v_os,v_power,v_emoney,v_url,v_Password,v_pic,v_homepage,v_remark,v_tim,v_counter,v_keyes,v_types,v_cod,tmp_err,tmp_commend,v_file,v_notdown
Dim iSpecialTopic, iSpecialRemark, iSpecialTim
Dim StrDownLoadUrl,DownLoadUrl,UrlID

Public Function ShowChannelIndex(IsHtml)
        Tit=Cls.ChannelName:tit_fir=""
		Tit_Dir = "频道首页"
        HtmlContent = Cls.ReadTemplate(0)
        Call LoadChannelMainList(0)
		Call LoadChannelSort(0,0)
		Call LoadChannelSearch()
		Call LoadChannelSpecial()
		HtmlContent = Html.ReadWebHead(HtmlContent)
		HtmlContent = Html.ReadWebEnd(HtmlContent)
		HtmlContent = Html.ReadUserLogin(HtmlContent)
		HtmlContent = Html.ReadSoftList(HtmlContent)
		HtmlContent = Html.ReadSoftPic(HtmlContent)
		HtmlContent = Html.ReadFlashPic(HtmlContent)
		HtmlContent = Html.ReadCast(HtmlContent)
		HtmlContent = Html.ReadVote(HtmlContent)
		HtmlContent = Html.ReadChannelMenu(HtmlContent)
		HtmlContent = Cls.ReHtml(HtmlContent,0)
		If IsHtml=True Then
		ShowChannelIndex = HtmlContent
		Else
		Response.Write HtmlContent
		End If
End Function

Public Function ShowChannelLists(IsHtml,ClsID)
		tit=Cls.ChannelTit&"列表"
	    Tit_Dir = Class_Grade(ClsID,Cls.ClassDepth) & Tit
	    tit_fir=Cls.ChannelName
		IndexUrl=Cls.Web_Dir & Cls.ChannelDir
		HtmlContent = Cls.ReadTemplate(2)
        Call LoadChannelMainList(ClsID)
		Call LoadChannelSort(ClsID,0)
		Call LoadChannelSearch()
		Call LoadChannelSpecial()
		Call Html.LoadReplaced()		
 		HtmlContent = Html.ReadWebHead(HtmlContent)
		HtmlContent = Html.ReadWebEnd(HtmlContent)
		HtmlContent = Html.ReadUserLogin(HtmlContent)
    	HtmlContent = Html.ReadSoftList(HtmlContent)
		HtmlContent = Html.ReadSoftPic(HtmlContent)
		HtmlContent = Html.ReadChannelMenu(HtmlContent)
		HtmlContent = Cls.ReHtml(HtmlContent,0)	
 		If IsHtml=True Then
		ShowChannelLists = HtmlContent
		Else
		Response.Write HtmlContent
		End If	
End Function

Public Function ShowChannelList(IsHtml,ClsID,PgID,ListAction)
	    Select Case ListAction
	    Case "pic"
	    	tit="图片"&Cls.ChannelTit
	        tit_fir=Cls.ChannelName
			IndexUrl=Cls.Web_Dir & Cls.ChannelDir
			HtmlContent = Cls.ReadTemplate(1)
	    Case "focus"
	    	tit="焦点"&Cls.ChannelTit
    	    tit_fir=Cls.ChannelName
			IndexUrl=Cls.Web_Dir & Cls.ChannelDir
			HtmlContent = Cls.ReadTemplate(1)
        Case "good"
   	    	tit="推荐"&Cls.ChannelTit
   	        tit_fir=Cls.ChannelName
			IndexUrl=Cls.Web_Dir & Cls.ChannelDir
			HtmlContent = Cls.ReadTemplate(1)
	    Case "hot"
	     	tit="热门"&Cls.ChannelTit
	        tit_fir=Cls.ChannelName
			IndexUrl=Cls.Web_Dir & Cls.ChannelDir
			HtmlContent = Cls.ReadTemplate(1)
	    Case "search"
	    	tit=Cls.ChannelTit&"搜索"
	    	tit_fir=Cls.ChannelName
			Tit_Dir = Class_Grade(ClsID,Cls.ClassDepth) & Tit
			IndexUrl=Cls.Web_Dir & Cls.ChannelDir
			HtmlContent = Cls.ReadTemplate(1)
		Case "special"
	    	tit=Cls.ChannelTit&"专题"
	    	tit_fir=Cls.ChannelName	
			IndexUrl=Cls.Web_Dir & Cls.ChannelDir
			HtmlContent = Cls.ReadTemplate(4)
                                HtmlContent = Replace(HtmlContent, "{$SpecialID}", iSpecialID)
			HtmlContent = Replace(HtmlContent, "{$s_name}", iSpecialTopic)
			HtmlContent = Replace(HtmlContent, "{$s_remark}", iSpecialRemark)
			HtmlContent = Replace(HtmlContent, "{$s_tim}", iSpecialTim)
		Case Else
		    tit=Cls.ChannelTit&"列表"
			tit_fir=Cls.ChannelName
	    	Tit_Dir = Class_Grade(ClsID,Cls.ClassDepth) & Tit
			IndexUrl=Cls.Web_Dir & Cls.ChannelDir
			HtmlContent = Cls.ReadTemplate(1)
	    End Select
  Dim taxis
  Dim ListContent,ListContents,HtmlUrl
  Dim Mhead,obj_search,obj_page
  Dim Tempstr, PageCt
  Dim SQL, i, foundstr, ListStyle
  Dim sDot,sTitle, sTopic, BestCode, BestString
  Dim ArticleTopic, ClassName, HtmlFileUrl, ImageUrl, WriteTime, LinkTarget, HtmlFileName
  Dim tmp_sql,tmp_sql_order,tmp_url
  taxis=Cls.Code_Query("taxis")
  Mhead="":tmp_url=""
  Select Case ListAction
  Case "hot"
      mhead=tit
      tmp_sql="A.counter>20"
      tmp_sql_order="A.counter desc"
	If Cls.RssTrue Then ChannelRss=" <link type='application/rss+xml' rel='alternate'><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/RssFeed.asp?action=hot' target=_blank><img src='"&Cls.Web_SkinDir&"sys/"&Cls.ChannelDir&"_rss_xml.gif' class=xrss border=0 title='RSS 2.0 支持'></a>"
  Case "good"
      mhead=tit
      tmp_sql="A.isgood=1"
	If Cls.RssTrue Then ChannelRss=" <link type='application/rss+xml' rel='alternate'><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/RssFeed.asp?action=good' target=_blank><img src='"&Cls.Web_SkinDir&"sys/"&Cls.ChannelDir&"_rss_xml.gif' class=xrss border=0 title='RSS 2.0 支持'></a>"
  Case "focus"
      mhead=tit
      tmp_sql="A.isfocus=1"
	If Cls.RssTrue Then ChannelRss=" <link type='application/rss+xml' rel='alternate'><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/RssFeed.asp?action=focus' target=_blank><img src='"&Cls.Web_SkinDir&"sys/"&Cls.ChannelDir&"_rss_xml.gif' class=xrss border=0 title='RSS 2.0 支持'></a>"
  Case "pic"
      mhead=tit
      tmp_sql="A.ispic=1"	
	If Cls.RssTrue Then ChannelRss=" <link type='application/rss+xml' rel='alternate'><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/RssFeed.asp?action=pic' target=_blank><img src='"&Cls.Web_SkinDir&"sys/"&Cls.ChannelDir&"_rss_xml.gif' class=xrss border=0 title='RSS 2.0 支持'></a>"	  	  
  Case "search"
  	  if int(ClsID)>0 then
	  tmp_sql="A.ClassID in ("&Class_Cid_Get(Clsid)&")"
	  else
	  tmp_sql=""
	  end if
      set obj_search=New Cls_Search
      obj_search.inc_url="?c_id="&ClsID&"action=Search&"
      obj_search.inc_sql=tmp_sql
      call obj_search.format_search("A.Name","A.Name,A.keyes,A.username",2,1,0)
      tmp_url=obj_search.inc_url
      tmp_sql=obj_search.inc_sql
      tmp_keyword=obj_search.keyword
      mhead=mhead&"（"&Cls.code_html(obj_search.keyword,1,0)&"）"
      set obj_search=nothing
  Case "special"
	 tmp_url="?ID="&iSpecialID&"&"
	 tmp_sql="A.SpecialID="&iSpecialID
	 mhead=tit
	 If Cls.RssTrue Then ChannelRss=" <link type='application/rss+xml' rel='alternate'><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/RssFeed.asp?action=special&id="&iSpecialID&"' target=_blank><img src='"&Cls.Web_SkinDir&"sys/"&Cls.ChannelDir&"_rss_xml.gif' class=xrss border=0 title='RSS 2.0 支持'></a>"	
  Case Else
	  if int(ClsID)>0 then tmp_sql="A.ClassID="&ClsID
	  mhead=tit
	  If Cls.RssTrue Then ChannelRss=" <link type='application/rss+xml' rel='alternate'><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/RssFeed.asp?c_id="&ClsID&"' target=_blank><img src='"&Cls.Web_SkinDir&"sys/"&Cls.ChannelDir&"_rss_xml.gif' class=xrss border=0 title='RSS 2.0 支持'></a>"	
  End Select
  if tmp_sql="" then
    tmp_sql="A.hidden=1"
  else
    tmp_sql="A.hidden=1 and "&tmp_sql
  End if
  Select Case taxis
  Case "tim"
    tmp_sql_order="A.tim Desc"
  Case "counter"
    tmp_sql_order="A.counter Desc"
  Case "types"
    tmp_sql_order="A.types Desc"
  Case Else
    tmp_sql_order=""
  End Select  
  if tmp_sql_order="" then
    tmp_sql_order="A.istop desc,A.id desc"
  else
    tmp_sql_order=tmp_sql_order&",A.istop desc,A.id desc"
  End if
  set obj_page=New Cls_PageCute
  obj_page.nummer=Cls.ChannelListNum
  obj_page.page_tit=Cls.ChannelTit
  obj_page.page_unit=Cls.ChannelUnit
  obj_page.v_id="A.id"
  if action="hot" then obj_page.v_id="A.counter"
  tmp_sql=tmp_sql&" And A.ChannelIDs="&ChannelIDs
  call obj_page.p_init("","["&Cls.ChannelTable&"] A INNER JOIn [AsaiMHClass] C ON A.ClassID=C.C_ID",tmp_sql,"")
  sql=obj_page.sql_count
  set rs=Cls.exec(sql,1)
  obj_page.rssum=rs(0)
  rs.close
	    If Instr(HtmlContent,"[ShowList]") > 0 Then
	        ListContents=""
            ListContent = Cls.CutFixContent(HtmlContent, "[ShowList]" , "[/ShowList]", 0)
			'检查分页数据
			If PgID<>"" then obj_page.setpage=PgID
			Call obj_page.p_main("A.ID,A.ClassID,A.TColor,A.Name,A.Ispic,A.sizes,A.types,A.counter,A.remark,A.genre,A.os,A.username,A.Pic,A.Tim,A.isgood,A.isfocus,A.istop,A.HtmlFileDate,C.ClassName,C.HtmlFileDir","["&Cls.ChannelTable&"] A INNER JOIn [AsaiMHClass] C ON A.ClassID=C.C_ID",tmp_sql,tmp_sql_order)
			'循还读数据
            For i=1 to obj_page.page_num
                If rs.eof Then exit for
				If (i Mod 2) = 0 Then
					ListStyle = "ll" & 1
				Else
					ListStyle = "ll" & 2
				End If
				If Rs("isgood") <> 0 Then
					BestCode = 2
					BestString = "<font color='red'>推荐</font>"
				Else
					BestCode = 1
					BestString = ""
				End If
				'前标
				sDot=Cls.GetDot(rs("istop"),rs("isfocus"),rs("isgood"))
				'sTopic = Cls.GetIncInfo(Rs("IncludeInfo"))
				sTitle = Cls.Cuted(Rs("name"), Cls.ChannelCuteNum)
				sTitle = Cls.GetTcolor(sTitle,rs("tcolor"),False)
				'-------------搜索关键字显亮 
				sTitle = Cls.Channel_Search(sTitle)
				ClassName = Rs("ClassName")
				If CInt(Cls.ChannelIsCreatHtml) <> 0  Then
					HtmlFileName = Cls.ReadFileName(Rs("HtmlFileDate"), Rs("ID"), Cls.ChannelHtmlExtName, Cls.ChannelHtmlPrefix, Cls.ChannelHtmlForm, "")
					HtmlFileUrl = Cls.Web_Dir& Cls.ChannelDir & "/" & Rs("HtmlFileDir") & Cls.ShowDatePath(Rs("HtmlFileDate"), Cls.ChannelHtmlPath) & HtmlFileName
					ClassName = "<a href='" & Cls.ChannelPath & Rs("HtmlFileDir") & "Index_1" & Cls.ChannelHtmlExtName & "'>" & ClassName & "</a>"
				Else
					HtmlFileUrl = Cls.ChannelPath & "View.asp?id=" & Rs("ID")
					ClassName = "<a href='" & Cls.ChannelPath & "List.asp?c_id=" & Rs("ClassID") & "'>" & ClassName & "</a>"
				End If
				WriteTime = Cls.ShowDateTime(Rs("tim"),6)
				If Cls.ChannelIsNewWindow <> 0 Then
					LinkTarget = " target=""_blank"""
				Else
					LinkTarget = ""
				End If
				If rs("Pic")="" then
					   ImageUrl = Cls.Web_Dir&"Skin/no_pic.gif"
				else
					   ImageUrl = rs("Pic")
				end if
				ImageUrl = "<img src='"&ImageUrl&"' width=" & Cls.ChannelPicWidth & " height=" & Cls.ChannelPicHeight & " class=""ig"">"		
				ArticleTopic = "<a href='" & HtmlFileUrl & "'" & LinkTarget & " title='" & Cls.ChannelModule & "标题：" & Rs("name") & "&#13;&#10;发布时间：" & Rs("tim") & "&#13;&#10;下载次数：" & Rs("counter") & "'>" & sTitle & "</a>"
				Tempstr = ListContent
				Tempstr = Replace(Tempstr, "{$SoftTopic}", ArticleTopic)
                Tempstr = Replace(Tempstr, "{$SoftPicture}", Cls.GetPic("<a href='" & HtmlFileUrl & "' title='" & Rs("name") & "'" & LinkTarget & ">" & ImageUrl & "</a>"))
				Tempstr = Replace(Tempstr, "{$SoftID}", Rs("ID"))
				Tempstr = Replace(Tempstr, "{$SoftTitle}", sTitle)
				Tempstr = Replace(Tempstr, "{$Title}", Rs("name"))
				Tempstr = Replace(Tempstr, "{$Date}", Rs("tim"))
				Tempstr = Replace(Tempstr, "{$Dot}", sDot)
				Tempstr = Replace(Tempstr, "{$HtmlFileUrl}", HtmlFileUrl)
				Tempstr = Replace(Tempstr, "{$ClassName}", ClassName)
				Tempstr = Replace(Tempstr, "[]", "")
				Tempstr = Replace(Tempstr, "{$Target}", LinkTarget)
				Tempstr = Replace(Tempstr, "{$Time}", WriteTime)
				Tempstr = Replace(Tempstr, "{$SoftHits}", Rs("counter"))
				Tempstr = Replace(Tempstr, "{$ListStyle}", ListStyle)
				Tempstr = Replace(Tempstr, "{$BestCode}", BestCode)
				Tempstr = Replace(Tempstr, "{$BestString}", BestString)
				Tempstr = Replace(Tempstr, "{$SoftSize}", rs("sizes"))
				Tempstr = Replace(Tempstr, "{$SoftTypes}", rs("types"))
				Tempstr = Replace(Tempstr, "{$SoftGenre}", rs("genre"))
				Tempstr = Replace(Tempstr, "{$SoftOs}", rs("os"))
				Tempstr = Replace(Tempstr, "{$SoftRemark}", Cls.Code_Cut(rs("remark"),180))
				ListContents=ListContents&Tempstr
                rs.movenext
            Next	
  rs.close
  If Cls.ChannelIsCreatHtml = True And ListAction<>"search" then
  obj_page.pageurl="index_"
  obj_page.pagevar=""
  obj_page.pagefirvar="index_1"&Cls.ChannelHtmlExtName
  obj_page.pageext=Cls.ChannelHtmlExtName
  Else
	  if ListAction="search" then
	    obj_page.pageurl = tmp_url
	  elseif  ListAction<>"" and ListAction<>"List" then
        obj_page.pageurl=obj_page.pageurl&"ID="&iSpecialID&"&Action="&ListAction&"&"
	  else
	    obj_page.pageurl="?c_id="&ClsID&"&"
	  end if
  End if
        '内容载入替换，并输出或返回 
		HtmlContent = Replace(HtmlContent,"[ShowList]" & ListContent&"[/ShowList]",ListContents)
		HtmlContent = Replace(HtmlContent,"{$tit}", Tit)
		HtmlContent = Replace(HtmlContent,"{$mhead}", mhead)
		HtmlContent = Replace(HtmlContent,"{$Channel_Xml}", ChannelRss)
				PageCt="" & _               
		vbcrlf&"<div style='text-align:right;'><script language=javascript>" & _
               vbcrlf&"function SelectTo(tvar)" & _
               vbcrlf&"{" & _
               vbcrlf&"  if (tvar=="""" || tvar==null) {return;}" & _
               vbcrlf&"  location.href='"&Cls.Web_Dir&Cls.ChannelDir&"/List.asp?c_id="&Clsid&"&Action="&ListAction&"&taxis='+tvar;" & _
               vbcrlf&"}" & _
               vbcrlf&"</script>" & _
               vbcrlf&"<select name=ListAction size=1 onchange=""javascript:SelectTo(this.options[this.selectedIndex].value);"">" & _
               vbcrlf&"<option value=''>－请选择显示方式－</option>" & _
               vbcrlf&"<option value='tim'"
           if taxis="tim" then PageCt=PageCt&" selected"
           PageCt=PageCt&">按整理时间排序</option>" & _
               vbcrlf&"<option value='counter'"
           if taxis="counter" then PageCt=PageCt&" selected"
           PageCt=PageCt&">按软件人气排序</option>" & _
               vbcrlf&"<option value='types'"
           if taxis="types" then PageCt=PageCt&" selected"
           PageCt=PageCt&">按软件等级排序</option>" & _
               vbcrlf&"</select></div>"
           PageCt=PageCt&"<div id='asaipage'>"&obj_page.page_var&" "&obj_page.page_cute&" "&obj_page.page_shortcut&"</div>"
		HtmlContent = Replace(HtmlContent,"{$PageCute}",PageCt)
		Call LoadChannelSort(ClsID,1)
		Call LoadChannelSearch()
		Call LoadChannelSpecial()
		Call Html.LoadReplaced()
		HtmlContent=Replace(HtmlContent,"{$ClassID}",ClsID)
 		HtmlContent = Html.ReadWebHead(HtmlContent)
		HtmlContent = Html.ReadWebEnd(HtmlContent)
		HtmlContent = Html.ReadUserLogin(HtmlContent)
		HtmlContent = Html.ReadSoftList(HtmlContent)
		HtmlContent = Html.ReadSoftPic(HtmlContent)
		'HtmlContent = Html.ReadRssList(HtmlContent)
		HtmlContent = Html.ReadChannelMenu(HtmlContent)
		HtmlContent = Cls.ReHtml(HtmlContent,0)	
 		If IsHtml=True Then
		    ShowChannelList = HtmlContent
		Else
		    Response.Write HtmlContent
		End If
	    set obj_page=nothing 	
  End If
End Function

Sub ShowChannelDownload(vid)
	'检测
	if not Cls.post_chk() then
		Call Cls.Out_Msg("请勿非法盗链或下载本站软件！\n\n请不要使用WebZip、Teleport这类软件下载本站数据！\n\n也不要使用googlebot这类浏览器浏览本站！\n\n请停止非法操作或更改浏览器，谢谢合作！","")
		call web_clear(1)
	end If
	'载入
	If Cls.Is_Null(vid)="" Then vid=Cls.Code_ID("id")
	v_id=vid
	UrlID=Cls.Code_ID("UrlID")
	SQL="Select Top 1 * From "&Cls.ChannelTable&" Where hidden=1 And ChannelIDs="&ChannelIDs&" And id="&v_id
	Set Rs=Cls.Exec(SQL,1)
	If Rs.Eof Then
		Rs.Close
		Call Channel_Redirect(Cls.Web_Dir&Cls.ChannelDir)
	End If
	v_power=rs("power")
	v_emoney=rs("emoney")
	v_url=rs("url")
	v_notdown=Rs("NotDown")
	Rs.Close
	if v_notdown=false then
    		Call Cls.Out_Msg("对不起，本软件已停止下载！","")
		call web_clear(1)
	End If
	'权限
	Dim chkpower,chkemoney,ChkMsg
	chkpower=true
	chkemoney=true
	chkpower=chk_power(v_power,ChannelIDs)
	chkemoney=chk_emoney(v_emoney,"Down",v_id,ChannelIDs)
	If login_mode<>"" Then
		if not chkemoney then 
			If int(login_emoney) >= int(v_emoney) then
				ChkMsg="<p align=center><br /><br />下载此"&Cls.ChannelTit&"需要扣除<b><font color=red>"&v_emoney&"</font></b>"&Cls.Web_Unit&",你目前尚有<b><font color=blue>"&login_emoney&"</font></b>"&Cls.Web_Unit&"可用<br /><br />你确实愿意支付<b><font color=red>"&v_emoney&"</font></b>"&Cls.Web_Unit&"来下载此"&Cls.ChannelTit&"吗？<br /><br /><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/View.asp?Action=Download&id="&v_id&"&UrlID="&UrlID&"&pay=yes'>我愿意</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='"&Cls.Web_Dir&Cls.ChannelDir&"'>我不愿意</a></p>"
			else
				ChkMsg="<p align=center><br /><br />对不起，下载本"&Cls.ChannelTit&"需要扣除<b><font color=red>"&v_emoney&"</font></b>"&Cls.Web_Unit&",你目前只有<b><font color=blue>"&login_emoney&"</font></b>"&Cls.Web_Unit&"可用<br /><br />你的"&Cls.Web_Unit&"不足，无法下载"&Cls.ChannelTit&"，请联系管理员进行充值！</p>"
			end if
		end if
		if not chkpower then ChkMsg="<p align=center><br /><br />对不起，你没有下载此"&Cls.ChannelTit&"的权限！</p>"
	else
		if not(chkpower and chkemoney) then ChkMsg="<br />&nbsp;&nbsp;&nbsp;&nbsp;你还没注册？或者没有登录？此"&Cls.ChannelTit&"要求至少是本站的注册用户才能下载！<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;如果你还没注册，请赶紧<a href='"&Cls.Web_Dir&"User/Register.asp'><font color=red>点此注册</font></a>吧！<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;如果你已经注册但还没登录，请赶紧<a href='"&Cls.Web_Dir&"User/Login.asp?old_url=back'><font color=red>点此登录</font></a>吧！<br /><br />"
	end if
	if not(chkpower and chkemoney) then 
		Response.Write ChkMsg
		Response.End
	end if
	StrDownLoadUrl=v_url
	if InStr(StrDownLoadUrl,"@@@")>0 then
		StrDownLoadUrl=Split(StrDownLoadUrl,"@@@")
		for i=0 to Ubound(StrDownLoadUrl)
			if UrlID=i+1 then
				DownLoadUrl=Split(StrDownLoadUrl(i),"|")(1)
				exit for
			end if
		next
	else
		if UrlID=1 then DownLoadUrl=Split(StrDownLoadUrl,"|")(1)
	end if
	if DownLoadUrl="" or DownloadUrl="http://" then
		Call Cls.Out_Msg("找不到有效下载地址，请点确定返回，然后点击其它下载地址！","javascript:window.close()")
	end if
	Call Cls.Exec("update "&Cls.ChannelTable&" set counter=counter+1 where id="&v_id,0)
	DownLoadUrl=Cls.ReHtml(DownLoadUrl,1)
	Call web_clear(0)
	Response.Clear
	'Response.write("noDownload")
	Response.Redirect DownLoadUrl
	Response.End
End Sub

'//* 频道浏览 *//
Public Function ShowChannelView(Vid,IsHtml)
    '初始载入
	tit=Cls.ChannelTit&"浏览"
   If Cls.Is_Null(vid)="" Then vid=Cls.Code_ID("id")
   v_id=vid
	SQL="Select Top 1 * From "&Cls.ChannelTable&" Where hidden=1 And ChannelIDs="&ChannelIDs&" And id="&v_id
	Set Rs=Cls.Exec(SQL,1)
	If Rs.Eof Then
	   Rs.Close
		Call Channel_Redirect(Cls.Web_Dir&Cls.ChannelDir)
	End If
	cid=rs("ClassID")
	v_username=rs("username")
	v_name=rs("name")
	v_tcolor=rs("tcolor")
	v_sizes=rs("sizes")
	v_genre=rs("genre")
	v_os=rs("os")
	v_power=rs("power")
	v_emoney=rs("emoney")
	v_url=rs("url")
	v_Password=rs("Password")
	v_pic=rs("pic")
	v_homepage=rs("homepage")
	v_remark=rs("remark")
	v_tim=rs("tim")
	v_cod=rs("cod")
	v_counter=rs("counter")
	v_keyes=rs("keyes")
	v_types=rs("types")
	v_file=Rs("HtmlFileDate")
	v_notdown=Rs("NotDown")
	Rs.Close
	'头部信息
	If Int(Web_Dim(15)) = 0 Then
	   tit=tit&"--"&v_name
        Else
	   tit=v_name&"--"&tit
	End if
	Tit_Dir = Class_Grade(Cid,Cls.ClassDepth) & Cls.ChannelTit&"浏览" &":"& Tit
	tit_fir=Cls.ChannelName
	IndexUrl=Cls.Web_Dir & Cls.ChannelDir
   '信息处理
  if v_pic<>"" then
     v_pic=pic_show(v_pic,12,v_pic)
	 else
	 v_pic=pic_show(Cls.Web_Dir&"Images/no_pic_show.gif",12,Cls.Web_Dir&"Images/no_pic_show.gif")
  End if
  if Cls.Is_Null(v_tcolor)<>"" then v_name="<font color="&v_tcolor&">"&v_name&"</font>"
  If Cls.ErrTrue Then tmp_err=commend_error(ChannelIDs,v_name,v_id,Cls.ChannelName)
  tmp_commend=format_commend(Cls.ChannelName,v_name,Cls.Web_Dir&Cls.ChannelDir&"/View.asp?id="&v_id)
  Dim tmp_DownURL
  tmp_DownURL = "<table border=0 cellspacing=1 cellpadding=4 width='100%'>"
  if v_notdown=false then
    	tmp_DownURL=tmp_DownURL&"<tr><td><font color=red><b>对不起，本"&Cls.ChannelTit&"已停止下载！</b></font></td></tr>"
  else
  	if v_url = "" then
    		tmp_DownURL=tmp_DownURL&"<tr><td><font class=red_3><b>对不起，暂停下载！</b></font></td></tr>"
  	else
		if Instr(v_url,"@@@")>0 then
			dim StrDownUrl
			StrDownUrl=Split(v_url,"@@@")
			for i=0 to Ubound(StrDownUrl)
				tmp_DownURL=tmp_DownURL&"<img src='"&Cls.Web_dir&"images/small/Download.gif' border=0 align=absMiddle>&nbsp;<a href='"&Cls.Web_Dir&Cls.ChannelDir&"/View.asp?action=Download&id="&v_id&"&UrlID="&i+1&"' target=_blank>"&Split(StrDownUrl(i),"|")(0)&"</a>&nbsp;"
			next
		else
				tmp_DownURL=tmp_DownURL&"<img src='"&Cls.Web_dir&"images/small/Download.gif' border=0 align=absMiddle>&nbsp;<a href='"&Cls.Web_Dir&Cls.ChannelDir&"/View.asp?action=Download&id="&v_id&"&UrlID=1' target=_blank>"&Split(v_url,"|")(0)&"</a>&nbsp;"
		end if
  	End If
  End If
  tmp_DownURL=tmp_DownURL&"</table>"
  HtmlContent=Cls.ReadTemplate(3)  
  HtmlContent=Replace(HtmlContent,"{$id}",v_id)  
  HtmlContent=Replace(HtmlContent,"{$name}",v_name) 
  HtmlContent=Replace(HtmlContent,"{$genre}",v_genre)
  HtmlContent=Replace(HtmlContent,"{$os}",v_os)
  HtmlContent=Replace(HtmlContent,"{$sizes}",v_sizes)
  HtmlContent=Replace(HtmlContent,"{$types}",v_types)
  HtmlContent=Replace(HtmlContent,"{$emoney}",v_emoney)
  HtmlContent=Replace(HtmlContent,"{$power}",v_power)
  HtmlContent=Replace(HtmlContent,"{$emony_power}",format_emoney_power(v_emoney,v_power,1))
  HtmlContent=Replace(HtmlContent,"{$tit_fir}",Cls.ChannelTit)
  HtmlContent=Replace(HtmlContent,"{$tcolor}",v_tcolor)
  HtmlContent=Replace(HtmlContent,"{$tim}",Cls.time_type(v_tim,4))
  HtmlContent=Replace(HtmlContent,"{$tit}",tit)
  HtmlContent=Replace(HtmlContent,"{$tit_fir}",Cls.ChannelTit)
  HtmlContent=Replace(HtmlContent,"{$pic}",v_pic)
  HtmlContent=Replace(HtmlContent,"{$username}",format_user_view(v_username,1,0))
  HtmlContent=Replace(HtmlContent,"{$commend_friend}",tmp_commend)
  HtmlContent=Replace(HtmlContent,"{$commend_err}",tmp_err)
  if Cls.Is_Null(v_homepage)="" or Lcase(v_homepage)="http://" then
    HtmlContent=Replace(HtmlContent,"{$homepage}","<font class=Gys>没有</font>")
  else
    HtmlContent=Replace(HtmlContent,"{$homepage}","<a href='"&v_homepage&"' target=_blank>"&Cls.Code_Html(v_homepage,1,28)&"</a>")
  End If
  if Cls.Is_Null(v_Password)="" then
    HtmlContent=Replace(HtmlContent,"{$Password}","<font class=Gys>没有</font>")
  else
    HtmlContent=Replace(HtmlContent,"{$Password}",v_Password)
  End If
  HtmlContent=Replace(HtmlContent,"{$url}",tmp_DownURL)
  If IsHtml = True then
        If Cls.ReviewTrue Then HtmlContent=Replace(HtmlContent,"{$review}","<script language=""JavaScript"" src="""&Cls.Web_Dir&"Include/Review.asp?c_id="&ChannelIDs&"&id="&v_id&"""></script>")
	    HtmlContent=Replace(HtmlContent,"{$counter}","<script language=""JavaScript"" src="""&Cls.Web_Dir&"Include/GetHits.asp?c_id="&ChannelIDs&"&id="&v_id&"""></script>")
  Else
        If Cls.ReviewTrue Then HtmlContent=Replace(HtmlContent,"{$review}",review_type(ChannelIDs,v_id,Cls.Web_Dir&Cls.ChannelDir&"/View.asp?id="&v_id,1,v_username,""))
	    HtmlContent=Replace(HtmlContent,"{$counter}",v_counter)
  End If
  '载入模板函数
  Call LoadChannelSort(Cid,1)
  Call LoadChannelSearch()
  Call LoadChannelSpecial()
  Call Html.LoadReplaced()
  HtmlContent = Replace(HtmlContent,"{$ClassID}",cid)
  HtmlContent = Html.ReadWebHead(HtmlContent)
  HtmlContent = Html.ReadWebEnd(HtmlContent)
  HtmlContent = Html.ReadUserLogin(HtmlContent)
  HtmlContent = Html.ReadSoftList(HtmlContent)
  HtmlContent = Html.ReadSoftPic(HtmlContent)
  HtmlContent = Html.ReadRelateList(HtmlContent,ChannelIDs,v_id,v_keyes,Cls.ChannelIsCreatHtml)  
  HtmlContent = Html.ReadChannelMenu(HtmlContent)
  '判断输出
  Dim CFS,obj_page
  Dim tmp_err,tmp_commend,tmp_topic,v_jt,HtmlUrl,FilePath,vClassPath,ilepaths,Filepaths,Filepathes,ii,j,HtmlFileName
        If int(v_cod)=0 then
        v_remark=Ubb.Ubbcode(v_remark)
        Else
        v_remark=Ubb.HtmlCode(v_remark)
        End if
        v_remark = KeyWord_Url(v_remark) '关键字显亮＋链接
        HtmlContent = Replace(HtmlContent,"{$remark}",v_remark)
		HtmlContent = Cls.ReHtml(HtmlContent,0)	
		If Cls.ChannelIsCreatHtml = True  and IsHtml=True then
		  Set Cfs=New Cls_FileSystem
		   '开始生成文件所在目录
		   vClassPath = Class_Path_Get(cid)
		   FilePath =  vClassPath & Cls.ShowDatePath(v_file, Cls.ChannelHtmlPath)
		   HtmlFileName = Cls.ReadFileName(v_file, v_id, Cls.ChannelHtmlExtName, Cls.ChannelHtmlPrefix, Cls.ChannelHtmlForm, 0)
		   CfS.CreateHtmlFile Cls.Web_Dir&Cls.ChannelDir,FilePath,HtmlFileName,HtmlContent
		   set Cfs=nothing
		Else
		    If IsHtml=True Then
			    ShowChannelView = HtmlContent
	        Else
		        Response.Write HtmlContent
		   End If	
		End If
End Function

'//* 列表初始 *//
Public Sub LoadListFirst()
	Select Case action
	Case "pic"
		Call ShowChannelList(False,Cid,"","pic")
	Case "focus"
		Call ShowChannelList(False,Cid,"","focus")		
	Case "good"
		Call ShowChannelList(False,Cid,"","good")
	Case "hot"
		Call ShowChannelList(False,Cid,"","hot")
	Case "search"
		Call ShowChannelList(False,Cid,"","search")
	Case Else
		if int(cid)<1 then Call Channel_Redirect(Cls.Web_Dir&Cls.ChannelDir)
		If Class_Child_Get(Cid)=0 Then
		Call ShowChannelList(False,Cid,"","List")
		Else
		Call ShowChannelLists(False,Cid)
		End If
	End Select
End Sub

Sub LoadChannelMainList(ListCid)
    Dim ListContent,ListContents
    Dim tmp1,ncid,ncname,mores
    Dim isdb,lablez,si,ji
	ListContents=""
	If Instr(HtmlContent,"[Repeat=1]") > 0 Then
	   isdb = False
	   lablez = "[Repeat=1]"
	ElseIf Instr(HtmlContent,"[Repeat=2]") > 0 Then
	   isdb =True
	   lablez = "[Repeat=2]"
	Else
	   Call Html.LoadReplaced()
	   Exit Sub
	End If
    ListContent = Cls.CutFixContent(HtmlContent, lablez , "[/Repeat]", 0)
	If ClassTrue Then
	ji=2
	
	for si=0 to ClassNum
		if int(ClassArr(2,si))=ListCid then
			ncid=Int(ClassArr(0,si))
			ncname=ClassArr(1,si)
			tmp1=""
			If Cls.RssTrue Then ChannelRss=" <link type='application/rss+xml' rel='alternate'><a href='"&Cls.Web_Dir&Cls.ChannelDir&"/RssFeed.asp?c_id="&ncid&"' target=_blank class=dvaam><img src='"&Cls.Web_SkinDir&"sys/"&Cls.ChannelDir&"_rss_xml.gif' class=xrss border=0 title='RSS 2.0 支持'></a>"
			If Cls.ChannelIsCreatHtml = True then
			mores=Cls.Web_Dir & Cls.ChannelDir & "/"&ClassArr(8,si)&"index_1"&Cls.ChannelHtmlExtName
			Else
			mores="List.asp?c_id="&ncid
			End If
			
			ListContents=ListContents&ListContent 
			ListContents=Replace(ListContents,"{$ClassID}",ncid)
			ListContents=Replace(ListContents,"{$ClassName}",ncname)
			ListContents=Replace(ListContents,"{$more}",mores)
			ListContents=Replace(ListContents,"{$Channel_Xml}",ChannelRss)
    		
    		
			
			ji=ji+1
		End If
    next
	
	Else
	ListContents="请先添加分类"
	End If
	HtmlContent=Replace(HtmlContent,lablez & ListContent&"[/Repeat]",ListContents)
	HtmlContent=Replace(HtmlContent,"{$ClassID}",ListCid)
    Call Html.LoadReplaced()
End Sub

'//* 频道搜索 *//
Public Function LoadChannelSearch()
   If Instr(HtmlContent,"{$Search}")>0 then
   HtmlContent=Replace(HtmlContent,"{$Search}",format_nsort_sea(ChannelSort,img_skin("search"),Class_Select_Type(Cls.ChannelTit,Cls.ClassDepth,0),Cls.ChannelTit))
   End If
End Function

'//* 频道导航 *//
Public Sub LoadChannelSort(tCid,tCtype)
	Dim TmpStr, TmpImg ,Tmpur1,tmpurl
	If Instr(HtmlContent,"{$SortList}")>0 then
	    TmpImg="sort_c1"
	    TmpStr="<li>"&VbCrlf
	    if action="pic" then TmpImg="sort_c2"
	    If Cls.ChannelIsCreatHtml = True then
    	      Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/PicSoft/Index_1"&Cls.ChannelHtmlExtName
    	Else
	          Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/List.asp?Action=pic"
	    End if	
    	TmpStr=TmpStr&"<div class=slis>"&img_skin(TmpImg)&"<a href='"&Tmpurl&"'>图片"&Cls.ChannelTit&"</a></div>" & _
		       VbCrlf&""
	    TmpImg="sort_c1"
    	if action="focus" then TmpImg="sort_c2"
	    If Cls.ChannelIsCreatHtml = True then
    	      Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/FocusSoft/Index_1"&Cls.ChannelHtmlExtName
	    Else
	          Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/List.asp?Action=focus"
        End if	
	    TmpStr=TmpStr&"<div class=slis>"&img_skin(TmpImg)&"<a href='"&Tmpurl&"'>焦点"&Cls.ChannelTit&"</a></div>"&VbCrlf&"</li>" & _
		       VbCrlf&"<li>"&VbCrlf
    	TmpImg="sort_c1"
	    if action="good" then TmpImg="sort_c2"
	    If Cls.ChannelIsCreatHtml = True then
	          Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/GoodSoft/Index_1"&Cls.ChannelHtmlExtName
	    Else
	          Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/List.asp?Action=good"
	    End if	
	    TmpStr=TmpStr&"<div class=slis>"&img_skin(TmpImg)&"<a href='"&Tmpurl&"'>推荐"&Cls.ChannelTit&"</a></div>" & _
	    	   VbCrlf&""
	    TmpImg="sort_c1"
	    if action="hot" then TmpImg="sort_c2"
	    If Cls.ChannelIsCreatHtml = True then
	          Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/HotSoft/Index_1"&Cls.ChannelHtmlExtName
        Else
    	      Tmpurl=Cls.Web_Dir&Cls.ChannelDir&"/List.asp?Action=hot"
    	End if	
	    TmpStr=TmpStr&"<div class=slis>"&img_skin(TmpImg)&"<a href='"&Tmpurl&"'>热门"&Cls.ChannelTit&"</a></div>"&VbCrlf&"</li>"
		TmpStr=TmpStr&vbcrlf&LoadClass(tCid,tCtype,Cls.ChannelIsCreatHtml)
    	HtmlContent=Replace(HtmlContent,"{$SortList}","<ul>"&VbCrlf&Tmpstr&VbCrlf&"</ul>")
   End If
End Sub

'//* 频道专题列表 *//
Public Sub LoadChannelSpecial()
   If Instr(HtmlContent,"{$SpecialList}")>0 then
   	If Not Cls.SpecialTrue Then 
	HtmlContent=Replace(HtmlContent,"{$SpecialList}","没有专题")
	Exit Sub
	End If
	Dim Tmpstr, Sii
	Tmpstr = "<ul>"
	For Sii = 0 To Ubound(Cls.ChannelSpecial,2)
		Tmpstr = Tmpstr & "<li>"&img_skin("sort_c2")&"<a href='Special.asp?ID="&Cls.ChannelSpecial(0,Sii)&"'"
		If iSpecialID = Cls.ChannelSpecial(0,Sii) Then
		Tmpstr = Tmpstr & " class=red"
		end if
		Tmpstr = Tmpstr & ">"&Cls.ChannelSpecial(1,Sii)&"</a></li>"
	Next
	Tmpstr = Tmpstr & "</ul>"
   HtmlContent=Replace(HtmlContent,"{$SpecialList}",Tmpstr)
   End If
End Sub

'//* 专题初始 *//
Public Sub LoadSpecialFirst()
   SQL = "Select Top 1 * From [AsaiMHSpecial] Where ID="&iSpecialID
   Set Rs=Cls.Exec(SQL,1)
   If Rs.Eof Then
	  Rs.Close
	  Call Channel_Redirect(Cls.Web_Dir&Cls.ChannelDir)
   End If
   iSpecialTopic = Cls.Code_Html(Rs("topic"),1,0)
   iSpecialRemark = Rs("Remark")
   iSpecialTim = Cls.Time_Type(Rs("Tim"),1)
   Rs.Close
   Call ShowChannelList(False,Cid,"","special")
End Sub

'//* 发布初始 *//
Public Sub Channel_Put_Chk()
  Dim num_integral,chkputpower  '发布信息得分
  num_integral=UserGroup_Config(15)
  chkputpower=chk_putpower(ChannelIDs)
  dim Name,Power,Emoney,Sizes,keyes,homepage,username,tim,Remark,counter,types,Urls,Isfocus,Password,hidden,pic,ispic,oSpecialID,oIncludeInfo,genre,os,Istop,isgood,tcolor,Found_Err
    Urls=Cls.Code_Remark("Urls")  'Cls.code_admin("url",1,200)
    Name=Cls.Code_Admin("Name",1,150)
    Remark=Cls.Code_Remark("Remark")
    csid=Cls.Code_Form("ClassID")
   If Cls.Code_Form("readme")<>"yes" Then
    Found_Err=Found_Err&"+<font class=blue>请您先阅读并同意有关信息发布的相关声明！</font><br />"
  End If
  If name="" or remark="" or Urls="" Then
    Found_Err=Found_Err&"+发布信息的 <font color=red>标题、内容、下载地址</font> 不能为空！<br />"
  End If
  If cs_nd(csid)=false Then
    Found_Err=Found_Err&"+请选择"&tit_fir&"分类！如有下级分类，请如实选择所属下级分类<br />"
  End If
  if Not Cls.CodeIsTrue() then
			Found_Err=Found_Err&"+您输入的 <font color=red>验 证 码</font> 为空或有错误，请勿非法提交！<br />"
		End If
	If Found_Err<>"" Then
	     ChannelIDs = 0
         Cls.ReadPage "common"
	     Cls.HtmlRcod "msg",Found_Error(Found_Err,460)
	     Cls.HtmlRcod "tit",tit
	     Cls.OutPage
    exit Sub
     End If
    Password=Cls.code_admin("Password",1,50)
    homepage=Cls.code_admin("homepage",1,50)
    sizes=Cls.code_admin("sizes",1,10)
    types=trim(request.form("types"))
    if not isnumeric(types) then types=0
    genre=Cls.code_admin("genre",1,5)
    os=Cls.code_admin("os",1,100)
    os=replace(os," ","")
    pic=Cls.code_admin("pic",1,100)
    ispic=true
    if pic="" then ispic=false
    keyes=Cls.code_admin("keyes",1,20)
    oSpecialID=Cls.Code_Int("SpecialID",0)
    tcolor=Cls.Code_Form("tcolor")
    Call Chk_Cid()
    SQL="Select * From "&Cls.ChannelTable&" Where (ID is Null)"
    Call Cls.exe_conn(Rs,SQL,3)
    Rs.addnew
    rs("ChannelIDs")=ChannelIDs
    rs("SpecialID")=oSpecialID
    rs("ClassID")=cid
    rs("Name")=Name
    rs("emoney")=0
    rs("power")=""
    rs("Url")=Urls
    rs("Password")=Password
    rs("homepage")=homepage
    rs("sizes")=sizes
    rs("types")=types
    rs("genre")=genre
    rs("os")=os
    rs("username")=login_username
    rs("tim")=Cls.now_time
    rs("counter")=0
    rs("Isfocus")=0
    If chkputpower=True Then
  	Rs("hidden")=1
    Else
  	Rs("hidden")=0
    End If
    rs("keyes")=keyes
    rs("pic")=pic
    rs("ispic")=ispic
    rs("Remark")=Remark
    rs("isgood")=0
    rs("Istop")=0
    rs("cod")=1
    rs("tcolor")=tcolor
    Rs("HtmlFileDate")=Cls.HtmlRndFileName()
    Rs("isUpdate")=True  
    Rs.update
    Rs.close
  If int(num_integral)>0 Then
    SQL="update AsaiMHUserData set integral=integral+"&int(num_integral)&" where username='"&login_username&"'"
    Call Cls.exec(SQL,0)
  End If
  Call Cls.Channel_Count(ChannelIDs)
    If chkputpower=True Then
  	 'Response.write Cls.js_put("alert(""您已成功发布了一个"&Cls.ChannelTit&"！\n\n点击返回……"");location.href='./';",1)
  	 Response.write Cls.js_put("alert(""您已成功发布了一个"&Cls.ChannelTit&"！\n\n点击返回……"");location.href='"&Cls.Web_Dir&"User/Put.asp';",1)
    Else
  	 'Response.write Cls.js_put("alert(""您已成功发布了一个"&Cls.ChannelTit&"！请等待管理审核通过！\n\n点击返回……"");location.href='./';",1)
  	 Response.write Cls.js_put("alert(""您已成功发布了一个"&Cls.ChannelTit&"！请等待管理审核通过！\n\n点击返回……"");location.href='"&Cls.Web_Dir&"User/Put.asp';",1)
    End If
End Sub

'//* 发布列表 *//
Public Sub Channel_Put()
  if Cls.Get_ChannelSetup(Cls.ChannelSetup,0)=0 then
    call put_close("发表")
    exit sub
  end if
  Dim n_put,preset,tDown
  tit_fir = Cls.ChannelTit
  preset=split(Cls.ChannelPreset,"|||")
  tDown=preset(1)
  n_put ="<tr><td>"&tit_fir&"标题：</td><td><input type=text name=name size=60 maxlength=100>"&redx&"&nbsp;&nbsp;"&ShowColor("tcolor","")&"</td></tr>"
  n_put = n_put & ShowClassSel(ChannelIDs,ClassID,Cls.ClassDepth)
  n_put = n_put & ShowSpecialSel(ChannelIDs,0)
  n_put = n_put & ShowKeyWord("",preset(0))
  'n_put = n_put & ShowComeFrom(Cls.Web_Name,"佚名")
  n_put = n_put & "<tr><td>"&tit_fir&"主页：</td><td><input type=text name=homepage value='"&Cls.Web_Url&"' size=40 maxlength=50>&nbsp;&nbsp;&nbsp;&nbsp;解压密码：<input type=text name=Password value='' size=20 maxlength=50></td></tr>"
  n_put = n_put & "<tr><td>运行环境：</td><td>"
  dim ddim,dim_Down
  dim_Down=split(Cls.ChannelOption,"|")
  ddim=split(dim_Down(0),":")
  for i=0 to ubound(ddim)
    n_put = n_put & "<input type=checkbox name=os value='"&ddim(i)&"'"
    if instr((","&tDown&","),(","&ddim(i)&",")) then n_put = n_put & " checked"
    n_put = n_put & ">"&ddim(i)
    'n_put = n_put & "<input type=checkbox name=os value='"&ddim(i)&"' checked>"&ddim(i)
  next
  erase ddim
  n_put = n_put & "</td></tr><tr><td>软件大小：</td><td><input type=text name=sizes value='' size=10 maxlength=10>&nbsp;&nbsp;授权类型：<select name=genre size=1>"
  ddim=split(dim_Down(1),":")
  for i=0 to ubound(ddim)
    n_put = n_put &  vbcrlf&"<option>"&ddim(i)&"</option>"
  next
  erase ddim
  n_put = n_put & "</select>&nbsp;&nbsp;推荐等级：<select name=types size=1><option value='0'>没有等级</option><option value='1'>一星级</option><option value='2'>二星级</option><option value='3'>三星级</option><option value='4'>四星级</option><option value='5'>五星级</option></select></td></tr>"
  n_put = n_put & ShowsPicUpload(ChannelIDs,"","pic")
  n_put = n_put & "<tr valign=top><td>下载地址：</td><td><input type=hidden name=Urls value=''>"
  n_put = n_put & "<select name=Url style=""width:80%;height:100"" size=2 ondblclick=""ModifyUrl('下载地址','Url');""></select>"& redx&"<br />"
  n_put = n_put & " <input type=button name=addurl value='添加下载地址' onclick=""AddUrl('下载地址','Url');"" class=btn>"
  n_put = n_put & " <input type=button name=addurl value='修改当前地址' onclick=""ModifyUrl('下载地址','Url');"" class=btn>"
  n_put = n_put & " <input type=button name=addurl value='删除当前地址' onclick=""DelUrl('下载地址','Url');"" class=btn>"
  n_put = n_put & " <input type=button name=upurl value='↑' onclick=""UpUrl('下载地址','Url');"" class=btn>"
  n_put = n_put & " <input type=button name=Downurl value='↓' onclick=""DownUrl('下载地址','Url');"" class=btn>"
  n_put = n_put & " <input type=button name=SelectFile value='已上传中选择' onclick=""SelectFiles('"&ChannelIDs&"','1','Url','');"" class=btn>"
  n_put = n_put & "</tr><tr><td>上传"& tit_fir&"：</td><td><table border=0 width='100%'><tr><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='"&Cls.Web_Dir&"Include/Upload.asp?ID="&ChannelIDs&"&Type=3&Obj=Url&TObj=TempUploadFiles'></iframe></td><td></td></tr></table></td></tr>"
  n_put = n_put & ShowUploadList()
  n_put = n_put & ShowMoreItem(0,"s")
  n_put = n_put & ShowEditor(ChannelIDs,2,"add_frm","Remark","内容","TempUploadFiles","")
        HtmlContent = Cls.ReadTemplate("mod_put")
		HtmlContent = Replace(HtmlContent, "{$n_redx}",redx)
		HtmlContent = Replace(HtmlContent, "{$n_put}",n_put)
		HtmlContent = Replace(HtmlContent, "{$n_GetCode}",Cls.GetCode)
		Call LoadChannelSort(0,0)
		Call LoadChannelSearch()
		Call LoadChannelSpecial()
		Call Html.LoadReplaced()		
 		HtmlContent = Html.ReadWebHead(HtmlContent)
		HtmlContent = Html.ReadWebEnd(HtmlContent)
		HtmlContent = Html.ReadUserLogin(HtmlContent)
		HtmlContent = Html.ReadSoftList(HtmlContent)
		HtmlContent = Html.ReadSoftPic(HtmlContent)
		HtmlContent = Html.ReadChannelMenu(HtmlContent)
		HtmlContent = Cls.ReHtml(HtmlContent,0)	
		Response.Write HtmlContent
End Sub
%>
