You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/webht/third_party/outlook/views/space.php

209 lines
8.3 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<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 ($list_count[0]->count); ?></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/space/'.$whc_whm_identify.'/like'); ?>">
<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/space/'.$whc_whm_identify.'/unlike'); ?>">
<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>
<?php if($userinfo->whu_uid==$current_user->whu_uid){ ?>
<div class="panel">
<a name="tag" id="tag"></a>
<div class="panel-body">
<legend>
<span class="text-danger glyphicon glyphicon-leaf" style="font-size:20px;"></span>
<span style="font-size:15px;">个人邮件签名设置!</span>
</legend>
<div class="col-xs-24 nopadding" style="height:70px;background:none;">
<a href="http://share.chtcdn.com/webht.php/apps/outlook/index/index">
<img src="http://share.chtcdn.com/css/images/+valuemail.png">
</a>
<a href="http://share.chtcdn.com/webht.php/apps/outlook/index/usercenter/<?php $usersign=explode('@', $userinfo->whu_email);echo $usersign[0]; ?>/unlike">
<img src="http://share.chtcdn.com/css/images/+unlike.png">
</a>
<a href="http://share.chtcdn.com/webht.php/apps/outlook/index/usercenter/<?php $usersign=explode('@', $userinfo->whu_email);echo $usersign[0]; ?>/like">
<img src="http://share.chtcdn.com/css/images/+like.png">
</a>
</div>
<div class="clearfix">
<p>outlook签名没有更新成功的同学请看这里</p>
<p>拖动鼠标选中上方的三个按钮(在<span class="text-danger">按钮下方</span>鼠标左键三击试试)然后按下Ctrl+C键进行复制到自己的outlook签名里即可。</p><p>温馨提示:不能直接用鼠标右键功能进行复制</p>
</div>
</div>
</div>
<?php } ?>
</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; ?>,欢迎留言......</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 ($comment_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
if($c->whc_type=='comment') {
echo $c->whc_content;
}elseif ($c->whc_type=='like') {
echo '赞+1';
}elseif ($c->whc_type=='unlike') {
echo '踩 (︶︿︶)';
}
?>
</p>
<?php if (!empty($c->whm_subject)) { ?>
<div class="col-xs-23 text-muted" style="border-left:5px solid #ddd;margin:8px 0 15px 3px;">
<p>
@<?php echo $c->whm_fromuser; ?><?php echo $c->whm_subject; ?>
<a href="<?php echo site_url('apps/outlook/index/like/'.$c->whc_whm_identify.'/comment'); ?>"> 查看更多>></a>
</p>
<span class="clearfix"><?php echo date('Y-m-d',$c->whm_createtime); ?></span>
</div>
<?php } ?>
<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>
</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"></span>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var comment_url="<?php echo site_url('apps/outlook/index/space/'.$whc_whm_identify);?>";
$(".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>