<?php include_once tpl('header');?>
<card title="<?php echo filter_content($vote['subject']);?> - <?php echo setting('webname');?>">
<p align="left">
主题：<?php echo $vote['subject'];?>
<br/>
<?php if(IS_OVER):?>
    状态：已结束<br/>
<?php endif;?>
发起人：<?php ilink($this->filter(userName($vote['uid'])), url('system',array('s'=>'member','uid'=>$vote['uid'])));?>
<br/>
说明：
<br/>
<?php echo $vote['description'];?>
<br/>
<?php if ($vote['multiple'] && $vote['maxchoices']):?>
	------------------
	<br/>
	此为多选，最多选<?php echo $vote['maxchoices'];?>个
	<br/>
<?php endif;?>
--------------------
<br/>
<?php if ($vote['award']):?>
1,参与投票者能获得<?php echo $vote['award'].setting('creditname');?>奖励<br/>
2,上届的超管将优先排在前面
<br/>
--------------------
<br/>
<?php endif;?>
选项：
<br/>
<?php if (!empty($vote['options'])):?>
	<?php $x = 1;?>
	<?php if ($vote['multiple']):?>
		<?php foreach ($vote['options'] as $option):?>
			<?php $optionName = 'option_'.$option['id'];?>
			<?php echo $x;?>.<?php echo $this->filter($option['option']);?>(<?php echo $option['votes'];?>)<?php if (!IS_OVER && $iorange_id && !in_array($iorange_id, $voterids)):?>|<select name="<?php echo $optionName;?>"><option value="0">未选中</option><option value="<?php echo $option['id'];?>">已选中</option></select><?php endif;?><br/>
			<?php $optionNames[$option['id']] = $optionName;?>
			<?php $x++;?>
		<?php endforeach;?>
		<?php if (!IS_OVER || ($this->uid() && !in_array($this->uid(), $voterids))):?>
		<anchor><go href='<?php echo url('vote/index',array('id'=>$voteid));?>' accept-charset='utf-8' method='post'>
			<?php foreach ($optionNames as $key => $value):?>
				<postfield name='<?php echo $value;?>' value='$(<?php echo $value;?>)'/>
			<?php endforeach;?>
			<postfield name='vote' value='1'/>
		</go>提交</anchor>
		<br/>
		<?php endif;?>
	<?php else:?>
		<?php foreach ($vote['options'] as $option):?>
			<?php echo $x;?>.<?php echo $this->filter($option['option']);?>(<?php echo $option['votes']?>)<?php if (!IS_OVER && $this->uid() && !in_array($this->uid(), $voterids)):?>|<a href="<?php echo url('system',array('s'=>'forum','c'=>'vote', 'a'=>'superbm','confirm'=>1,'optionid'=>$option['id']));?>">投票</a><?php endif;?><br/>
			<?php $x++;?>
		<?php endforeach;?>
	<?php endif;?>
<?php else:?>
	暂无选项<br/>
<?php endif;?>
------------------------
<br/>
注：只有通过<a href="<?php echo url('verify');?>">短信验证</a>的书友才能参与投票
<br/>

<?php include_once tpl('footer');?>