<!--{eval
    $_HEAD['title'] = ($subject ? ($subject[name]  . ',' . $subject[subname] . ',') : '') . (isset($catid)?$category[$catid][name]:'') . $_CITY[name].$MOD[name] . $_CFG['titlesplit'] . $MOD[subtitle];
}-->
<!--{template 'header', 'item', $subject[templateid]}-->
<script type="text/javascript">
function coupon_effect(couponid) {
	$.post(Url('coupon/detail/do/effect/id/'+couponid), 
	{ effect:'effect1',in_ajax:1 },
	function(result) {
        if(result == null) {
			alert('信息读取失败，可能网络忙碌，请稍后尝试。');
        } else if (result.match(/\{\s+caption:".*",message:".*".*\s*\}/)) {
            myAlert(result);
		} else if (result == 'OK') {
            $('#btn_effect1').html('对我有用!');
        } 
	});
}
</script>
<div class="item-content">

    <div class="item-left mt10">

        <div class="item-rail">
            <h3 class="railtitle">优惠券编号：$couponid</h3>

            <div class="coupon-detail">
                <h1 class="subject">[{$category[$detail[catid]][name]}]&nbsp;$detail[subject]</h1>
                <div class="info">发布时间：{date $detail[dateline],'Y-m-d'}&nbsp;&nbsp;&nbsp;&nbsp;人气：$detail[pageview]&nbsp;&nbsp;&nbsp;&nbsp;打印：$detail[prints]&nbsp;&nbsp;&nbsp;&nbsp;评论：$detail[comments]</div>

                <div class="des">
                    <ul>
                        <li>有效时间：{date $detail[starttime],'Y-m-d'} ~ {date $detail[endtime],'Y-m-d'}</li>
                        <li>优惠说明：$detail[des]</li>
                        <!--{if $_CFG[sharecode]}--><li><div class="float_left">分享信息：</div>$_CFG[sharecode]<div class="clear"></div></li><!--{/if}-->
                    </ul>
                </div>

                <div class="print">
                    <a class="abtn1" href="{url coupon/print/id/$couponid}"><span>打印此券</span></a>
                    <span id="btn_effect1"><a class="abtn2" href="javascript:coupon_effect($couponid);"><span>对我有用</span></a></span>
                    <div class="clear"></div>
                </div>

                <div class="picture"><img src="{URLROOT}/$detail[picture]" alt="$detail[subject]" /></div>

                <div class="content">
                    <p>$detail[content]</p>
                </div>

                <!--{if check_module('comment')}-->
                <div class="comment_foo">
                    <style type="text/css">@import url("{URLROOT}/{$_G[tplurl]}css_comment.css");</style>
                    <script type="text/javascript" src="{URLROOT}/static/javascript/comment.js"></script>
                    <!--{eval $comment_modcfg = $_G['loader']->variable('config','comment');}-->
                    <!--{if $detail[comments]}-->
                    <!--{/if}-->
                    <a name="comment"></a>
                    <!--{if !$comment_modcfg['hidden_comment']}-->
                    <div class="mainrail rail-border-3">
                        <em>评论总数:<span class="font_2">$detail[comments]</span>条</em>
                        <h1 class="rail-h-3 rail-h-bg-3">网友评论</h1>
                        <div id="commentlist" style="margin-bottom:10px;"></div>
                        <script type="text/javascript">
                        $(document).ready(function() { get_comment('coupon',$couponid,1); });
                        </script>
                    </div>
                    <!--{/if}-->
                    {eval $_G['loader']->helper('form');}
                    <div id="comment_form">
                        <!--{if $user->check_access('comment_disable', $_G['loader']->model(':comment'), false)}-->
                            <!--{if $MOD[post_comment] && !$comment_modcfg['disable_comment'] && !$detail[closed_comment]}-->
                            <!--{eval $idtype = 'coupon'; $id = $couponid; $title = 'Re:' . $detail[subject];}-->
                            {template comment_post}
                            <!--{else}-->
                            <div class="messageborder">评论已关闭</div>
                            <!--{/if}-->
                        <!--{else}-->
                        <div class="messageborder">如果您要进行评论信息，请先&nbsp;<a href="{url member/login}">登录</a>&nbsp;或者&nbsp;<a href="{url member/reg}">快速注册</a>&nbsp;。</div>
                        <!--{/if}-->
                    </div>
                </div>
                <!--{/if}-->

            </div>

        </div>

    </div>

    <div class="item-right mt10">
        <!--{template 'part_side', 'item', $subject[templateid]}-->
    </div>
    <div class="clear"></div>

</div>
<!--{template 'footer', 'item', $subject[templateid]}-->