<!--#include file="Inc.asp"-->
<!--#include file="Inc/page_Cls.asp"-->
<%
Dim TextInfo,Action,Title
Dim SqlWhere
Dim Caption,Content,tPageUrl

If Not BBS94KK.Founduser Then BBS94KK.GoToErr(10)
If BBS94KK.BoardID>0 Then
	BBS94KK.CheckBoard()
	SqlWhere="BoardID="&BBS94KK.BoardID&" And IsDel=0 And "
	TextInfo="查看"&BBS94KK.BoardName
Else
	SqlWhere="IsDel=0 And "
	BBS94KK.Position=BBS94KK.Position&" → <a href='UserInfo.asp'>用户控制面版<a>"
	TextInfo="查看"
End If
Action=Lcase(Request.querystring("Action"))
If len(Action)>10 Then BBS94KK.GotoErr(1)
Select Case Action
Case"mysay"
	Title="本人帖子列表"
	BBS94KK.Head TextInfo&Title
	SqlWhere=SqlWhere&"Name='"&BBS94KK.MyName&"'"
Case"myreply"
	Title="本人回复列表"
	BBS94KK.Head TextInfo&Title
	SqlWhere=SqlWhere&"Name<>'"&BBS94KK.MyName&"' and (TopicID in (select ReplyTopicID from [KK_bbs"&BBS94KK.TB&"] where name='"&BBS94KK.MyName&"' And IsDel=0))"
Case"mygood"
	Title="本人精华帖子列表"
	BBS94KK.Head TextInfo&Title
	SqlWhere=SqlWhere&"name='"&BBS94KK.MyName&"' and IsGood"
Case"last"
	Title="上次访问后论坛的新帖"
	BBS94KK.Head TextInfo&Title
	SqlWhere =SqlWhere&"Datediff('s',LastTime,'"&BBS94KK.GetMemor("","LastTime")&"')<0"
Case Else
	BBS94KK.GotoErr(1)
End Select
If BBS94KK.BoardID=0 Then
	MyManager()
	tPageUrl="?Action="&Action&"&BoardID="&BBS94KK.BoardID
Else
 	tPageUrl="?Action="&Action
End If
ShowTopic()
BBS94KK.Footer()
Set BBS94KK=Nothing



Function ShowTopic()
	Dim Temp,intPageNow,arr_Rs,i,Pages,Conut,p,PageInfo
	Dim Topic,TopicS,Caption,Moodpic,LastRe,RePageUrl,UploadType,RePage,leftn,ii
	Set P = New Cls_PageView
	P.strTableName = "[KK_Topic]"
	P.strPageUrl = tPageurl
	P.strFieldsList = "TopicID,Face,Caption,Name,TopType,IsGood,AddTime,BoardID,LastTime,Hits,LastReply,UploadType,IsVote,ReplyNum,SqlTableID,IsLock,Font"
	P.strCondiction = SqlWhere
	P.strOrderList = "TopType desc,LastTime desc"
	P.strPrimaryKey = "TopicID"
	P.intPageSize = 15
	P.intPageNow=request("page")
	P.strCookiesName = Action
	P.Reloadtime=10
	P.InitClass
	Arr_Rs = P.arrRecordInfo
	PageInfo = P.strPageInfo
	Set P = nothing
	If IsArray(Arr_Rs) Then
	For i = 0 to UBound(Arr_Rs, 2)
		Moodpic=BBS94KK.SkinsPIC(16)
		If Arr_Rs(13,i) > Int(BBS94KK.Info(62)) Then Moodpic=BBS94KK.SkinsPIC(15)
		If Arr_Rs(5,i)=1 Then Moodpic=BBS94KK.SkinsPIC(13)'精华
		If Arr_Rs(15,i)=1 Then Moodpic=BBS94KK.SkinsPIC(17)'锁定
		If Arr_Rs(12,i)=1 Then Moodpic=BBS94KK.SkinsPIC(14)'投票
		If Arr_Rs(4,i)=5 Then Moodpic=BBS94KK.SkinsPIC(10)'总顶
		If Arr_Rs(4,i)=4 Then Moodpic=BBS94KK.SkinsPIC(11)'区顶
		If Arr_Rs(4,i)=3 Then Moodpic=BBS94KK.SkinsPIC(12)'顶
		UploadType=""
		If Arr_Rs(11,i)<>"" Then Uploadtype="<img src='pic/FileType/"&Arr_Rs(11,i)&".gif' border='0' atl='"&Arr_Rs(11,i)&"' /> "
		LastRe=split(Arr_Rs(10,i),"|")
		RePage=(Arr_Rs(13,i)+1)\10
		If RePage<(Arr_Rs(13,i)+1)/10 Then RePage=RePage+1
		RePageUrl="Show.asp?id="&Arr_Rs(0,i)&"&BoardID="&Arr_Rs(7,i)&"&TB="&Arr_Rs(14,i)&""
		
		Caption=BBS94KK.Fun.StrLeft(Arr_Rs(2,i),60)
		Temp=Arr_Rs(16,i)
		If Not isNull(Temp) And Temp<>"" Then
			Temp=Split(Temp,"|")
			If Temp(0)<>"" Then Caption="<"&Temp(0)&">"&Caption&"</"&Temp(0)&">"
			If Temp(1)<>"" Then Caption="<span style='color:"&Temp(1)&"'>"&Caption&"</span>"
		End If
		'打开方式
		If BBS94KK.Info(69)="1" Then Temp="target='_blank' " Else Temp=""
		Caption=UploadType&"<a "&Temp&"href='"&Repageurl&"'><span title='最后回复内容："&LastRe(1)&"'>"&Caption&"</span></a>"
		If Repage>1 Then
			Caption=Caption&" [<img src='images/Icon/gopage.gif' width='10' height='12' /> "
			If RePage<=5 Then
				For ii=2 To RePage
					Caption=Caption&"<a href='"&RePageurl&"&page="&ii&"'>"&ii&"</a> "
				Next
			Else
				For ii=2 To 4
					Caption=Caption&"<a href='"&RePageurl&"&page="&ii&"'>"&ii&"</a> "
				Next
					Caption=Caption&"... <a href='"&RePageurl&"&page="&RePage&"'>"&RePage&"</a> "
			End If
			Caption=Caption&" ]"
		End If
		If Datediff("n",Arr_Rs(8,i),BBS94KK.NowbbsTime)<=180 Then Caption=Caption&BBS94KK.SkinsPIC(18)
		Caption=Moodpic&"<img src='pic/face/"&Arr_Rs(1,i)&".gIf' />"&Caption
		Topic="<div style='padding: 5px;text-align:left;border-bottom:1px solid "&BBS94kk.SkinsPIC(0)&";color:#5D7790'>"&BBS94KK.GetBoardName(arr_Rs(7,i))&"<br /> "&Caption&""&_
		"<div>作者："&Arr_Rs(3,i)& " | 发表时间："&Arr_Rs(6,i)&" | 浏览："&Arr_Rs(9,i)&" | 回复："&Arr_Rs(13,i)&"</div></div>"
		TopicS=TopicS&Topic
	Next
	Topics=Topics&"<div style=""height:25px;BACKGROUND: "&BBS94KK.SkinsPIC(2)&";"">"&PageInfo&"</div>"
	End If
	BBS94KK.ShowTable Title,TopicS
	
End Function

Sub MyManager()
	Response.Write BBS94KK.ReadSkins("用户控制面版")
End Sub
%>