{:tpl head}
<div id="main">
 <div class="main_l">
  <div class="content mb_10 bdr_1">
   <h2 id="position">
    <a href="{:ROOT_URL}">首页</a>
    <!--{:loop Tag::position($catid) $v}--><a href="{:$v['url']}">{:$v['name']}</a><!--{:/loop}-->
   </h2>
   <div class="content_head">
    <h1 style="{:if $color}color:{:$color}{:/if}">{:$title}</h1>
    <div>{:Tag::date($updatetime, 3)}<!--{:if $author}--> 作者：{:$author}<!--{:/if}--> 责任编辑：{:$username}<!--{:if $copyfrom}--> 来源：{:$copyfrom}<!--{:/if}--> 评论：<span id="comments"></span> 浏览：<span id="hits"></span> [字体：<a href="javascript:ContentSize(16)">大</a> <a href="javascript:ContentSize(14)">中</a> <a href="javascript:ContentSize(12)">小</a>]</div>
   </div>
   <!--{:if $description}-->
   <h3 class="description">{:$description}</h3>
   <!--{:/if}-->
   <div id="endtext">{:$content}</div>
   <!--{:if $keywords}-->
   <div class="keyword"><strong>关键词：</strong>{:Tag::tags($keywords, 'product')}</div>
   <!--{:/if}-->
   <!--{:if $pages}-->
   <div class="pages">{:$pages}</div>
   <!--{:/if}-->
   <h3 class="tool mb_10">上一篇：{:Tag::near($id, $catid, 'back', 42)}&nbsp;&nbsp;&nbsp;下一篇：{:Tag::near($id, $catid, 'next', 42)}</h3>
   <h4 class="tool">相关产品</h4>
   <ul class="text_list">
    <!--{:loop Tag::listOne("model=product, type=like, num=10, outid=$id, keyword=$keywords") $v}-->
    <li><a href="{:$v['url']}" title="{:$v['title']}"{:$v['color']}>{:$v['title']}</a></li>
    <!--{:/loop}-->
   </ul>
   <div class="toolbar">
    <a href="javascript:copyToClipBoard()">[推荐]</a>
    <a href="javascript:myAddPanel()">[收藏]</a>
    <a href="javascript:window.print();">[打印]</a>
    <a href="javascript:window.close();">[关闭]</a>
    <a href="#top">[返回顶部]</a>
   </div>
  </div>
  <!--{:if C('iscomment', 0, 'product') && !$uncmt}-->
  <div class="comment bdr_1">
   <h4><a href="" class="totle" id="comment_totle">共有评论 <span></span> 条</a>网友热评</h4>
   <div id="comment_list">
    暂时还没有人评论，抢个沙发吧！
   </div>
   <h4>我要评论</h4>
   <div id="comment_login">
    <span id="app_login_1">您好，请<a href="javascript:;" onclick="login()">登录</a>或<a href="{:Url::getUrl('member', 'reg')}">注册</a></span>
	<span id="app_login_2">您好，{username} | <a href="{:Url::getUrl('member', 'logout')}">退出</a></span>
   </div>
   <ul class="post">
    <li><textarea cols="122" rows="8" id="comment_content"></textarea></li>
    <li><input id="comment_submit" class="button" type="submit" value="发表评论" /></li>
   </ul>
  </div>
  <script type="text/javascript">
	$(function(){
		$.post(site_url + 'index.php?c=comment&a=get_list&m=product', 'id={:$id}', function(data){
			$('#comments').text(data[0]);
			$('#comment_totle').find('span').text(data[0]);
			if (data[0]) {
				$('#comment_list').html(data[1]);			
			}
		}, 'json');
		$('#comment_submit').click(function(){
			if ($.cookie('mb_159f32d4e0a8c7_username') == null) {
				login('请您登录后再次提交');
				return false;
			}
			var content = $('#comment_content').val(), len = content.length;
			if (len < 5 || len > 500) {
				$.jxbox.tip('评论字数限制为5-500，当前' + len, 2);
				return false;
			}
			$.post(site_url + 'index.php?c=comment&a=add', 'info[content]='+content+'&info[id]={:$id}&info[module]=product', function(data){
				if(data[0] == 1){
					$.jxbox.tip('感谢您发表评论，您发表的评论将在管理员审核后发布', 1);
					$('#comment_content').val('');
				} else {
					$.jxbox.tip(data[1], 2);
				}
			}, 'json');
		});
	});
  </script>
  <!--{:/if}-->
 </div>
 <div class="main_r">
  <div class="bdr_1 mb_10">
   <h5>最新产品</h5>
   <ul class="text_list">
    <!--{:loop Tag::listOne("catid=$catid, num=15") $v}-->
    <li><a href="{:$v['url']}" title="{:$v['title']}"{:$v['color']}>{:Tag::cut($v['title'],38,0)}</a></li>
    <!--{:/loop}-->
   </ul>
  </div>
  <div class="bdr_1 mb_10">
   <h5>热点产品</h5>
   <ul class="text_list">
    <!--{:loop Tag::listOne("catid=$catid, num=15, type=hot") $v}-->
    <li><a href="{:$v['url']}" title="{:$v['title']}"{:$v['color']}>{:Tag::cut($v['title'],38,0)}</a></li>
    <!--{:/loop}-->
   </ul>
  </div>
 </div>
</div>
<script type="text/javascript">
$(function(){
	$.get(site_url + 'index.php?c=product&a=hits&id={:$id}&'+Math.random(), function(data){
  		$('#hits').text(data);
	});
});
</script>
{:tpl foot}