<!--{eval
    $_HEAD['title'] = $subject[name] . '的交流区——话题：' . $topic[subject];
}-->
{template modoer_header}
<script type="text/javascript" src="{URLROOT}/static/javascript/item.js"></script>
<script type="text/javascript" src="{URLROOT}/static/dialog/lhgdialog.min.js"></script>
<div id="body">
    <div class="link_path">
        <em>
            <!--{loop $links $i $link}-->
            {if $i} | {/if}<a href="$link[url]"{if $link[flag]=='discussion'} style="color:#ff6600;"{/if}>$link[title]</a>
            <!--{/loop}-->
        </em>
        <a href="{url modoer/index}">{lang global_index}</a>&raquo;&nbsp;{print implode('&nbsp;&raquo;&nbsp;', $urlpath)}</span>
    </div>

    <div class="discussion_left">
        <div class="mainrail rail-border-3">
            <div class="topic_detail">
                <h1>$topic[subject]</h1>
                <div class="discussion_detail">
                    <div class="face"><a href="{url space/index/uid/$topic[uid]}" target="_blank"><img src="{print get_face($topic[uid])}" /></a></div>
                    <div class="content">
                        <div class="user">
                            <!--{if $user->uid==$topic[uid]}-->
                            <em>
                                <a href="javascript:discussion_topic_edit($topic[tpid]);">编辑</a>
                                <a href="javascript:discussion_topic_delete($topic[tpid]);">删除</a>
                            </em>
                            <!--{/if}-->
                            <span>{date $topic[dateline]}</span> <a href="{url space/index/uid/$topic[uid]}" target="_blank">$topic[username]</a>
                        </div>
                        <p id="topic_$topic[tpid]">{print msubb::pares($topic[content], $topic)}</p>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <div class="reply_detail">
                <h3>回复</h3>
                <ul class="replylist">
                <!--{dbres $list $val}-->
                    <li class="discussion_detail">
                        <div class="face"><a href="{url space/index/uid/$val[uid]}" target="_blank"><img src="{print get_face($val[uid])}" /></a></div>
                        <div class="content">
                            <div class="user">
                                <em>
                                    <!--{if $user->uid==$val[uid]}-->
                                    <a href="javascript:discussion_reply_edit($val[rpid]);">编辑</a>
                                    <a href="javascript:discussion_reply_delete($val[rpid]);">删除</a>
                                    <!--{elseif $user->uid!=$val[uid]}-->
                                    <a href="javascript:discussion_reply_at('reply_content','$val[username]');">回复</a>
                                    <!--{/if}-->
                                </em>
                                <span>{date $val[dateline]}</span> <a href="{url space/index/uid/$val[uid]}" target="_blank">$val[username]</a>
                            </div>
                            <p id="reply_$val[rpid]">{print msubb::pares($val[content])}</p>
                        </div>
                    </li>
                <!--{/dbres}-->
                <!--{if !$list}-->
                <li>暂无回复</li>
                <!--{/if}-->
                </ul>
                <div class="clear"></div>
            </div>
        </div>

        <!--{if $topic[status]}-->
        <div class="mainrail rail-border-3">
            <h3 class="rail-h-3 rail-h-bg-3">回复</h3>
            <div class="discussion_post" style="margin-top:10px;">
                <script type="text/javascript" src="{URLROOT}/static/javascript/validator.js"></script>
                <form action="{url discussion/member/ac/reply/op/post}" method="post" name="myform" onsubmit="return validator(this);">
                    <input type="hidden" name="tpid" value="$tpid">
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="500"><textarea name="content" id="reply_content" validator="{'empty':'N','errmsg':'请填写回复内容'}"{if !$user->isLogin} onfocus="dialog_login();"{elseif $MOD[reply_seccode]}onfocus="show_seccode();"{/if}></textarea></td>
                            <td width="*" valign="top">
                                <div class="smilies">
                                    <!--{loop $smilies $value}-->
                                    <img src="{URLROOT}/static/images/smilies/{$value}.gif" width="20" height="20" onclick="insert_smilies('reply_content','$value');" />
                                    <!--{/loop}-->
                                </div>
                            </td>
                        </tr>
                        <!--{if $MOD[reply_seccode] && $user->isLogin}-->
                        <tr>
                            <td><div id="seccode" class="none" style="float:left;width:80px;position:relative;top:-3px;"></div>
                                <input type="text" name="seccode" class="t_input" style="width:118px;" onblur="check_seccode(this.value);" onfocus="show_seccode();" validator="{'empty':'N','errmsg':'请输入注册验证码'}" />
                                <span id="msg_seccode" class="formmessage none"></span>
                            </td>
                        </tr>
                        <!--{/if}-->
                        <!--{if $user->isLogin}-->
                        <tr>
                            <td colspan="2"><button type="submit" name="dosubmit">加上去</button></td>
                        </tr>
                        <!--{/if}-->
                    </table>
                </form>
            </div>
        </div>
        <!--{/if}-->
    </div>

    <div class="discussion_right">
        <div class="mainrail rail-border-3">
            <h1 class="rail-h-3 rail-h-bg-3">{$model[item_name]}信息</h1>
            <div class="side_subject">
                <h2><a href="{url item/detail/id/$sid}" src="$subject[thumb]" onmouseover="tip_start(this,1);">$subject[name]&nbsp;$subject[subname]</a></h2>
                <!--{eval $reviewcfg = $_G['loader']->variable('config','review');}-->
                <p class="start start{print get_star($subject[avgsort],$reviewcfg[scoretype]);}"></p>
                <table class="side_subject_field_list" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td colspan="2"><span class="font_2">$subject[reviews]</span>点评,
                        <span class="font_2">$subject[guestbooks]</span>留言,
                        <span class="font_2">$subject[pageviews]</span>浏览</td>
                    </tr>
                    $subject_field_table_tr
                </table>
                <a class="abtn1" href="{url review/member/ac/add/type/item_subject/id/$sid}"><span>我要点评</span></a>
                <a class="abtn2" href="javascript:add_favorite($sid);"><span>关注</span></a>
                <a class="abtn2" href="{url item/detail/id/$sid/view/guestbook}#guestbook"><span>留言</span></a>
                <div class="clear"></div>
            </div>
        </div>
        <div class="mainrail rail-border-3">
            <h2 class="rail-h-3 rail-h-bg-3">热门话题</h2>
            <ul class="rail-list">
                <!--{get:modoer val=table(table/dbpre_discussion_topic/where/sid=$topic[sid] And status=1/orderby/replies DESC/rows/10)}-->
                <li><cite>{$val[replies]}回复</cite><a title="$val[subject]" href="{url discussion/topic/id/$val[tpid]}">{sublen $val[subject],14}</a></li>
                <!--{getempty(val)}-->
                <li>暂无信息</li>
                <!--{/get}-->
            </ul>
            <div class="clear"></div>
        </div>
    </div>

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

</div>
<!--{eval footer();}-->