Files
orico-official-website-old/app/index/view/blog/detail.phtml
2024-10-29 14:04:59 +08:00

214 lines
9.3 KiB
PHTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/weben/css/style2.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/weben/css/theme.css">
<script type="text/javascript" src="__PUBLIC__/web/scripts/jquery-1.8.3.min.js"></script>
<!-- twitter分享 -->
<meta property="twitter:url" content="<?php echo $curUrl;?>"/>
<meta name="twitter:title" content="This is title"/>
<meta name="twitter:description" content="This is desc"/>
<meta name="twitter:site" content="<?php echo $curUrl;?>">
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="http://gg.chendahai.cn/static/image/apple.jpg"/>
<!-- facebook分享 -->
<meta property="og:url" content="<?php echo $curUrl;?>"/>
<meta property="og:title" content="This is my plan,let's play together"/>
<meta property="og:description" content="This is my plan,let's play together"/>
<meta property="og:image" content="http://gg.chendahai.cn/static/image/apple.jpg"/>
<meta property="og:type" content="website"/>
</head>
<style>
.Footer_icon_orico {
position: absolute;
left: 0% !important;
top: 12%;
height: 50px;
margin-top: -25px;
}
</style>
<body>
{include file="include/top-head2023" /}
<!--top-->
<header class="header-PC header-Product">
<div id="header" class="theme-black">
</div>
</header>
<!--top End-->
<!-- 详情页 s -->
<div class="content">
<input type="hidden" value="<?php echo $blog['id'];?>" class="b_id">
<div class="detail_box clearfix">
<div class="blog_detail" style="margin-top:.625rem">
<div class="blog_title">
<h2><?php if($blog['title']) {echo $blog['title'];} else{echo "Best USB-C Docking Station for PC/Laptop/IOS/Windows in 2021";}?></h2>
<p>刊登于<?php if($blog['add_time']) {echo date("M d, Y",strtotime($blog['add_time']));} else{echo "May 17, 2021";}?></p>
</div>
<div class="blog_content">
<?php echo $blog['content'];?>
</div>
</div>
<div class="share_box">
<div class="blog_share">
<h3>分享</h3>
<ul class="share_list clearfix">
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $curUrl;?>&t=<?php echo time();?>"><img src="/frontend/weben/images/blog/share1.png"/></a></li>
<li><a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&ro=true&title=<?php echo $seo_title;?>&url=<?php echo $curUrl;?>&source=&summary=&armin=armin"><img src="/frontend/weben/images/blog/share2.png"/></a></li>
<li><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=<?php echo $curUrl;?>"><img src="/frontend/weben/images/blog/share3.png"/></a></li>
<li><a href="http://www.reddit.com/submit?url=<?php echo $curUrl;?>&title=<?php echo $seo_title;?>" rel="nofollow" title="submit to reddit" target="_blank"><img src="/frontend/weben/images/blog/share4.png"/></a></li>
</ul>
</div>
<div class="repply">
<h3>留言</h3>
<form>
<span>名字</span>
<input class="new_name" type="text" name="name" style="text-indent: 10px;"/>
<span>电邮地址</span>
<input class="new_email" type="email" name="email" style="text-indent: 10px; margin-bottom:0;"/>
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem;">你的电邮地址不会被分享</p>
<span>评论</span>
<textarea class="new_comment" rows="3" style="text-indent: 10px;width: 98%; margin-top: 0.625rem;margin-bottom: 0.625rem;border: 1px solid #DBDBDB !important;" name="comment"></textarea>
<div class="comment_btn" style="color:#ffffff;">发布评论</div>
</form>
</div>
</div>
</div>
<div class="comment">
<h3>请留下评论</h3>
<form class="comment_form clearfix">
<div style="margin-right: 2.5rem;">名字:<br/>
<input class="new_name" type="text" name="name" style="text-indent: 10px;"/>
</div>
<div>电邮地址:<br/>
<input class="new_email" type="email" name="email" style="text-indent: 10px;"/>
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem; font-weight: 400;">你的电邮地址不会被分享</p>
</div>
<div class="comment_area">评论:<br/>
<textarea class="new_comment" style="text-indent: 10px;height: 8.125rem;border: 1px solid #DBDBDB !important;" name="comment"></textarea>
</div>
<div class="comment_btn" style="width: 21.25rem; margin-left: 2.5rem;color:#ffffff;">发布评论</div>
</form>
</div>
<?php if ($list): ?>
<div class="comment_list">
<h3>Showing <?php echo $total;?> Comments</h3>
<ul>
<?php foreach ($list as $ks=> $detail): ?>
<li class="clearfix">
<div><img src="/frontend/weben/images/avatar/<?php echo $counts[$ks];?>.png" /></div>
<div>
<p style=" font-weight: bold;"><?php echo $detail['name'];?><span style="font-size: 0.75rem; color: #A9A9A9; margin-left: 0.625rem;">· <?php echo date("M d, Y", strtotime($detail['add_time'])); ?></span></p>
<p style=" font-weight: 400; margin-top: 0.625rem;"><?php echo $detail['content'];?></p>
</div>
</li>
<?php endforeach; ?>
</ul>
<!-- 分页 s -->
<?php
if ($page) {
echo $page;
}
?>
<!-- 分页 e -->
</div>
<?php endif; ?>
</div>
<script>
$(function(){
//悬浮表单
$(window).scroll(function(){
var s_top = Number($(this).scrollTop()); // 获取滚动条,滚动刻度
var showTop = Number($(".share_box").height());
var pTop = Number($(".comment").offset().top);
if((pTop-s_top-80) >= showTop ){
$(".share_box").removeAttr("style"); // 删除属性,让他释放
}else{
//nsole.log(s_top,showTop,pTop,$(window).scrollTop());
$('.share_box').css("position","absolute"); // 添加属性,让他固定
$('.share_box').css('top',pTop-showTop-20);
}
});
// 提交表单
$('.comment_btn').click(function(){
var new_name = $(this).parents('form').find('.new_name').val();
var new_email = $(this).parents('form').find('.new_email').val();
var new_comment = $(this).parents('form').find('.new_comment').val();
if(new_name=='') {
alert("The Name is Empty!");
return false;
}
if(new_comment=='') {
alert("The Comment is Empty!");
return false;
}
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if(reg.test(new_email) == false) {
alert("The Email format is not correct!");
return false;
}
var bid = "<?php echo $blog['id'];?>";
//点击创建申请块
if(new_name && new_email && new_comment && bid) {
var type = 'Agent';
$.ajax({
type: "POST",
url: "/us/blog/addcomment",
data: {'name':new_name, 'email':new_email,'comment':new_comment,'b_id':bid},
dataType: "json",
success: function(data){
if(data.code == 200) {
alert(data.msg);
$(".content input").val("");
$(".new_comment").val("");
}
else{
alert(data.msg);
}
}
});
}
})
})
</script>
<!-- bottom s -->
{include file="include/bottom2023" /}
<!-- bottom e -->
</body>
</html>