{?set jieqi_blocks_module = "article"?}
{?set jieqi_blocks_config = "authorblocks"?}
<div class="gridtop">《<a href="{?$url_articleinfo?}" target="_blank">{?$articlename?}</a>》 | <a href="{?$jieqi_modules['article']['url']?}/votenew.php?aid={?$articleid?}">增加新投票</a></div>
<table class="grid" width="100%" align="center">
  <tr align="center">
    <th width="50%">投票主题</th>
    <th width="12%">开始日期</th>
	<th width="12%">结束日期</th>
	<th width="10%">状态</th>
    <th width="16%">操作</th>
  </tr>
  {?section name=i loop=$voterows?}
  <tr>
    <td class="odd"><a href="{?$jieqi_modules['article']['url']?}/voteresult.php?id={?$voterows[i].voteid?}&aid={?$articleid?}" target="_blank">{?$voterows[i].title?}</a></td>
    <td class="even" align="center">{?$voterows[i].starttime|date:Y-m-d?}</td>
    <td class="odd" align="center">{?if $voterows[i].endtime > 0?}{?$voterows[i].endtime|date:Y-m-d?}{?/if?}</td>
	<td class="even" align="center">{?if $voterows[i].ispublish == 0?}未发布{?else?}<span class="hottext">发布中</span>{?/if?}</td>
	<td class="odd" align="center"><a href="{?$jieqi_modules['article']['url']?}/voteedit.php?id={?$voterows[i].voteid?}&aid={?$articleid?}">编辑</a> <a href="javascript:if(confirm('确实要删除本投票么？')) document.location='{?$jieqi_modules['article']['url']?}/votearticle.php?action=delete&vid={?$voterows[i].voteid?}&id={?$articleid?}';">删除</a> {?if $voterows[i].ispublish == 0?}<a href="{?$jieqi_modules['article']['url']?}/votearticle.php?action=publish&vid={?$voterows[i].voteid?}&id={?$articleid?}">发布</a>{?else?}<a href="{?$jieqi_modules['article']['url']?}/votearticle.php?action=cancel&vid={?$voterows[i].voteid?}&id={?$articleid?}">取消</a>{?/if?}</td>
  </tr>
  {?/section?}
</table>
