📄 see.asp
字号:
<!--#include file="Inc.asp"-->
<!--#include file="inc/ubb_Cls.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td,tr,table,body{font-size: 9pt; margin:0}
-->
</style>
<%Dim Action,ID,UserName,BbsID
Action=Lcase(Request.querystring("Action"))
ID=BBS94KK.Checknum(request.querystring("ID"))
Select Case Action
Case"vote"
Vote
Case"placard"
Placard()
Case"preview"
Preview()
Case"checkname"
CheckUserName()
Case"headpic"
HeadPic()
End Select
Set BBS94KK=Nothing
Sub Vote()
Dim Rs,Arr_Rs,i,Temp,Caption,Content,Vote,VoteNum,AllvoteNum,VotePicW,ii,VoteShow,VoteType,voteopt
Response.Write"<title>投票详情</title>"
If Not BBS94KK.FoundUser Then Response.Write"你还没有登陆,不能查看投票详细信息。":Response.End
Set Rs=BBS94KK.Execute("Select TopicID,Vote,VoteNum,VoteType,OutTime From [KK_TopicVote] where TopicID="&ID&"")
If Not Rs.Eof then
VoteType=Rs("VoteType")
Vote=Split(Rs("Vote"),"|")
VoteNum=split(Rs("VoteNum"),"|")
For i=1 to ubound(Vote)
AllvoteNum=Int(AllvoteNum+VoteNum(i))
Next
IF AllVoteNum=0 then AllvoteNum=1
For i=1 To ubound(Vote)
ii=ii+1
VotePicW=VoteNum(i)/AllvoteNum*85
IF ii>6 Then ii=1
VoteShow=VoteShow&"<tr><td width='5%' height=25 > "&i&"</td><td width='40%'> "&BBS94KK.Fun.HtmlCode(Vote(i))&"</td><td width='35%' > <img border=0 height=8 width=2 src=Images/line.gif><img border=0 height=8 width='"&VotePicW&"%' src='Images/hr"&ii&".gif'> <b>"&VoteNum(i)&"</b> 票</td></tr>"
next
End if
Caption="投票选项"
Content="<table frame=void border='1' cellpadding='3' cellspacing='0' bordercolor='#999999' style='border-collapse: collapse' width='100%'><tr>"&VoteShow&"<tr><td width='100%' height=25 colspan=4> 共投了:"&AllvoteNum&"票 截止时间:"&Rs("OutTime")&" </td></tr></table>"
Rs.Close
Call BBS94KK.ShowTable(Caption,Content)
Set Rs=BBS94KK.execute("select VoteNum,User From[KK_TopicVoteUser] where TopicID="&ID&"")
Content=""
If Not Rs.eof Then Arr_Rs=Rs.GetRows
Rs.Close
If IsArray(Arr_Rs) Then
For i=0 To Ubound(Arr_Rs,2)
VoteOpt=Split(Arr_Rs(0,i),",")
Temp=""
For II=0 to ubound(VoteOpt)
If VoteOpt(ii)<>"" then
Temp=Temp&"投票第"&VoteOpt(ii)&"项:"&BBS94KK.Fun.HtmlCode(Vote(int(VoteOpt(ii))))&"<br>"
End if
Next
Content=Content&"<tr><td height='25'> "&Arr_Rs(1,i)&"</td><td>"&Temp&"</td></tr>"
Next
Caption="投票用户"
Content="<table frame=void border='1' cellpadding='3' cellspacing='0' bordercolor='#999999' style='border-collapse: collapse' width='100%'>"&Content&"</table>"
Call BBS94KK.ShowTable(Caption,Content)
End If
End Sub
Sub HeadPic()
Dim Temp,Caption,Content,I,tr_I
Response.Write"<title>94KK论坛头像选择器</title>"
Caption="论坛自带的头像 共"& BBS94KK.BbsCache(19) &"个"
For I=1 To Int(BBS94KK.BbsCache(19))
tr_i=tr_i+1
Temp=Temp &"<td style='cursor:hand' title='点击选择 "& I &" 号头像' onclick=instrPic("& I &")><img Src='Pic/HeadPic/"& i &".Gif'></td>"
If tr_i=5 Then Temp=temp &"</tr><tr>":Tr_i=0
Next
Content="<table width='100%' barder=1>"& Temp &"</td></tr></table>"
Call BBS94KK.ShowTable(Caption,Content)
End Sub
Sub Placard()
Dim Rs,Caption,Content,BBS94KK_ubb
Response.Write "<title>论坛公告</title>"
Set BBS94KK_ubb=New BBS94KKubb_Cls
Set Rs=BBS94KK.execute("select Caption,Content,AddTime,Name,hits,ubbString from [KK_Placard] where Id="&ID&"")
If Rs.eof then
Caption="错误信息"
Content="没有公告内容。"
Else
BBS94KK_ubb.UbbString=Rs("ubbString")
Caption=BBS94KK.Fun.HtmlCode(Rs("Caption"))
Content="<tr><td><blockquote><span style='line-height:150%;table-layout:fixed;word-wrap:break-word;word-break:break-all; width:100%'><br><div align='center'><font style='font:bold 18px;'>"&BBS94KK.Fun.HtmlCode(Rs("Caption"))&"</font></div><hr size=1>"&BBS94KK_ubb.UBB(Rs("Content"),2)&"<hr size=1><div align='right'>发布人:"&Rs("name")&" | 发表于:"&Rs("AddTime")&" | 阅读次数:"&Rs("hits")&" </div></Span></blockquote></td></tr>"
BBS94KK.execute("Update [KK_Placard] set Hits=Hits+1 where Id="&ID&"")
End If
Set BBS94KK_ubb=Nothing
Rs.close
Call BBS94KK.ShowTable(Caption,Content)
Response.Write"<div align='center'><input type='button' onclick='window.close();' value='关闭窗口'></div>"
End Sub
Sub Preview()
Dim Caption,Content,BBS94KK_ubb
Response.Write "<title>帖子预览</title><SCRIPT src=""inc/Fun.js""></SCRIPT>"
Set BBS94KK_ubb=New BBS94KKubb_Cls
Caption=BBS94KK.Fun.HtmlCode(trim(request.form("Caption")))
Content=trim(request.form("Content"))
BBS94KK_ubb.UbbString=BBS94KK.Fun.UbbString(Content)
Content="<tr><td><blockquote><span style='line-height:150%;table-layout:fixed;word-wrap:break-word;word-break:break-all; width:100%'><br>"&BBS94KK_ubb.UBB(Content,1)&"</Span></blockquote></td></tr>"
Set BBS94KK_ubb=Nothing
Call BBS94KK.ShowTable(Caption,Content)
End Sub
Sub CheckUserName()
Dim Caption,Content,Temp,Name,can,I
Response.Write"<title>检测用户名</title>"
Name=trim(Request("name"))
Caption="新用户注册"
If Name="" or Name=NULL Then
Temp= "对不起!<br>请填写用户名!"
Else
If not BBS94KK.Fun.CheckName(Name) or BBS94KK.Fun.strLength(Name)>14 Then
Temp="对不起!<br>用户名 <font color=red><b>"&BBS94KK.Fun.HtmlCode(Name)&"</b></font> <br>含有非法字符或字符过多"
Else
If Not BBS94KK.execute("select name from [KK_User] where name='"&Name&"'").eof Then
Temp="对不起!<br>用户名 <font color=red><b>"&BBS94KK.Fun.HtmlCode(Name)&"</font></b> 已被人注册了!"
Else
If instr("|"&lcase(BBS94KK.BadName)&"|","|"& lcase(Name) &"|")>0 Then
Can=true
End If
If Can Then
Temp="非法用户名,不能注册!"
Else
Temp="恭喜你,<font color=red><b>"&Name&"</b></font> 可以注册。"
End If
End If
End If
End If
Response.Write "<table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor='#126DC9' width='100%' height='100%' bgcolor='#f2f8ff'><tr><td height=22 align=center bgcolor='#B1F8CF'>新用户注册</td></tr><tr><td align=center>"&Temp&"</td></tr></table>"
End Sub%>
<script language='JavaScript'>
function instrPic(id){
self.opener.document.images.Pic.src="pic/headpic/"+id+".gif";
self.opener.form.PicUrl.value="pic/headpic/"+id+".gif";
window.close();
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -