<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_headinc.tpl"}-->
<body>
<!--{assign var='menuid' value='weibo'}-->
<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_menu.tpl"}-->
<div id="page-index" class="page">
  <div class="ce member">
    <!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_search.tpl"}-->

    <div class="container app_mood" id="ICFeedsContainer">
      <div class="main_wrap bg3">
        <div class="main bg bor3">

          <div class="bo3 comments">
            <ul>
		    <div class="fbk_l">
		      <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>

              <li>
                <div class="lou"> 
				  <a href="<!--{$volist.homeurl}-->" target="_blank" class="head" title="查看资料"><!--{avatar width='50' height='61' value=$weibo.avatarurl}--> </a>
                  <div class="weinei1"> 
				  <span class="you"><a href="<!--{$urlpath}-->index.php?c=weibo&a=list&type=user&uid=<!--{$weibo.userid}-->" title="查看TA的微播"><b><!--{$weibo.username}--></b></a>：</span>
				  <!--{$weibo.content|nl2br}-->
				  </div>
                  <div style="clear:both"></div>
                  <div class="huifu">

				  <font color="#999999"><!--{$weibo.addtime|date_format:"%m-%d %H:%M"}--></font>&nbsp;
				  <a href="###" onclick="jbox_hibox('<!--{$weibo.userid}-->');">打招呼</a> 
				  <a href="###" onclick="jbox_writebox('<!--{$weibo.userid}-->');">写信件</a> 
				  <a href="###" onclick="jbox_send_gift('<!--{$weibo.userid}-->');">送礼物</a> 
				  <a href="<!--{$weibo.homeurl}-->" target="_blank">看资料</a> 
				  <a href="###" onclick="commentdiv('<!--{$weibo.wbid}-->');comment_focus('<!--{$weibo.wbid}-->', '0', '');">评论</a> (<!--{$weibo.commentcount}-->)

				  </div>
                </div>
                <div style="clear:both"></div>
				<!--{if !empty($comment)}-->
                <div class="allhui">
				  
				  <!--{foreach $comment as $val}-->
                  <div class="bc"> 
				    
					<a href="<!--{$val.homeurl}-->" class="user" target="_blank" title="查看资料"><!--{avatar width='50' height='61' value=$val.avatarurl}--></a>
                    <div class="weinei2"> 
					  <span class="you"><a href="<!--{$urlpath}-->index.php?c=weibo&a=list&type=user&uid=<!--{$val.cmuserid}-->" title="查看TA的微播"><b><!--{$val.username}--></b></a>：</span>
					  <!--{$val.cmcontent|nl2br}-->	  
					</div>
					<div class="parent_huifu"><font color="#999999">(<!--{$val.cmtime|date_format:"%m-%d %H:%M"}-->)</font> <a href="javascript:void(0);" onclick="opencommentdiv('<!--{$weibo.wbid}-->');comment_focus('<!--{$weibo.wbid}-->', '<!--{$val.cmid}-->', '<!--{$val.username}-->');">回复</a></div>
					
					<!--{foreach $val.childcomment as $child}-->
                    <div class="bb"> 
					  <a href="<!--{$child.homeurl}-->" target="_blank" class="user" title="查看资料"><!--{avatar width='50' height='61' value=$child.avatarurl}--></a>
                      <div class="weinei3"> 
					    <span class="you"><a href="<!--{$urlpath}-->index.php?c=weibo&a=list&type=user&uid=<!--{$child.cmuserid}-->" title="查看TA的微播"><b><!--{$child.username}--></b></a>：</span>
						<!--{$child.cmcontent|nl2br}-->
					  </div>
					  <div class="child_huifu"><font color="#999999">(<!--{$val.cmtime|date_format:"%m-%d %H:%M"}-->)</font> <a href="javascript:void(0);" onclick="opencommentdiv('<!--{$weibo.wbid}-->');comment_focus('<!--{$weibo.wbid}-->', '<!--{$child.cmid}-->', '<!--{$child.username}-->');">回复</a></div>
                      <div style="clear:both"></div>
                    </div>
					<!--{/foreach}-->
                    <div style="clear:both"></div>
                  </div>

				  <!--{/foreach}-->
                  <div style="clear:both"></div>

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

                <div id="comdiv_<!--{$weibo.wbid}-->" style="display:none;" class="pin">
				  <input type="hidden" name="comid_<!--{$weibo.wbid}-->" id="comid_<!--{$weibo.wbid}-->" value='' />
				  <table width="600px" border="0" cellspacing="5" cellpadding="5" style="line-height:25px;">
				    <tr>
					  <td id='reply_uid_<!--{$weibo.wbid}-->' align="right;" width='100px;'></td>
					  <td width='400px;'><textarea name="comment_<!--{$weibo.wbid}-->" id="comment_<!--{$weibo.wbid}-->" style="width:95%;height:30px;overflow:hidden;"></textarea></td>
					  <td>
					  <a href='###' class="btn_c2" id='btn_comment_<!--{$weibo.wbid}-->' onclick="comment('<!--{$weibo.wbid}-->');"><span>提交评论</span></a>							  
					  </td>
					</tr>
				  </table>
                </div>
                <div style="clear:both"></div>

              </li>


			  <!--{if !empty($showpage)}-->
              <div class="page1">
                <div class="pagecode"><!--{$showpage}--></div>
                <div style="clear:both;"></div>
              </div>
			  <!--{/if}-->

              <div style="clear:both"></div>
            </ul>
          </div>
        </div>
      </div>
      <div class="sidebar author_display lite_hide">
		

        <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="javascript:void(0);" onclick="jbox_hibox('<!--{$weibo.userid}-->');">打招呼</a></div>
            <div class="feed_num"><a href="javascript:void(0);" onclick="jbox_writebox('<!--{$weibo.userid}-->');">写信件</a></div>
			<div class="feed_num"><a href="javascript:void(0);" 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>


        <!--二级导航 开始-->
        <div class="sub_menu bbor3">
          <ul>
            <li class="nav_home"> <a href="<!--{$urlpath}-->index.php?c=weibo&a=list"><i></i>微播广场</a> </li>
            <li class="nav_my current"> <a href="<!--{$urlpath}-->index.php?c=weibo&a=list&type=user&uid=<!--{$weibo.userid}-->"><i></i><!--{$weibo.username}-->的微播</a> </li>

			<!--{if $login.status == 1}-->
			<li class="nav_weibo"> <a href="<!--{$urlpath}-->index.php?c=weibo&a=list&type=listen"><i></i>我的关注</a> </li>
            <li class="nav_hot"> <a href="<!--{$urlpath}-->index.php?c=weibo&a=list&type=my"><i></i>我的微播</a> </li>
			<!--{/if}-->
          </ul>
        </div>

        <div class="or3">
          <div><b>最新日记</b></div>
          <ul>
		    <!--{assign var='newdiary' value=vo_list("mod={diary} num={10}")}-->
			<!--{foreach $newdiary as $volist}-->
            <li class="nav_my"> <a href="<!--{$volist.url}-->" class="c_tx" target="_blank" title="<!--{$volist.title}-->"> ◈ <!--{$volist.title|filterhtml:15}--></a> </li>
			<!--{/foreach}-->
          </ul>
        </div>

      </div>
    </div>
    <div style="clear:both;"></div>
  </div>
  <div style="clear:both;"></div>
</div>
<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_footer.tpl"}-->
</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 commentdiv(id) {
	var obj = document.getElementById('comdiv_'+id);
	if (obj.style.display == 'none') {
		obj.style.display = 'block'
	} 
	else {
		obj.style.display = 'none';
	}
}
//打开评论窗口
function opencommentdiv(id) {
	var obj = document.getElementById('comdiv_'+id);
	obj.style.display = 'block';
}

/* 评论定位 */
function comment_focus(wbid, comid, touser) {
	$('#comment_'+wbid).focus();
	if (touser != '') {
		$('#reply_uid_'+wbid).html('@'+touser+'：');
	}
	else {
		$('#reply_uid_'+wbid).html('');
	}
	if (comid > 0) {
		$('#comid_'+wbid).val(comid);
	}
	else {
		$('#comid_'+wbid).val('');
	}
}
/* 评论 */
function comment(wbid) {
	var comid = $('#comid_'+wbid).val();
	var content = $.trim($('#comment_'+wbid).val());
	if (content == '') {
		alert('评论内容不能为空！');
		$('#comment_'+wbid).focus();
		return false;
	}
	else {
		if (content.length > 140) {
			alert('评论内容不能大于140个字！');
			$('#comment_'+wbid).focus();
			return false;
		}
	}
	roll_weibocomment(wbid, comid, content);
}


</script>