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


Dim m_channel,web_img_m,web_img_h,Web_Resources
Dim user_ip,user_sys
Dim iFrame,Cookies_True
user_ip = Cls.Ip_Sys(0)
user_sys = Cls.Code_Var(Left(Cls.Ip_Sys(1),250))
iFrame = False
Web_Resources = Cls.Web_Url&".Defend.Thief."&Cls.Pro_Edition		'防盗Cookies生成
Web_Resources = Replace(Replace(Replace(Replace(Web_Resources,"http://",""),"Http://",""),"/","")," ","")
Cookies_True = True
If Cls.Cookies_Get("cookies_true")<>"yes" Then
	Cls.Cookies_Set "cookies_true","yes"
	Cookies_True = False
End If
'网站是否开启
Call AsaiMHIsOpen()
'用户IP处理
Call user_ip_stop1()
Call web_ip_shield()

'// 常用变量设置
Dim pic_w,pic_h,max_w,max_h,m_hei
pic_w = Format_Mid_Num(22)
pic_h = Format_Mid_Num(23)
max_w = Format_Mid_Num(24)
m_hei = Format_Mid_Num(13)
If int(Format_Mid_Num(22))<>int(Cls.ChannelPicWidth) and int(Cls.ChannelPicWidth)>0 Then pic_w = Cls.ChannelPicWidth
If int(Format_Mid_Num(23))<>int(Cls.ChannelPicHeight) and int(Cls.ChannelPicHeight)>0 Then pic_h = Cls.ChannelPicHeight

'================================================
'作    用：频道相关信息载入
'参    数：无
'================================================
Sub Channel_Loader()
	Call Cls.Channel_Initialize(ChannelIDs)
	If Cls.Cookies_Get("WebResources")<>""&Web_Resources&"" Then
		Cls.Cookies_Set "WebResources",""&Web_Resources&""		'写入防盗链标致
	End If
	If Tit = "" Then Tit = Cls.ChannelName
	If Not Cls.ChannelTrue Then
		Call Format_Redirect(Cls.Web_Dir&"Common/Page_Load.asp?该频道不存在或暂时维护中！")
		'Call Format_Redirect(Cls.Web_Dir&"Common/Page_Load.asp?ChannelIDs="&ChannelIDs&"")
		Exit Sub
	End If
	'--- 载入网站模板
	Call Cls.LoadTemplate(ChannelIDs)
	'--- 载入频道图片大小设置
	Pic_W = Int(Cls.ChannelPicWidth)
	Pic_H = Int(Cls.ChannelPicHeight)
	'--- 载入专题
	If Cls.SpecialTrue Then
		Cls.Name = "Channel_Special"&ChannelIDs
		If Cls.Cache_Chk() Then	Call Cls.Special_KeyWord_ToCache(ChannelIDs,0)
		Cls.ChannelSpecial = Cls.Value
		If Not IsArray(Cls.ChannelSpecial) Then Cls.SpecialTrue = False
	End If
	'--- 载入热门关键字
	If Cls.KeyWordTrue Then
		Cls.Name = "Channel_KeyWord"&ChannelIDs
		If Cls.Cache_Chk() Then	Call Cls.Special_KeyWord_ToCache(ChannelIDs,1)
		Cls.ChannelKeyWord = Cls.Value
		'If Not IsArray(Cls.ChannelKeyWord) Then Cls.KeyWordTrue = False
	End If
	'---- 前台判断结束
End Sub

'================================================
'作    用：网站头部功能模块,设置页面头部信息及显示形式,浏览权限等
'参    数：
'	   var1 : 可选三个参数：0，1，2
'               0，表示不要登陆即可进行浏览该页面；
'               1，表示在后台设置要登陆浏览时，表示有权限用户（请查看下面的说明）登陆后才可浏览该页面；
'               2，表示强制有权限用户登陆后才可浏览该项页面；
'	   var2 : 可选两个参数：0，1
'               0，表示不论是否锁定用户可浏览该页面；
'               1，表示已被锁定的用户不可以浏览该页面；
'================================================
Sub DoWebHead(ByVal var1,ByVal var2)
	If Cls.Cookies_Get("WebResources")<>""&Web_Resources&"" And ChannelIDs = 0 Then
		Cls.Cookies_Set "WebResources",""&Web_Resources&""		'写入防盗链标致
	End If
	'--- 载入用户信息
	If Cookies_True Then Call Cls.LoadUserInfo()
	'--- 限制刷新速度
	Call LoadTimeLimit()
	'--- 检查页面权限
	If Page_Power<>"" And Instr("."&Page_Power&".","."&login_modep&".")<1 Then Call Web_Error("power")
	'-- 参数var1
	'-- 1：需登陆才能浏览信息时
	'-- 2：用户未登陆时
	Select Case var1
	Case 1
	        If Int(Format_Mid_Num(8))=1 And Not Is_LoginTrue Then Call My_Login()
	Case 2
	        If Not Is_LoginTrue Then Call My_Login()
	End Select
	'--- 参数var2
	'--- 1：检查用户是否被锁定，是否有浏览时间限制
	If var2=1 Then
            If Time_Lock=True Then Call Web_Error("time_lock")
	        If login_mode<>"" Then
			 If Login_IsLock=True Then Call Web_Error("locked")
		    End If
	End If
	If var2<>3 Then
		Call Cls.UpdateUserOnline("")
	End If
End Sub

'================================================
'作    用：网站底部信息功能模块
'参    数：无
'================================================
Sub DoWebEnd()
	'Response.Write Cls.Exec_Tim
	Call Web_Clear(1)
End Sub

'================================================
'作    用：显示网站顶部信息
'================================================
Function ShowHeadTit()
	Dim Keyes
	tit=Replace(tit,"--"," - ")
	tit=Cls.Code_Var(tit)
	tit_fir=Cls.Code_Var(tit_fir)
	Keyes=replace(Web_Dim(4),"|",",") 
	if keyes="" then keyes=replace(tit," - ",",") 
	Dim HtmlStr:HtmlStr=Cls.ReadSkin(0)
	HtmlStr = Replace(HtmlStr,"{$web_generator}",Web_Dim(3))
	HtmlStr = Replace(HtmlStr,"{$web_keywords}",Replace(Web_Dim(4),"|",","))
	HtmlStr = Replace(HtmlStr,"{$web_description}",tit)
	If iFrame Then HtmlStr = HtmlStr & VbCrlf&Cls.ReadSkin("iframe")
	ShowHeadTit=HtmlStr
End Function

'================================================
'作    用：显示网站头部信息
'参    数：
'	   var1 :   0, 表示输出所有
'               1，表示只输出页头(样式及JS等)
'================================================
Public Function ShowWebHead(ByVal var1)
	ShowWebHead=ShowHeadTit()
	If var1=1 Then Exit Function
	Dim HtmlStr:HtmlStr=Cls.ReadSkin(1)
	ShowWebHead=ShowWebHead&HtmlStr
End Function

'================================================
'作    用：显示尾部信息
'参    数：
'	   var1 :   0, 表示输出所有
'               1，表示只输出页尾
'================================================
Public Function ShowWebEnd(ByVal var1)
	Dim MsgHint
	MsgHint="<script language=javascript src="""&Cls.Web_Dir&"Common/MsgHint.asp""></script>"
	If var1 = 0 then
		If int(login_msg)>0 Then 
	   		ShowWebEnd = Cls.ReadSkin(3) & Cls.ReadSkin(4) & MsgHint
		Else
	   		ShowWebEnd = Cls.ReadSkin(3) & Cls.ReadSkin(4)
		End If
	Else
		ShowWebEnd = Cls.ReadSkin(4)
	End If
End Function

'================================================
'作    用：载入头部信息
'================================================
Public Function LoadWebHead(ByVal str)
	Dim strTemp:strTemp = str
	If InStr(strTemp, "{$ReadWebHead(0)}") > 0 Then strTemp = Replace(strTemp, "{$ReadWebHead(0)}", ShowWebHead(0))
	If InStr(strTemp, "{$ReadWebHead(1)}") > 0 Then strTemp = Replace(strTemp, "{$ReadWebHead(1)}", ShowWebHead(1))
	LoadWebHead = strTemp
End Function

'================================================
'作    用：载入底部信息
'================================================
Public Function LoadWebEnd(ByVal str)
	Dim strTemp:strTemp = str
	If InStr(strTemp, "{$ReadWebEnd(0)}") > 0 Then strTemp = Replace(strTemp, "{$ReadWebEnd(0)}", ShowWebEnd(0))
	If InStr(strTemp, "{$ReadWebEnd(1)}") > 0 Then strTemp = Replace(strTemp, "{$ReadWebEnd(1)}", ShowWebEnd(1))
	LoadWebEnd = strTemp
End Function 

'//* 网站搜索 *//
Public Function Web_Sea()
	Dim HtmlStr:HtmlStr=Cls.ReadSkin("web_sea")
	Dim tmp_Channel,tmp_types,iListStr,Lii,tmp_txt
	iListStr = Cls.Channel_Menu
	tmp_Channel = vbcrlf&"<select name=sea_type>" 
	For Lii =0 To Ubound(iListStr,2)
		tmp_types = lcase(iListStr(12,Lii))
		tmp_txt = iliststr(1,lii)
		If tmp_types <> "" Then
			tmp_Channel = tmp_Channel&vbcrlf&"<option value='"&tmp_types&"'>"&tmp_txt&"</option>"
		End If
	Next
	erase iListStr
	tmp_Channel = tmp_Channel&vbcrlf&"</select>"
	HtmlStr = Replace(HtmlStr,"{$select_type}",tmp_Channel)
	Web_Sea = HtmlStr
End Function

'//* 格式化频道搜索 *//
Public Function Format_nSort_Sea(ByVal vSort,ByVal vImg,ByVal vSelect,ByVal vTit)
	Dim HtmlStr:HtmlStr=Cls.ReadSkin("format_nsort_sea")
	HtmlStr = Replace(HtmlStr,"{$nsort}",vSort)
	HtmlStr = Replace(HtmlStr,"{$simg}",vImg)
	HtmlStr = Replace(HtmlStr,"{$select_type}",vSelect)
	HtmlStr = Replace(HtmlStr,"{$stit}",vTit)
	Format_nSort_Sea=HtmlStr
End Function

'================================================
'作    用：弹出对话框
'参    数：
'	   msg_type : 判断弹出方式
'	   msg_var  : 提示内容
'      msg_url  : 跳转路径
'================================================
Public Sub AsaiMHMsg(ByVal mType,ByVal mVar,ByVal mUrl)
	Call Cookies_Load()
	If mType=0 Then
		Response.Write "alert("""&mVar&""");location.href="""&mUrl&""";"
		Exit Sub
	End If
	Response.Write Cls.Js_Put("alert("""&mVar&""");location.href="""&mUrl&""";",1)
End Sub

'//* 未登陆处理信息 *//
Private Sub My_Login()
	If Is_LoginTrue Then Exit Sub
	Call Cookies_Clear(1)
	Call Format_Redirect(Cls.Web_Dir&"User/Login.asp?old_url="&Cls.BrowseUrl)
End Sub

'//* 取频道名称 *//
Public Function Format_Menu(ByVal mVar)
	Dim i, TmpStr
	TmpStr=Cls.Cache_Get("web_menu")
	Format_Menu=""
	For i=0 To Ubound(TmpStr,2)
		If mVar=TmpStr(1,i) Then
			Format_Menu=TmpStr(2,i)
			Exit For
		End If
	Next
End Function

'//* 页面跳转 *//
Public Sub Format_Redirect(ByVal rUrl)
	Call Web_Clear(0)
	Response.Clear
	Response.Redirect rUrl
	Response.End
End Sub

'//* 处理网站关闭信息 *//
Private Sub AsaiMHIsOpen()
	If Int(Web_Dim(0)) = 0 Then
		Response.Clear
		Tit="暂停使用"
		Response.Write Cls.Web_Closer
		'Call ShowWebEnd(1)
		Call Web_Clear(1)
	End If
End Sub

'//* 处理用户IP锁定信息 *//
Private Sub web_ip_shield()
	Dim tmp
	tmp=True
	If Cls.Is_Null(Cls.Web_LockIP) = "" Or user_ip="" Then Exit Sub
	Dim sdim,snum
	sdim=Split(Cls.Web_LockIP,"|")
	snum=Ubound(sdim)
	For i=0 To snum
		If Instr("$"&user_ip&".","$"&sdim(i)&".")>0 Then
			Erase sdim
			Response.Clear
			Cls.LoadTemplate(0)
			Response.Write Cls.ReHtml(Cls.ReadSkin("no_ip"),0)
			Call Web_Clear(1)
		End If
	Next
	Erase sdim
End Sub

'//* 网站错误信息 *//
Public Sub Web_Error(ByVal eType)
	Response.Clear
	Cls.Cookies_Set "time_load",DateAdd("s",-5,Cls.now_time)
	Cls.Cookies_Set "old_url",Request.ServerVariables("http_referer")
	Cls.Cookies_Set "error_action",eType
	Call Format_Redirect(Cls.Web_Dir&"Common/Error.asp")
End Sub

'//* 用户登陆通用模块 *//
Public Function User_Login()
	If Not Is_LoginTrue Then
	    Dim HtmlStr
        HtmlStr=Cls.ReadSkin("left_login_false")
	    HtmlStr = Replace(HtmlStr,"{$valcode}",Cls.GetCode())
		User_Login=HtmlStr
		Exit Function
	End If
	Dim msg_var
	If int(login_msg)<1 Then
		msg_var="<font class=Gys>"&login_msg&"</font>"
	Else
		msg_var="<font color=red>"&login_msg&"</font>"
	End If
	HtmlStr=Cls.ReadSkin("left_login_true")
	HtmlStr = Replace(HtmlStr,"{$login_username}",Format_User_View(login_username,1,0))
	HtmlStr = Replace(HtmlStr,"{$login_mode}",Format_Power(login_mode,1))
	HtmlStr = Replace(HtmlStr,"{$ok_counter}",login_ok_counter)
	HtmlStr = Replace(HtmlStr,"{$ok_reply}",login_ok_reply)
	HtmlStr = Replace(HtmlStr,"{$ok_helpnum}",login_ok_helpnum)
	HtmlStr = Replace(HtmlStr,"{$login_emoney}",login_emoney)
	HtmlStr = Replace(HtmlStr,"{$login_integral}",login_integral)
	HtmlStr = Replace(HtmlStr,"{$login_msg}",msg_var)
	User_Login = HtmlStr
End Function



'================================================
'作    用：网站刷新时间相关
'================================================
Public Sub LoadTimeLimit()
	Dim tim_s,var_s
	tim_s=Int(Format_Mid_Num(16))
	If Int(tim_s)<1 Then Exit Sub
	If Login_Mode=Format_Power2(1,1) Then Exit Sub
	var_s=Cls.Cookies_Get("time_load")
	If IsDate(var_s) Then
		If Int(DateDiff("s",var_s,Cls.now_time))<=Int(tim_s) Then
			Call Web_Error("time_load")
			Exit Sub
		End If
	End If
	Cls.Cookies_Set "time_load",Cls.now_time
End Sub

'//* 发布信息时间限制 *//
Private Function Time_Lock()
	Dim TmpStr,Tim1
	Time_Lock=False
	TmpStr=Web_Dim(7)
	If Len(TmpStr)<>24 Or Not Cls.Is_Int(TmpStr) Then Exit Function
	Tim1=Int(Hour(Cls.Now_Time))
	if Tim1=24 Then Tim1=0
	If Int(Mid(TmpStr,Tim1+1,1))=1 Then Time_Lock=True
End Function

'//* 提交信息安全设置 *//
Public Function Frm_Chk()
	Frm_Chk=False
	If Cls.Code_Form("chk")="yes" Then
		Frm_Chk=Cls.Post_Chk()
	End If
End Function

'================================================
'作    用：图片路径处理
'参    数：
'	   pvar : 判别图片路径
'	   pt   : 判别图片大小
'================================================
Public Function Pic_Url(ByVal pVar,ByVal pt)
	Dim temp1,pic_var
	pic_var=pVar
	If pic_var="" Then
		pic_var=Cls.Web_Dir&"Skin/no_pic.gif"
	End If
    if isNumeric(pt)=false and instr(pt,"*")<>0 then
       pt=replace(pt,"*"," height=" )
       temp1="<img border=0 width="+pt+" src='" + pic_var + "'>"
    else
	  Select Case Int(pt)
	  Case 1
		temp1="<img border=0 width="&pic_w&" height="&pic_h&" src='" & pic_var & "'>"
	  Case 2
		temp1="<img border=0 width="&(pic_w*1.5)&" height="&(pic_h*1.5)&" src='" & pic_var & "'>"
	  Case 3
		temp1="<img border=0 src='" & pic_var & "'>"
	  Case 4
		temp1="<img border=0 width="&(pic_w*0.7)&" height="&(pic_h*0.7)&" src='" & pic_var & "'>"
	  Case 5
		temp1="<img border=0 width="&(pic_w*0.5)&" height="&(pic_h*0.5)&" src='" & pic_var & "'>"
	  Case 6
		temp1="<img border=0 width="&(pic_w*1.2)&" height="&(pic_h*0.9)&" src='" & pic_var & "'>"
	  Case 7
		temp1="<img border=0 width="&(pic_w*1.5)&" height="&(pic_h*1.2)&" src='" & pic_var & "'>"
	  Case 8
		temp1="<img border=0 width="&(pic_w*1.2)&" height="&(pic_h*1.2)&" src='" & pic_var & "'>"
	  Case 9
		temp1="<img border=0 width="&(pic_w*0.91)&" height="&(pic_h*1.58)&" src='" & pic_var & "'>"
	  Case 10
		temp1="<img border=0 width="&(pic_w*1.7)&" height="&(pic_h*3)&" src='" & pic_var & "'>"
	  Case 11
		temp1="<img border=0 width="&(pic_w*0.9)&" height="&(pic_h*0.7)&" src='" & pic_var & "'>"
	  Case 12
		temp1="<img border=0 width="&(pic_w*1.7)&" height="&(pic_h*2)&" src='" & pic_var & "'>"
	  Case 13
		temp1="<img border=0 width="&(pic_w*1.5)&" height="&(pic_h*2)&" src='" & pic_var & "'>"
	  Case 14
		temp1="<img border=0 width="&(pic_w*1.5)&" height="&(pic_h*2.35)&" src='" & pic_var & "'>"
	  Case Else
		temp1=pic_var
	  End Select
	End If
	Pic_Url=temp1
End Function

'================================================
'作    用：图片边框处理
'参    数：
'	   pvar : 判别图片路径
'	   pt   : 判别图片大小
'	   purl : 判断图片路径
'================================================
Public Function Pic_Fk(ByVal pVar,ByVal pt,ByVal pUrl)
	dim burl,picurl
	burl=Cls.Web_Dir&"Images/Fk/"
	picurl=Pic_Url(pVar,pt)
	If pUrl<>"" And Cls.Is_Null(pUrl)<>"" Then picurl="<a href='"&purl&"' target=_blank>"&picurl&"</a>"
	Dim HtmlStr:HtmlStr=Cls.ReadSkin("pic_fk")
	HtmlStr = Replace(HtmlStr,"{$burl}",burl)
	HtmlStr = Replace(HtmlStr,"{$picurl}",picurl)
	Pic_Fk = HtmlStr
End Function
'================================================
'作    用：浏览图片边框处理
'参    数：
'	   pvar : 判别图片路径
'	   pt   : 判别图片大小
'	   purl : 判断图片路径
'================================================
Public Function pic_show(ByVal pVar,ByVal pt,ByVal pUrl)
	dim burl,picurl
	burl=Cls.Web_Dir&"Images/Fk/"
	picurl=Pic_Url(pVar,pt)
	If pUrl<>"" And Cls.Is_Null(pUrl)<>"" Then picurl="<a href='"&purl&"' target=_blank>"&picurl&"</a>"
	Dim HtmlStr:HtmlStr=Cls.ReadSkin("pic_show")
	HtmlStr = Replace(HtmlStr,"{$burl}",burl)
	HtmlStr = Replace(HtmlStr,"{$picurl}",picurl)
	pic_show = HtmlStr
End Function
'================================================
'作    用：头像图片边框处理
'参    数：
'	   pvar : 判别图片路径
'	   pt   : 判别图片大小
'	   purl : 判断图片路径
'================================================
Public Function pic_face(ByVal pVar,ByVal pt,ByVal pUrl)
	dim burl,picurl
	burl=Cls.Web_Dir&"Images/Fk/"
	picurl=Pic_Url(pVar,pt)
	If pUrl<>"" And Cls.Is_Null(pUrl)<>"" Then picurl="<a href='"&purl&"' target=_blank>"&picurl&"</a>"
	Dim HtmlStr:HtmlStr=Cls.ReadSkin("pic_face")
	HtmlStr = Replace(HtmlStr,"{$burl}",burl)
	HtmlStr = Replace(HtmlStr,"{$picurl}",picurl)
	pic_face = HtmlStr
End Function

'================================================
'作    用：标题模块
'参    数：
'	   b_jt         : 标题前小图片
'	   b_username   : 发布人
'	   b_topic      : 标题
'	   b_c_num      : 标题显示字数
'	   b_url        : 连接地址
'	   b_tim        : 发布时间
'	   b_counter    : 浏览的次数
'	   b_ispic      : 缩略图
'	   b_tit        : 标签
'	   b_count      : 回复、浏览等
'	   b_tim_type   : 发布时间
'================================================
Public Function Format_Topic_Type(b_jt,b_info,b_username,b_topic,b_c_num,b_url,b_tim,b_color,b_ispic,b_tit,b_tim_type)
	Dim n_img,tim_type,n_c_num,temp1
	n_c_num=b_c_num
	If b_ispic=true Then
		n_img="&nbsp;<img src='"&Cls.web_skindir&"sys/img.gif' border=0>"
		n_c_num=n_c_num-2
	End If
	If Int(b_tim_type)>0 Then
		If Int(b_tim_type)=2 Then tim_type=tim_type&"</td><td align=right>"
		tim_type=tim_type&"&nbsp;<font class=tims>"&Cls.time_type(b_tim,7)&"</font>"
	End If
	Cls.ReadPage "topic"
	Cls.HtmlRcod "t_height",m_hei
	Cls.HtmlRcod "t_jt",b_jt
	Cls.HtmlRcod "t_info",b_info
	Cls.HtmlRcod "t_url",b_url
	Cls.HtmlRcod "t_tit",b_tit
	Cls.HtmlRcod "t_topic",Cls.code_html(b_topic,1,b_c_num)
	Cls.HtmlRcod "t_topics",Cls.code_html(b_topic,1,0)
	Cls.HtmlRcod "t_username",b_username
	Cls.HtmlRcod "t_color",b_color
	Cls.HtmlRcod "t_tim",b_tim
	Cls.HtmlRcod "t_img",n_img
	Cls.HtmlRcod "t_tim_type",tim_type
	Format_Topic_Type=NewContent
End Function

'================================================
'作    用：图片模块
'参    数：
'	   b_pic        : 图片地址
'	   b_topic      : 图片标题
'	   b_c_num      : 标题显示字数
'	   b_url        : 图片连接地址
'================================================
Public Function Format_Pic_Type(b_pic,b_topic,b_c_num,b_url)
	Dim TmpPic
	TmpPic = Pic_Fk(b_pic,1,b_url)
	Dim HtmlStr:HtmlStr=Cls.ReadSkin("format_pic")
	HtmlStr = Replace(HtmlStr,"{$pic_fk}",TmpPic)
	HtmlStr = Replace(HtmlStr,"{$t_url}",b_url)
	HtmlStr = Replace(HtmlStr,"{$t_topics}",Cls.Code_Html(b_topic,1,0))
	HtmlStr = Replace(HtmlStr,"{$t_topic}",Cls.Code_Html(b_topic,1,b_c_num))
	Format_Pic_Type=HtmlStr
End Function

'//* 网站版权信息 *//
Public Function AsaiMHCopyright()
	Dim HtmlStr:HtmlStr=Cls.ReadSkin("copyright")
	HtmlStr = Replace(HtmlStr,"{$web_copyright}",Cls.Web_CopyRight)		
	HtmlStr = Replace(HtmlStr,"{$closer}",Cls.ReadSkin("closer"))
	AsaiMHCopyright = HtmlStr
End Function

'//* 网站搜索 *//
sub Serach_Dhang()
    Dim tmp_Channel,tmp_types,iListStr,Lii,tmp_txt
	iListStr = Cls.Channel_Menu
	tmp_Channel=vbcrlf&"<select name=sea_type>" 
	For Lii =0 To Ubound(iListStr,2)
	tmp_types=lcase(iListStr(12,Lii))
    tmp_txt=iliststr(1,lii)
    tmp_Channel=tmp_Channel&vbcrlf&"<option value='"&tmp_types&"'>"&tmp_txt&"</option>" 
    Next
	erase iListStr
	tmp_Channel=tmp_Channel&vbcrlf&"</select>"
	Cls.HtmlMain "search_dhang"
	Cls.HtmlRcod "Channel",tmp_Channel
	Cls.HtmlView(1)
end sub

'//* 网站小菜单 *//
Public Function Web_XMenuLoad()
	Dim temp1,tmp1,TmpStr
	Dim Cii, Tii, oChannelType
	Dim oChannelTit, oChannelPicUrl, oChannelRemark, oChannelColor, oChannelBold, oChannelOpenType, oChannelLinkUrl
	Dim M_td
	    M_td = Cls.ReadSkin(2)
	TmpStr = Cls.Channel_Menu
	Tii = Ubound(TmpStr,2)
	  For Cii = 0 To Tii
		oChannelType = Int(TmpStr(8,Cii))
		If TmpStr(17,Cii) = True Or oChannelType = 2 Then
			If oChannelType = 2 Then
				oChannelLinkUrl = TmpStr(9,Cii)
			Else
				oChannelLinkUrl = Cls.Web_Dir & TmpStr(12,Cii) & "/"   'LCase(TmpStr(12,Cii))转换小写
			End If
'			temp1="<a class="""&TmpStr(12,Cii)&""" href='"&oChannelLinkUrl&"'"
			temp1="<a class=""aml"" href='"&oChannelLinkUrl&"'"
			If TmpStr(3,Cii) <> "" Then temp1 = temp1 & " title='"&Cls.Code_Html(TmpStr(3,Cii),1,0)&"'"
			If TmpStr(6,Cii) = True Then temp1 = temp1 & " target=_blank"
			temp1 = temp1 & ">"
			oChannelTit = Cls.Code_Html(TmpStr(13,Cii),1,0)
			If TmpStr(2,Cii) <> "" Then
				oChannelTit = "<img src='"&TmpStr(2,Cii)&"'>"
			Else
				If TmpStr(5,Cii) = True Then oChannelTit = "<b>" & oChannelTit & "</b>"
				If TmpStr(4,Cii) <> "" Then oChannelTit = "<font color='#"&TmpStr(4,Cii)&"'>" & oChannelTit & "</font>"
			End If
			temp1 = temp1 & oChannelTit & "</a>"
			tmp1 = tmp1 & "" & temp1 & ""
			If cii <> Tii then tmp1 = tmp1 & VbCrlf & M_td
		End If
	Next
        tmp1 = "<a class=""aml"" target=""_blank"" href='"&Cls.Web_Dir&"index.asp'>首页</a>" & VbCrlf & M_td & tmp1
	Erase TmpStr
	tmp1="" & _
		VbCrlf&"" & _
		tmp1 & _
		VbCrlf&""
	Web_XMenuLoad=tmp1
End Function

'//* 网站菜单 *//
Public Function Web_MenuLoad()
	Dim temp1,tmp1,TmpStr
	Dim Cii, Tii, oChannelType
	Dim oChannelName, oChannelPicUrl, oChannelRemark, oChannelColor, oChannelBold, oChannelOpenType, oChannelLinkUrl
	Dim M_td
	    M_td = Cls.ReadSkin(2)
	TmpStr = Cls.Channel_Menu
	Tii = Ubound(TmpStr,2)
	For Cii = 0 To Tii
		oChannelType = Int(TmpStr(8,Cii))
		If TmpStr(17,Cii) = True Or oChannelType = 2 Then
			If oChannelType = 2 Then
				oChannelLinkUrl = TmpStr(9,Cii)
			Else
				oChannelLinkUrl = Cls.Web_Dir & TmpStr(12,Cii) & "/"   'LCase(TmpStr(12,Cii))转换小写
			End If
			temp1="<a class="""&TmpStr(12,Cii)&""" href='"&oChannelLinkUrl&"'"
			If TmpStr(3,Cii) <> "" Then temp1 = temp1 & " title='"&Cls.Code_Html(TmpStr(3,Cii),1,0)&"'"
			If TmpStr(6,Cii) = True Then temp1 = temp1 & " target=_blank"
			temp1 = temp1 & ">"
			oChannelName = Cls.Code_Html(TmpStr(1,Cii),1,0)
			If TmpStr(2,Cii) <> "" Then
				oChannelName = "<img src='"&TmpStr(2,Cii)&"'>"
			Else
				If TmpStr(5,Cii) = True Then oChannelName = "<b>" & oChannelName & "</b>"
				If TmpStr(4,Cii) <> "" Then oChannelName = "<font color='#"&TmpStr(4,Cii)&"'>" & oChannelName & "</font>"
			End If
			temp1 = temp1 & oChannelName & "</a>"
			tmp1 = tmp1 & "<li>" & temp1 & "</li>"
			If cii <> Tii then tmp1 = tmp1 & VbCrlf & M_td
		End If
	Next
        tmp1 = "<li><a class=""index"" href='"&Cls.Web_Dir&"index.asp'>网站首页</a></li>" & VbCrlf & M_td & tmp1
	Erase TmpStr
	tmp1="<div id=""item"">" & _
		VbCrlf&"<ul><li class=spc></li>" & _
		tmp1 & _
		VbCrlf&"</ul></div>"
	Web_MenuLoad=tmp1
End Function

'//* 网站论坛菜单 *//
Public Function Web_MenuLoadBbs()
	Dim temp1,tmp1,TmpStr
	Dim Cii, Tii, oChannelType
	Dim oChannelName, oChannelPicUrl, oChannelRemark, oChannelColor, oChannelBold, oChannelOpenType, oChannelLinkUrl
	Dim M_td
	    M_td = Cls.ReadSkin(2)
	TmpStr = Cls.Channel_Menu
	Tii = Ubound(TmpStr,2)
	For Cii = 0 To Tii
		oChannelType = Int(TmpStr(8,Cii))
		If TmpStr(17,Cii) = True Or oChannelType = 2 Then
			If oChannelType = 2 Then
				oChannelLinkUrl = TmpStr(9,Cii)
			Else
				oChannelLinkUrl = Cls.Web_Dir & TmpStr(12,Cii) & "/"   'LCase(TmpStr(12,Cii))转换小写
			End If
			temp1="<a href='"&oChannelLinkUrl&"'"
			If TmpStr(3,Cii) <> "" Then temp1 = temp1 & " title='"&Cls.Code_Html(TmpStr(3,Cii),1,0)&"'"
			If TmpStr(6,Cii) = True Then temp1 = temp1 & " target=_blank"
			temp1 = temp1 & ">"
			oChannelName = Cls.Code_Html(TmpStr(1,Cii),1,0)
			If TmpStr(2,Cii) <> "" Then
				oChannelName = "<img src='"&TmpStr(2,Cii)&"'>"
			Else
				If TmpStr(5,Cii) = True Then oChannelName = "<b>" & oChannelName & "</b>"
				If TmpStr(4,Cii) <> "" Then oChannelName = "<font color='#"&TmpStr(4,Cii)&"'>" & oChannelName & "</font>"
			End If
			temp1 = temp1 & oChannelName & "</a>"
			tmp1 = tmp1 &  " <li class=""mbbsmenu"">" & temp1 & "</li>" 
			If cii <> Tii then 			tmp1 = tmp1 & VbCrlf & 	 M_td
		End If
	Next
        tmp1 = "<li class=""mbbsmenu""><a href='"&Cls.Web_Dir&"index.asp'>网站首页</a></li>" & VbCrlf & tmp1
	Erase TmpStr
	tmp1="<ul>" & _
	    VbCrlf & tmp1 & _
		VbCrlf&"</ul>"
	Web_MenuLoadBbs=tmp1
End Function
%>
