|
|
|
|
<div class="container" style="max-width:1200px;">
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-7 col-xs-24 pull-right" style="font: 14px 'Arial','Microsoft YaHei';line-height:25px;">
|
|
|
|
|
<div class="panel" style="margin-top:15px;">
|
|
|
|
|
<div class="panel-body nopadding">
|
|
|
|
|
<p><img style="width:100%;height:125px;" src="/css/webht/images/usercenter.jpg"></p>
|
|
|
|
|
<p><h4 class="text-center strong"><?php echo $userinfo->whu_uname; ?></h4></p>
|
|
|
|
|
<p>
|
|
|
|
|
<div class="col-xs-8 text-center text-muted" style="border-right:1px solid #ddd;">
|
|
|
|
|
<a href="javascript:void(0);">
|
|
|
|
|
<strong><?php echo count($list); ?></strong><br>
|
|
|
|
|
<span>评论</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-8 text-center text-muted" style="border-right:1px solid #ddd;">
|
|
|
|
|
<a href="<?php echo site_url('apps/outlook/index/infocenter/'.$user_sn.'/like'.'/'.$whc_whm_identify); ?>">
|
|
|
|
|
<strong><?php echo count($like_list); ?></strong><br>
|
|
|
|
|
<span>赞</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-8 text-center text-muted">
|
|
|
|
|
<a href="<?php echo site_url('apps/outlook/index/infocenter/'.$user_sn.'/unlike'.'/'.$whc_whm_identify); ?>">
|
|
|
|
|
<strong><?php echo count($unlike_list); ?></strong><br>
|
|
|
|
|
<span>板砖</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</p>
|
|
|
|
|
<div class="col-xs-24 btn-sm"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<legend>
|
|
|
|
|
<span class="text-primary glyphicon glyphicon-thumbs-up" style="font-size:20px;"></span>
|
|
|
|
|
<span style="font-size:15px;">他们都觉得很赞!</span>
|
|
|
|
|
</legend>
|
|
|
|
|
|
|
|
|
|
<?php foreach ($like_list as $l) { ?>
|
|
|
|
|
<span><?php echo $l->whu_uname; ?>; </span>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<legend>
|
|
|
|
|
<span class="text-danger glyphicon glyphicon-thumbs-down" style="font-size:20px;"></span>
|
|
|
|
|
<span style="font-size:15px;">他们拍砖了!</span>
|
|
|
|
|
</legend>
|
|
|
|
|
<?php foreach ($unlike_list as $ul) { ?>
|
|
|
|
|
<span><?php echo $ul->whu_uname; ?>; </span>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-17 col-xs-24">
|
|
|
|
|
<a name="gotocomment" id="gotocomment" ></a>
|
|
|
|
|
<form id="from-add-comment" method="post" action="<?php echo site_url('apps/outlook/index/add_comment');?>" style="background:#fff;padding:0 15px 15px 15px;margin-top:15px;">
|
|
|
|
|
<div class="col-xs-24 btn-lg"></div>
|
|
|
|
|
<p class="col-xs-24 nopadding"><em class="text-primary strong"><?php echo $userinfo->whu_uname; ?>:<?php echo $mail_text->whm_subject; ?>...</em></p>
|
|
|
|
|
<div class="col-xs-24 nopadding">
|
|
|
|
|
<textarea class="form-control" rows="3" name="comment" id="comment-textarea"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-xs-24 btn-sm"></div>
|
|
|
|
|
<div class="col-xs-24 nopadding">
|
|
|
|
|
<input type="hidden" name="whc_whm_identify" value="<?php echo $whc_whm_identify;?>">
|
|
|
|
|
<button type="button" id="btn-add-comment" class="btn btn-danger pull-right">评 论</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</form>
|
|
|
|
|
<div class="col-xs-24 nopadding" style="margin-top:20px;margin-bottom:50px;font: 14px 'Arial','Microsoft YaHei';line-height:23px;">
|
|
|
|
|
<?php foreach ($list as $key => $c) { ?>
|
|
|
|
|
<div class="col-xs-24" style="border-bottom:1px solid #ededed;padding:15px 20px;background:#fff;">
|
|
|
|
|
<p class="text-primary"><a href="<?php $usermail=explode('@', $c->whu_email);echo site_url('apps/outlook/index/space/'.$usermail[0]); ?>"><?php echo $c->whu_uname; ?></a>:</p>
|
|
|
|
|
<p><?php echo $c->whc_content; ?></p>
|
|
|
|
|
<p>
|
|
|
|
|
<span class="text-muted"><?php echo date('Y-m-d H:i:s',$c->whc_createtime); ?></span>
|
|
|
|
|
<span class="pull-right"><a href="#gotocomment" class="re_comment" data-uname="<?php echo $c->whu_uname; ?>">回复</a></span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="media">
|
|
|
|
|
<div class="media-left">
|
|
|
|
|
<div>
|
|
|
|
|
<span id="msgclass" class="glyphicon glyphicon-ok text-success" aria-hidden="true" style="font-size:85px;"> </span>
|
|
|
|
|
<a class="btn btn-sm btn-danger" onclick="ajax_link($(this));" href="javascript:void(0);" data-href="<?php echo site_url('apps/outlook/index/delete_comment/'.$whc_whm_identify.'/'.$type); ?>">撤销操作</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="media-body" style="font-size:32px;">
|
|
|
|
|
<div class="col-xs-24 btn-lg"><p></p></div>
|
|
|
|
|
<span id="msgbox" class="text-success">你已经成功的狠狠<?php if($type=='like'){echo '赞';}else{echo '踩';} ?>了TA一下!</span>
|
|
|
|
|
<p style="font-size:14px;color:#888;padding-left:5px;padding-top:18px;"><em class="text-danger" id="seconed_box">15</em> 秒钟内可以撤销刚才的操作</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
var type="<?php echo $type;?>";
|
|
|
|
|
var comment_url="<?php echo site_url('apps/outlook/index/infocenter/'.$user_sn.'/comment/'.$whc_whm_identify);?>";
|
|
|
|
|
if (type=='like' || type=='unlike') {
|
|
|
|
|
$('#myModal').modal('show');
|
|
|
|
|
var timer=$("#seconed_box").text();
|
|
|
|
|
if (timer>=0) {
|
|
|
|
|
setInterval(function(){
|
|
|
|
|
var newtimer=--timer;
|
|
|
|
|
$("#seconed_box").text(newtimer);
|
|
|
|
|
},1000);
|
|
|
|
|
};
|
|
|
|
|
setTimeout("$('#myModal').modal('hide');location.href=comment_url;",15000);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$(".re_comment").click(function () {
|
|
|
|
|
$("textarea").text('@'+$(this).attr('data-uname')+' ');
|
|
|
|
|
$("textarea").focus();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#btn-add-comment").click(function() {
|
|
|
|
|
if ($("#comment-textarea").val().replace(/(^\s*)|(\s*$)/g,'')=="") {
|
|
|
|
|
$("#msgclass").removeClass('glyphicon-ok text-success');
|
|
|
|
|
$("#msgclass").addClass('glyphicon-remove text-danger');
|
|
|
|
|
$("#msgbox").removeClass('text-success');
|
|
|
|
|
$("#msgbox").addClass('text-danger');
|
|
|
|
|
$("#msgbox").text('评论内容不能为空!');
|
|
|
|
|
$('#myModal').modal('show');
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
$('#myModal').modal('hide');
|
|
|
|
|
},5000);
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
var url = $("form#from-add-comment").attr('action');
|
|
|
|
|
var data= $("form#from-add-comment").serialize();
|
|
|
|
|
$.post(url,data,function(result){
|
|
|
|
|
if (result) {
|
|
|
|
|
$("#msgclass").removeClass('glyphicon-remove text-danger');
|
|
|
|
|
$("#msgclass").addClass('glyphicon-ok text-success');
|
|
|
|
|
$("#msgbox").removeClass('text-danger');
|
|
|
|
|
$("#msgbox").addClass('text-success');
|
|
|
|
|
$("#msgbox").text('评论成功!');
|
|
|
|
|
$('#myModal').modal('show');
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
$('#myModal').modal('hide');
|
|
|
|
|
location.href=comment_url;
|
|
|
|
|
},1500);
|
|
|
|
|
}else{
|
|
|
|
|
$("#msgclass").removeClass('glyphicon-ok text-success');
|
|
|
|
|
$("#msgclass").addClass('glyphicon-remove text-danger');
|
|
|
|
|
$("#msgbox").removeClass('text-success');
|
|
|
|
|
$("#msgbox").addClass('text-danger');
|
|
|
|
|
$("#msgbox").text('评论发布失败!');
|
|
|
|
|
$('#myModal').modal('show');
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
$('#myModal').modal('hide');
|
|
|
|
|
},5000);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|