<!--{template @admin/header}--> <script src="js/calenderJS.js"></script> <form method="post" action="{$action}"> <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"> <tr class="header"> <td colspan="6">团购券管理 </td> </tr> <!--{if !empty($ticket)}--> <tr> <td colspan="6">请输入您要搜索的团购券或用户名：
<input name="keyword" value="{$keyword}" id="keyword" type="text" /> <select name="type"> <option value="1" {if $searchtype==1}selected{/if}>团购券编号</option> <option value="2" {if $searchtype==2}selected{/if}>用户名</option> <option value="3" {if $searchtype==3}selected{/if}>产品名称</option> </select>&nbsp;， 
过期时间<input name="time" value="{$time}" id="keyword" type="text" onfocus="HS_setDate(this)" /> <select name="used"> <option value="false" {if $used=='false'}selected{/if}>使用状态不限</option> <option value="0" {if $used=='0'}selected{/if}>已使用</option> <option value="1" {if $used=='1'}selected{/if}>未使用</option> <option value="2" {if $used=='2'}selected{/if}>已过期</option> </select> <input name="bottom" type="submit" id="bottom" value="搜索" /> </td> </tr> <!--{/if}--> <tr> <td width="33%">产品名称</td> <td width="12%">购买人</td> <td width="15%">团购券号</td> <td width="15%">过期时间</td> <td width="10%">状态</td> <td width="15%">管理</td> </tr> <!--{if empty($ticket)}--> <tr><td colspan="8">暂时没有团购券哦。<BR>
团购券是在商品达到或者超过最低团购人数时，由系统自动生成！</td></tr> <!--{/if}--> <!--{loop $ticket $i $value}--> <tr onmouseover="this.className='tr_hover'" onmouseout="this.className='tr_normal'"> <td title="{$value['name']}">{eval echo substr($value['name'],0,70);}...</td> <td>{$value['username']}</td> <td>{$value['number']}</td> <td>{echo date('Y-m-d H:i:s', $value['perioddate']);}
{if $value['status']==0}
<br/>
{eval $lessTime = $value['perioddate']-time();}
{eval $lessTimeShow = DateLess($lessTime, 2);}
{if $lessTime < 3600 && $lessTime > 0}
<font color="#FF3366">{$lessTimeShow}</font>
{elseif $lessTime <= 0}
<font color="#666666">已经过期</font>
{else}
<font color="#009900">{$lessTimeShow}</font>
{/if}
{/if}
</td> <td>{if $value['status']==0}未使用{elseif $value['status']==1}<font color="blue">已使用</font>{else}<font color="red">已过期</font>{/if}</td> <td align="center">
{if $value['status']!=1}
<a href="#" onclick="if(confirm('您确认要删除该团购券吗？请谨慎使用该功能！')){window.location.href='?mod=tttuangou&code=deleteticket&ticketid={$value['ticketid']}'}">删除</a>
{/if}
{if $value['status']==1}<a href="?mod=tttuangou&code=warnofticket&id={$value['ticketid']}">Email到期提醒</a>{/if}</td> </tr> <!--{/loop}--> </table>
{$page_arr}
<br> <center> </center> </form>
{template @admin/footer}