<!--#include file="setup.asp"-->
<!--#include file="plus/Ex_Stock/Exsm_Plus_Conn.asp"-->
<!--#include file="plus/Ex_Stock/Exsm_Plus_Const.asp"-->
<%
	Exsm.Title 0,""&Exsm.Setting_Info(0)&""
	Call Main()
	Sub GetStockNews()
		Set Rs=stock_conn.execute("select top 20 content,Color,Addtime from EX_News order by ID desc")
		Exsm.Value=Null
		If Not Rs.eof Then Exsm.value=Rs.GetRows(20)
		Set Rs=Nothing
	End Sub
	Sub GetSequence()
		Set Rs=stock_conn.execute("select top 7 ID,UserName,UserAssets from EX_User Where LockUser<1 And RankSecret=1 order by UserAssets desc")
		Exsm.Value=Null
		If Not Rs.eof Then Exsm.value=Rs.GetRows(7)
		Set Rs=Nothing
	End Sub
	Sub Main()
		Dim ExRs,Exsm_News,Exsm_UserSequence
		Exsm.Nav
		i=0
		Response.Write "<span id=""stockdiv""><span id=""stocklading""></span></span>"
		Response.Write "<span id=""stockuserdiv""><span id=""stockuserlading""></span></span>"
		Response.Write "<br>"
		If Exsm.Members Then i=i+1
		Response.Write "<script language=""javascript"">var assignwidth='"&Exsm.AssignWidth&"';stockshow("&i&");</script>"
		Response.Write vbNewLine
		Response.Write "<iframe width=""0"" height=""0"" src=""Exsm_Plus_StockDiv.asp?action="&Exsm.Setting_Info(20)&"&StockUserDiv=1"" name=""hiddendialogue""></iframe>"
		Response.Write vbNewLine
		Response.Write "<script language=""JavaScript"" src =""plus/Ex_Stock/Exsm_Plus_index.js""></script>"
		Response.Write vbNewLine
		Response.Write "<Script Language=""JavaScript"">"
		Response.Write "var assignwidth='"&Exsm.AssignWidth&"';"
		If Exsm.Members Then
			Set Rs=stock_conn.execute("select UserStatistic,TodayBuy,TodaySell from EX_User Where ID="&Exsm.UserID&"")
			Response.Write "var stockstatistic='"&Rs(0)&"';"
			Response.Write "var userdeal='"&Rs(1)+Rs(2)&"';"
			Response.Write vbNewLine
			Response.Write "var usercash='"&Exsm.UserCash&"';"
			Response.Write vbNewLine
		Else
			Response.Write "var smname='"&Exsm.Setting_Info(0)&"';"
			Response.Write vbNewLine
			Response.Write "var reg_info='"&Exsm.Stock_Setting(1)&"';"
			Response.Write vbNewLine
			Response.Write "var username='"&Exsm.htmlencode(Exsm.StockHolder)&"';"
			Response.Write vbNewLine
			If Exsm.StockHolder<>"" Then
				set rsbbs=conn.execute("select posttopic,userlife,experience,money from [user] where username='"&Exsm.StockHolder&"'")
				ExRs=rsbbs.GetRows(1)
				Response.Write "var bbsuserinfo='"
				Response.Write ExRs(0,i)
				Response.Write ","
				Response.Write ExRs(1,i)
				Response.Write ","
				Response.Write ExRs(2,i)
				Response.Write ","
				Response.Write ExRs(3,i)
				Response.Write "';"
				Response.Write vbNewLine
			End if
		End if
		Response.Write "var members="&LCase(Exsm.Members)&";"
		Exsm.Name="ExSm_Imitate_News"
		If Exsm.InspectIsData() Then GetStockNews
		Exsm_News=Exsm.value
		If IsArray(ExSm_News) Then
			Response.Write "var newsliston=true;"
			For i=0 To Ubound(Exsm_News,2)
				Response.Write "newslist["&i&"]='"
				Response.Write Exsm.UbbCode(Exsm.htmlsetting(Exsm_News(0,i)))
				Response.Write "$!%^"
				Response.Write Exsm_News(1,i)
				Response.Write "$!%^"
				Response.Write Exsm_News(2,i)
				Response.Write "';"
			Next
		Else
			Response.Write "var newsliston=false;"
		End if
		Exsm.Name="ExSm_Imitate_UserSequence"
		If Exsm.InspectIsData() Then GetSequence
		Exsm_UserSequence=Exsm.value
		If IsArray(ExSm_UserSequence) Then
			Response.Write "var userliston=true;"
			For i=0 To Ubound(ExSm_UserSequence,2)
				Response.Write "userlist["&i&"]='"
				Response.Write Exsm_UserSequence(0,i)
				Response.Write ","
				Response.Write Exsm.htmlencode(Exsm_UserSequence(1,i))
				Response.Write ","
				Response.Write Exsm_UserSequence(2,i)
				Response.Write "';"
			Next
			Response.Write vbNewLine
		Else
			Response.Write "var userliston=false;"
		End if
		Response.Write "document.write(show_index_info());"
		Response.Write "</Script>"
		If CInt(Exsm.Setting_Info(10))>0 Then
			Dim Quotations
			Exsm.Name="Exsm_Imitate_Quotations"
			Quotations=Exsm.Value
			Response.Write "<Script Language=JavaScript>"
			Response.Write "var analyse_info="&CInt(Exsm.Setting_Info(10))&";"
			Response.Write "var assignwidth='"&Exsm.AssignWidth&"';"
			Response.Write "var regusernum="&Cint(Quotations(4))&";"
			Response.Write "var guestusernum="&Cint(Quotations(5))&";"
			Response.Write "var analyseon_info="&Exsm.Setting_Info(11)&";"
			Response.Write vbNewLine
			Response.Write "document.write(ex_index_analyse());"
			Response.Write "</Script>"
		End if
		If Exsm.StockAdmin Then
			Response.Write "<Script Language=JavaScript>"
			Response.Write "var analyseon_info="&Exsm.Setting_Info(10)&";"
			Response.Write "var assignwidth='"&Exsm.AssignWidth&"';"
			Response.Write "document.write(ex_index_adminmenu());"
			Response.Write "</Script>"
		End if
		Exsm.RootShow
	End Sub
%>