<%if {ispoll}%>
<!--投票区开始-->
<div class="ntforumbox ticket">
	<form id="formpoll" name="formpoll" method="post" action="poll.aspx?topicid={topicid}">
		<div id="ticketcount"><img src="templates/{templatepath}/images/pollsmall.gif" alt="欢迎"/>&nbsp;投票：<strong>{topictitle}</strong>
				<%if {polltype}==1%>
				<img src="templates/{templatepath}/images/ture.gif" alt="投票可以"/>多选
				<%/if%>
				<img src="templates/{templatepath}/images/error.gif" alt="时间限制"/>截止时间：{pollenddatetime}
		</div>
		<table border="0" cellpadding="0" cellspacing="0">
		<%loop poll polllist%>
		<tbody>
		<tr class="list">
			<th class="ticketleft">
					<%if {allowvote}%>
						<%if {poll[polltype]}=="1"%>
							<input type="checkbox" name="pollitemid" value="{poll[_id]}" />
						<%else%>
							<input type="radio" name="pollitemid" value="{poll[_id]}" />
						<%/if%>
					<%/if%>
					{poll[name]}
			</th>
			<td width="420">
				<div class="ticket-show">
					<div style="width:{poll[percent]}"></div>
				</div>
			</td>
			<td class="ticketnumbers"><strong>{poll[value]}</strong>票 / {poll[percent]}
			</td>
		</tr>
		</tbody>
		<%/loop%>
		<%if {config.silverlight}==1%>
		<tbody>
			<tr class="list">
			<td colspan="3"><iframe src="silverlight/piechart/index.html?topicid={topicid}&bg=FBFBFB" allowtransparency="yes" width="95%" height="425" border="0" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" ></iframe>
			</td>
			</tr>
		</tbody>
		<%/if%>
		<tbody>
		<tr class="list">
			<td colspan="3" class="ticketfooter">
			<input type="button" value="查看投票用户名单>>" onclick="expandoptions('ticketvoterlist');" class="lightbutton" />
					<%if {usergroupinfo.allowvote}==1%>
						<%if {userid}==-1%>
							提示: 您尚未登录, 因此无法参与投票
						<%else%>
							<%if {allowvote}%>
								<input type="submit" name="Submit" value="投票" class="lightbutton" />
							<%else%>							
								提示: 您已经投过票或者投票已经过期
							<%/if%>
						<%/if%>						
					<%else%>
					抱歉,您没有参与投票的权限
					<%/if%>
			 </td>
		</tr>
		</tbody>
		</table>
	</form>
</div>
<div id="ticketvoterlist" style="display:none;" class="ntforumbox">
	<table width="96%" border="0" cellpadding="4" cellspacing="0">
		<tr>
			<td align="left">投票用户名单:<br />
				{voters}</td>
		</tr>
	</table>
</div>
<!--投票区结束-->
<%/if%>