?? dispvote.asp
字號:
<%
Dim vrs,vote,vote_1,votenum,votenum_1,m,g,votetype
g=0
set vrs=conn.execute("select vote,votenum,votetype,voteuser from vote where AnnounceID="&RootID&"")
if not (vrs.eof and vrs.bof) then
vote=split(vrs("vote"),"|")
votenum=split(vrs("votenum"),"|")
for i = 0 to ubound(votenum)
votenum_1=cint(votenum_1)+votenum(i)
next
if votenum_1=0 then votenum_1=1
for m = 0 to ubound(vote)
g=g+1
if g=11 then g=1
if cint(vrs("votetype"))=0 then
votetype="<input type=radio name=postvote value="""&m&""">"
else
votetype="<input type=checkbox name=postvote_"&m&" value="""&m&""">"
end if
Disp_votebit=Disp_votebit & Eval(""""&Application(Forum_sn & "template" & tempid)(42)&"""")
votetype=""
next
%>
<%
set vrs=conn.execute("select vote,votenum,votetype,voteuser from vote where announceid="&announceid&"")
vote=split(vrs("vote"),"|")
votenum=split(vrs("votenum"),"|")
response.write "<table border=0 cellpadding=0 cellspacing=3 width=""95%"" align=center><tr>"
response.write "<td colSpan=2><font color="&TableContentColor&">以下為投票內容:</font></td></tr>"
response.write "<form action=postvote.asp?boardid="&boardid&"&announceid="&announceid&"&action="&vrs("votetype")&" method=POST>"
for m = 0 to ubound(vote)
if cint(vrs("votetype"))=0 then
vote_1=vote_1&"<tr><td height=20><font color="&TableContentColor&">"&m+1&". <input type=radio name=postvote value="""&m&""">"&htmlencode(vote(m))&"</font></td></tr>"
else
vote_1=vote_1&"<tr><td height=20><font color="&TableContentColor&">"&m+1&". <input type=checkbox name=postvote_"&m&" value="""&m&""">"&htmlencode(vote(m))&"</font></td></tr>"
end if
next
response.write "<tr><td width=""60%""><table><font color="&TableContentColor&">"&vote_1&"</font></table></td>"
vote_1=""
for m = 0 to ubound(votenum)
votenum_1=votenum_1&"<tr><td height=20><font color="&TableContentColor&">票數:<font color="&AlertFontColor&"><b>"&votenum(m)&"</b></font></font></td></tr>"
next
response.write "<td width=""40%"" valign=top><table><font color="&TableContentColor&">"&votenum_1&"</font></table></td></tr>"
votenum_1=""
if VoteFlag=1 then
response.write "<tr><td colSpan=2><br><input type=submit name=Submit value='投 票'></td>"
else
if membername="" then
response.write "<tr><td colSpan=2><br><font color="&AlertFontColor&">您還沒有登陸,不能進行投票。</font></td>"
else
if instr(vrs("voteuser"),membername)>0 then
response.write "<tr><td colSpan=2><br><font color="&AlertFontColor&">您已經投過票了,請看結果吧。</font></td>"
else
response.write "<tr><td colSpan=2><br><input type=submit name=Submit value='投 票'></td>"
end if
end if
end if
response.write "</form>"
response.write "</tr></table>"
set vrs=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -