<!--{if !$_G[in_ajax]}-->
<div class="mainrail rail-border-3 subject reviews">

    <!--{if $detail[firstuid]}-->
        <em>第一个点评：<span class="member-ico"><a href="{url space/index/uid/$detail[firstname]}" target="_blank">$detail[firstname]</a></span></em>
    <!--{/if}-->

    <ul class="subtab" id="subtab">
        <li class="selected" id="tab_review"><a href="{url item/detail/id/$sid/view/review}#review" onfocus="this.blur()" onclick="return get_review('item_subject',$detail[sid]);">会员点评</a></li>
        <!--{if $catcfg[gusetbook]}-->
        <li id="tab_guestbook"><a href="{url item/detail/id/$sid/view/guestbook}#guestbook" onfocus="this.blur()" onclick="return get_guestbook($detail[sid]);">会员留言</a></li>
        <!--{/if}-->
    </ul>
    <div class="clear"></div>

<!--{/if}-->

    <div id="display">

        <div class="subrail" style="margin:5px 10px 5px;">
            筛选：<span{if $review_filter=='all'} class="selected"{/if} id="review_filter_all"><a href="#" onclick="return get_review('item_subject',$id,'all','$review_orderby',1);" onfocus="this.blur();">综合</a></span>
            <span{if $review_filter=='best'} class="selected"{/if} id="review_filter_best"><a href="#" onclick="return get_review('item_subject',$id,'best','$review_orderby',1);" onfocus="this.blur();">好评</a></span>
            <span{if $review_filter=='bad'} class="selected"{/if} id="review_filter_bad"><a href="#" onclick="return get_review('item_subject',$id,'bad','$review_orderby',1);" onfocus="this.blur();">差评</a></span>
            <span{if $review_filter=='pic'} class="selected"{/if} id="review_filter_pic"><a href="#" onclick="return get_review('item_subject',$id,'pic','$review_orderby',1);" onfocus="this.blur();">图文</a></span>
            &nbsp;|&nbsp;&nbsp;排序：<span{if $review_orderby=='posttime'} class="selected"{/if} id="review_order_posttime"><a href="#" onclick="return get_review('item_subject',$id,'$review_filter','posttime',1);" onfocus="this.blur()">最新点评</a></span>
            <span{if $review_orderby=='flower'} class="selected"{/if} id="review_order_flower"><a href="#" onclick="return get_review('item_subject',$id,'$review_filter','flower',1);" onfocus="this.blur()">最多鲜花</a></span>
            <span{if $review_orderby=='respond'} class="selected"{/if} id="review_order_respond"><a href="#" onclick="return get_review('item_subject',$id,'$review_filter','respond',1);" onfocus="this.blur()">最多回应</a></span>
        </div>

        <!--{if $detail[reviews] || $total}-->

		<!--{eval $index=1;}-->
        <!--{dbres $reviews $val}-->
        <div class="review">
            <div class="member m_w_item">
                <!--{if $val[uid]}-->
                <a href="{url space/index/uid/$val[uid]}"><img src="{print get_face($val[uid])}" class="face" alt="$val[username]"></a>
                <!--{else}-->
                <img src="{print get_face($val[uid])}" class="face">
                <!--{/if}-->
                <ul>
                    <!--{if $val[uid]}-->
                    <li>{print:member group(groupid/$val[groupid]/color/1)}</li>
                    <li>积分:<span>$val[point]</span></li>
                    <li>金币:<span>$val[coin]</span></li>
                    <!--{else}-->
                    <li>游客</li>
                    <!--{/if}-->
                </ul>
            </div>
            <div class="field f_w_item">

                <div class="feed">
                    <em>
                        <!--{if $user->isLogin && $user->uid==$val[uid]}-->
                        <span class="review-ico"><a href="{url review/member/ac/edit/op/edit/rid/$val[rid]}">编辑</a></span>&nbsp;
                        <!--{/if}-->
                        <span class="respond-ico"><a href="javascript:get_respond('$val[rid]');">回应</a></span>(<span class="font_2" id="respond_$val[rid]">$val[responds]</span> 条)&nbsp;
                        <span class="flower-ico"><a href="javascript:add_flower($val[rid]);">鲜花</a>(<a href="javascript:get_flower($val[rid]);"><span id="flower_$val[rid]" class="font_2">$val[flowers]</span> 朵</a>)</span>&nbsp;
                        <a href="javascript:post_report($val[rid]);">举报</a>&nbsp;
                    </em>
                    <!--{if $val[uid]}-->
                    <span class="member-ico"><a href="{url space/index/uid/$val[uid]}">$val[username]</a></span>&nbsp;(&nbsp;<a href="javascript:send_message($val[uid]);">发短信</a>, <a href="javascript:add_friend($val[uid]);">加好友</a>&nbsp;)&nbsp;
                    <!--{else}-->
                    <span class="font_3">游客({print preg_replace("/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/","\\1.\\2.*.*", $val[ip])})</span>
                    <!--{/if}-->
                    在&nbsp;{date $val[posttime], 'w2style'}&nbsp;进行了点评
                </div>

                <div class="info{if $val[digest]} review-digest{/if}">

                    <ul class="score">
                        <!--{loop $reviewpot $_val}-->
                        <li>$_val[name]</li><li class="start{print cfloat($val[$_val[flag]])}"></li>
                        <!--{/loop}-->
                    </ul>

                    <div class="clear"></div>

                    <!--{if $val[pictures]}-->
                    <div class="pictures">
                        <!--{eval $val[pictures] = unserialize($val[pictures]);}-->
                        <!--{loop $val[pictures] $pic}-->
                        <a href="{URLROOT}/$pic[picture]"><img src="{URLROOT}/$pic[thumb]" onmouseover="tip_start(this);" /></a>
                        <!--{/loop}-->
                    </div>
                    <!--{/if}-->

                    <div style="min-height:68px;">
                        {if $val[title]}<h4 class="title"><a href="{url review/detail/id/$val[rid]}">$val[title]</a></h4>{/if}
                        <!--{eval 
                            $reviewurl = '...<a href="' . url("review/detail/id/".$val[rid]) . '">[查看全文]</a>';
                            $val[content] = trimmed_title($val[content],500,$reviewurl);
                        }-->
                        <p>{print nl2br($val[content])}</p>
                        <ul class="params">
                            <li>总体评价：<span class="font_2">{if $val[best]}好{else}不好{/if}</span></li>
                            <!--{if $val[price] && $catcfg['useprice']}-->
                            <li>$catcfg[useprice_title]: <span class="font_2">$val[price]{$catcfg[useprice_unit]}</span></li>
                            <!--{/if}-->
                            <!--{eval $detail_tags = $val['taggroup'] ? @unserialize($val['taggroup']) : array();}-->
                            <!--{loop $taggroups $_key $_val}-->
                                <!--{if $detail_tags[$_key]}-->
                                    <li>$_val[name]:
                                    <!--{loop $detail_tags[$_key] $tagid $tagname}-->
                                        <a href="{url item/tag/tagname/$tagname}">$tagname</a>
                                    <!--{/loop}-->
                                    </li>
                                <!--{/if}-->
                            <!--{/loop}-->
                        </ul>
                    </div>

                    <div id="flowers_$val[rid]"></div>
                    <div id="responds_$val[rid]"></div>

                </div>
            </div>
            <div class="clear"></div>
        </div>
		<!--{if $index==1}-->
		<div id="adv_1"></div>
		<!--{/if}-->
		<!--{eval $index++;}-->
        <!--{/dbres}-->

        <!--{if $multipage}-->
        <div class="multipage">$multipage</div>
        <!--{/if}-->

        <!--{else}-->
        <div class="messageborder"><span class="msg-ico">暂无点评，<a href="{url review/member/ac/add/type/item_subject/id/$id}">发表您的点评信息</a>！</span></div>
        <!--{/if}-->

<!--{if !$_G[in_ajax]}-->
    </div>

    <!--{if !$review_enable && !$user->isLogin}-->
        <div class="messageborder">
            <span class="msg-ico">想要点评<a href="#top"><span class="font_2">$detail[name].$detail[subname]</span></a>? 请先<a href="{url member/login}"><span class="font_2">登录</span></a>或<a href="{url member/reg}"><span class="font_2">快速注册</span></a></span>
        </div>
    <!--{/if}-->

</div>
<!--{/if}-->

<!--{if $review_enable}-->
<div class="mainrail rail-border-3 subject">
    <div class="rail-h-bg-shop header">
        <h3 class="rail-h-3">发布点评</h3>
    </div>
    <div id="review_post_foo" style="margin-top:10px;"></div>
    <script type="text/javascript">
    <!--
        post_review('item_subject', $detail['sid'],'review_post_foo');
    //-->
    </script>
</div>
<!--{/if}-->