<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_headinc.tpl"}-->
<link type="text/css" rel="stylesheet" href="<!--{$skinpath}-->themes/css/user_1-min.css">
<body>
<div id="doc">
<!--{assign var='menuid' value='weibo'}--> 
<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_menu.tpl"}-->
<div></div>
<div id="bd">
  <div id="result" class="clearfix result_box">
    <div id="main-box"> 
      <!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_search2.tpl"}-->
      <div class="main">

		<div class="fbk_l" style="margin-top:10px;"> 
		  <img src="<!--{$skinpath}-->themes/images/send.png" style="margin-left:37px;" />
		  <div class="tex_l">
			<textarea name="content" id="content" onKeyDown="textCounter('content', 'counter', 140);" onKeyUp="textCounter('content', 'counter', 140);"></textarea>
		  </div>
		  <div class="texb_l">还可以输入<span class="zs" id="counter">140</span>个字 <img src="<!--{$skinpath}-->themes/images/gbweibo.gif" id="btn_roll" style="cursor:pointer;" /> </div>
		</div>

	  <!-- 微播内容 -->
	  <div style="padding:10px;margin:5px;">
	    <div class="weibo_left">
		  <a href="<!--{$volist.homeurl}-->"><!--{avatar width='45' height='55' value=$weibo.avatarurl}--></a>
		</div>
		<div class="weibo_right">
		  <div class="weibo_list">
		    <dl>
			  <dd>
				<div class="cmtitle" style="background:#f6f6f1;">
				<span><a class="cmname" href="<!--{$weibo.homeurl}-->" target="_blank"><!--{$weibo.username}--></a></span>
				<span class="cminfo">
				<!--{$weibo.age}-->岁 
				<!--{area type="text" value=$weibo.provinceid}--> <!--{area type="text" value=$weibo.cityid}--> <!--{hook mod='var' type='text' item='education' value=$weibo.education}-->
				</span>
				<span class="cmtime">发表于 <!--{$weibo.addtime|date_format:"%Y-%m-%d %H:%M"}--></span>
				<div style="clear:both;"></div>
				</div>
				<p class="nonetext"><!--{$weibo.content|nl2br}--></p>
				<p class="huifutext">
				&nbsp;&nbsp;&nbsp;
				<a href="###" onclick="jbox_writebox('<!--{$weibo.userid}-->');">(发信件)</a>&nbsp;&nbsp;
				<a href="###" onclick="jbox_hibox('<!--{$weibo.userid}-->');">(打招呼)</a>&nbsp;&nbsp;
				<a href="###" onclick="jbox_send_gift('<!--{$weibo.userid}-->');">(送礼物)</a>&nbsp;&nbsp;
				<a href="#replycontent" class="pinglunBtn">评论(<!--{$weibo.commentcount}-->)</a>
				</p>
			  </dd>
			</dl>
		  </div>
		</div>
		<div style="clear:both;"></div>
	  </div>
      
      <h2 class="box_title"><span>网友评论</span></h2>

	  <div class="pinglun_list">
		<!--{foreach $comment as $volist}-->
		<dl>
		  <dd>
			<div class="cmtitle">
			<span><a class="cmname" href="<!--{$volist.homeurl}-->" target="_blank"><!--{$volist.username}--></a></span>
			<span class="cminfo"><!--{$volist.age}--> 岁  <!--{area type="text" value=$volist.provinceid}--> <!--{area type="text" value=$volist.cityid}--> <!--{hook mod='var' type='text' item='education' value=$volist.education}-->
			</span>
			<span class="cmtime">评论于：<!--{$volist.cmtime|date_format:"%m-%d %H:%M"}--></span>
			<div style="clear:both;"></div>
			</div>
			<p class="nonepage"><!--{$volist.cmcontent|nl2br}--> </p>
		  </dd>
		</dl>
		<!--{/foreach}-->
	  </div>
	  <!--{if !empty($showpage)}-->
	  <div class="pagecode"><!--{$showpage}--></div>
	  <div style="clear:both;"></div>
	  <!--{/if}-->


      <div class="wljd">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="2">
			<!--{if $login.status==1}-->
			欢迎您：<!--{$login.username}-->&nbsp;&nbsp;&nbsp;<!--{$login.info.age}-->岁
			<!--{else}-->
			只有登录会员才可以进行评论! <a href="###" onclick="jbox_loginbox();">登录</a> 或者 <a href="<!--{$appfile}-->?c=passport&a=reg">免费注册</a>
			<!--{/if}-->
			</td>
          </tr>
          <tr>
            <td colspan="2">
			<input type='hidden' name='id' id='id' value="<!--{$id}-->" />
			<textarea id="replycontent" name="replycontent" style="width:75%;height:80px;font-size:12px;" class="wbText"></textarea>
			</td>
          </tr>
		  <!--{if $login.status==1 && $config.commentcode == '1'}-->
          <tr>
            <td>验证码：</td>
            <td>
			<input type="text" id="checkcode" name="checkcode" class="w2"  maxlength='6' /> <img id="checkCodeImg" src="<!--{$urlpath}-->source/include/imagecode.php?act=verifycode" align="middle" /> <a href="javascript:refresh_code('checkCodeImg');"> 换一张</a>
			</td>
          </tr>
		  <!--{/if}-->
		  <!--{if $login.status==1}-->
		  <tr>
		    <td width="10%"></td>
			<td><input type="button" class="btn2" value="提交评论" name='btn_pinglun' id='btn_pinglun' /></td>
		  </tr>
		  <!--{/if}-->
        </table>
      </div>

      </div>
    </div>
    <div class="side">
      <div class="profile bg">
        <div class="avatar"><a><span class="skin_portrait_round"></span><!--{$weibo.useravatar}--></a></div>
        <div class="bd">
          <div class="name"><span title="<!--{$weibo.username}-->"><span><!--{$weibo.username}--></span></span></div>
          <div class="feed_num"><a href="<!--{$urlpath}-->index.php?c=weibo&a=list&type=user&uid=<!--{$weibo.userid}-->"><!--{$weibo.weibocount}--></a>条微播</div>
          <div class="feed_num"><a href="###" onClick="jbox_hibox('<!--{$weibo.userid}-->');">打招呼</a></div>
          <div class="feed_num"><a href="###" onClick="jbox_writebox('<!--{$weibo.userid}-->');">写信件</a></div>
          <div class="feed_num"><a href="###" onClick="jbox_send_gift('<!--{$weibo.userid}-->');">赠送礼物</a></div>
          <div class="feed_num"><a href="<!--{$weibo.homeurl}-->" target="_blank">查看资料</a></div>
        </div>
        <div class="box_shadow"></div>
      </div>
      <!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_weibo.tpl"}--> </div>
  </div>
  <!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_footer.tpl"}--> </div>
</body>
</html>
<script type='text/javascript'>
//发微播
$(function(){
	$('#btn_roll').click(function(){
		var content = $.trim($('#content').val());
		if (content == '') {
			alert('微播内容不能为空！');
			$('#content').focus();
			return false;
		}
		else {
			if (content.length > 140) {
				alert('微播内容不能大于140个字！');
				$('#content').focus();
				return false;
			}
		}
		roll_weibo(content);
	});

});
//评论
$(function(){
	$('#btn_pinglun').click(function(){
		var wbid = $('#id').val();
		var content = $.trim($('#replycontent').val());
		if (wbid == '') {
			alert("ID丢失");
			return false;
		}
		if (content == '') {
			alert('评论内容不能为空！');
			$('#replycontent').focus();
			return false;
		}
		else {
			if (content.length > 140) {
				alert('评论内容不能大于140个字！');
				$('#replycontent').focus();
				return false;
			}
		}
		roll_weibocomment(wbid, 0, content);
	});

});
</script>