This commit is contained in:
2024-10-29 14:04:59 +08:00
commit 48bf3e6f33
2839 changed files with 762707 additions and 0 deletions

View File

@@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";</script>
</head>
<body>
<!--top-->
<header class="header-PC header-Index">
<div id="header" class="theme-white">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
<?php if ($category['picture']): ?>
<!-- 轮播 s -->
<div class="homeban">
<div class="bd">
<ul>
<li><a href="<?php echo url_rewrite('article', ['id' => $category['id']]); ?>"><img src="<?php echo getImage($category['picture'],951, 459, 6); ?>"/></a></li>
</ul>
</div>
</div>
<!-- 轮播 e -->
<?php endif; ?>
<!-- 新闻列表 s -->
<div class="new">
<div class="swt-Container">
<div class="subject-title">News</p>
</div>
<ul class="newfl">
<?php
//$articles = getDifferentArticle('ishot', 3, ['cid' => 1]);
if (0):foreach ($articles as $detail):
?>
<li>
<div class="xwimg"><a href="__ORICOROOT__<?php echo url_rewrite('articledetail', array('id' => $detail['id'])); ?>"><img src="<?php echo getImage($detail['picture'], 951, 459, 6); ?>"></a></div>
<div class="xwtit"><a href="__ORICOROOT__<?php echo url_rewrite('/articledetail', array('id' => $detail['id'])); ?>"><?php echo $detail['name']; ?></a></div>
<div class="xname"><?php echo $detail['writer']; ?> published <?php echo getHMStime($detail['createtime'], time()); ?>/key words: <?php echo $detail['tags']; ?></div>
<div class="xwcon"><?php echo msubstr($detail['description'], 0, 200); ?></div>
<div class="detail"><a href="__ORICOROOT__<?php echo url_rewrite('articledetail', array('id' => $detail['id'])); ?>"><i></i>Detailed reading</a></div>
<div class="fx">
<a href="#"><i class="f1"></i>Share</a>
<a href="javascript:void(0);" class="addzan" data-id="<?php echo $detail['id']; ?>"><i class="f2"></i>Like(<?php echo $detail['zancount']; ?>)</a>
<a href="__ORICOROOT__<?php echo url_rewrite('articledetail', array('id' => $detail['id'])); ?>#ccount"><i class="f3"></i>Comment
(<?php echo $detail['commentcount']; ?>)</a>
</div>
<div class="clear"></div>
</li>
<?php
endforeach;
endif;
?>
<?php if ($list): foreach ($list as $detail): ?>
<li>
<div style="width:25%; float: left;"> <div class="xwimg"><a href="__ORICOROOT__<?php echo url_rewrite('articledetail', array('id' => $detail['id'])); ?>"><img src="<?php echo getImage($detail['picture'], 951, 459, 6); ?>"></a></div></div>
<div style="width:72%; float: right;">
<div class="xwtit"><a href="__ORICOROOT__<?php echo url_rewrite('articledetail', array('id' => $detail['id'])); ?>"><?php echo $detail['name']; ?></a></div>
<div class="xname"><?php echo $detail['writer']; ?> <?php echo getHMStime($detail['createtime'], time()); ?></div>
<!-- <div class="detail">对于注重便携HiFi听音发烧友来说相信提到“飞傲”这个品牌我想都不会感到陌生飞傲音频在圈子里一直有着不错口碑性能方面拥有绝对的优势。近日飞傲家族中又迎...</div>-->
<div class="fx">
<a href="#"><i class="f1"></i>Share</a>
<a href="javascript:void(0);" class="addzan" data-id="<?php echo $detail['id']; ?>"><i class="f2"></i>Like(<?php echo $detail['zancount']; ?>)</a>
<a href="__ORICOROOT__<?php echo url_rewrite('articledetail', array('id' => $detail['id'])); ?>#ccount"><i class="f3"></i>Comment (<?php echo $detail['commentcount']; ?>)</a>
</div>
</div>
<div class="clear"></div>
</li>
<?php endforeach; ?>
<!-- 分页 s -->
<?php
if ($page) {
echo $page;
}
?>
<!-- 分页 e -->
<?php endif; ?>
</ul>
<script>
$(function() {
$(".newfl .addzan").click(function(event) {
event.preventDefault();
var love = $(this);
var id = love.data("id"); //对应id
if (!love.data("zan")) {
$.ajax({
type: "POST",
dataType: "json",
url: "<?php echo url('__ORICOROOT__/article/zan'); ?>",
data: {id: id},
cache: false, //不缓存此页面
success: function(data) {
//console.log(data);
if (data.code) {
love.data("zan", true);
love.html('<i class="f2"></i>Like(' + data.data + ')');
}
}
});
} else {
alert('You have liked it');
}
return false;
});
});
</script>
<?php
$pingluns = getDifferentPinglun('ishot', 8);
if ($pingluns):
?>
<div class="newrh">
<div class="plun">Wonderful Reviews</div>
<ul class="pllist">
<?php foreach ($pingluns as $pinglun): ?>
<li>
<a href="__ORICOROOT__<?php echo url('/pinglun/lists', ['type' => strtolower($pinglun['typeid']), 'cid' => $pinglun['content_id']]); ?>">
<div class="plfl">
<div class="plimg"><img src="__PUBLIC__/web/uploadfiles/image/ns<?php echo $pinglun['tx']; ?>.jpg"></div>
<div class="peo1"><?php echo $pinglun['cname']; ?></div>
<div class="peo2"><?php echo $pinglun['createtime']; ?></div>
</div>
<div class="plrh">
<div class="plrh1"><?php echo msubstr($pinglun['content'], 0, 200); ?></div>
</div>
<div class="clear"></div>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>
<!-- 新闻列表 e -->
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>

204
app/id/view/article/detail.phtml Executable file
View File

@@ -0,0 +1,204 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head-seo" /}
{include file="include/head-product" /}
<script type="text/javascript">
var navID = "1";
</script>
</head>
<body>
<!--top-->
<header class="header-PC header-Product">
<div id="header" class="theme-black">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
<!-- 新闻详情页 s -->
<div class="xq">
<div class="swt-Container">
<div class="xqtitle banner-other">
<p class="xqtext"><?php echo $detail['name']; ?></p>
<p class="xqname"><?php echo $detail['writer']; ?> Published <?php echo getHMStime($detail['createtime'], time()); ?><!--/ Key Words: <?php echo $detail['tags']; ?>--></p>
</div>
<!-- <div class="fxs">
<span>Share: </span>
<a href="#"><img src="__PUBLIC__/web/images/f1.png"></a>
<a href="#"><img src="__PUBLIC__/web/images/f2.png"></a>
<a href="#"><img src="__PUBLIC__/web/images/f3.png"></a>
<a href="#"><img src="__PUBLIC__/web/images/f4.png"></a>
<a href="#"><img src="__PUBLIC__/web/images/f5.png"></a>
</div>-->
<div class="xqcon">
<?php echo $detail['description']; ?>
</div>
<!-- <div class="xqimg">
<img src="__PUBLIC__/web/uploadfiles/image/xq1.jpg">
</div>-->
<div class="xqcon img-responsive">
<?php echo $detail['content']; ?>
</div>
<?php
$articles = getDifferentArticle('default', 3, ['cid' => $detail['cid'], 'id' => ['neq', $detail['id']]]);
if ($articles):
?>
<!-- 猜您喜欢 -->
<div class="love">
<div class="love1">
<p>Recommendations</p>
<p><img src="__PUBLIC__/web/images/1line.png"></p>
</div>
<ul class="love2">
<?php foreach ($articles as $article): ?>
<li>
<a href="__ORICOROOT__<?php echo url_rewrite('articledetail', array('id' => $article['id'])); ?>">
<div class="lvimg"><img src="<?php echo getImage($article['picture']); ?>"></div>
<p class="lvtit"><?php echo msubstr($article['name'], 0, 1000); ?></p>
</a>
</li>
<?php endforeach; ?>
<div class="clear"></div>
</ul>
</div>
<?php endif; ?>
<!-- 发表评论 -->
<div class="fb">
<div class="love1 img-responsive">
<p>Comments from <span id="ccount"><?php echo $total; ?></span> people</p>
<p><img src="__PUBLIC__/web/images/1line.png"></p>
</div>
<?php if (!empty($list)): ?>
<ul class="fbul" id="listul">
<?php foreach ($list as $k => $comment): ?>
<li>
<div class="fbimg">
<div><img src="__PUBLIC__/web/uploadfiles/image/ns<?php echo $comment['tx']; ?>.jpg"></div>
<div class="peo3"><?php echo $comment['cname']; ?></div>
<div class="peo4"><?php echo $comment['createtime']; ?></div>
</div>
<div class="fbcon" id="c<?php echo $comment['id']; ?>">
<?php
$content = '';
if ($comment['pid']) {
$child = db('Pinglun')->where(['stat' => 0, 'id' => $comment['pid']])->find();
if ($child) {
$content = '<div><div class="ccontent"><label class="clabel"><span class="ctimestamp">' . $child['createtime'] . '</span>&nbsp;<span class="cname">' . $child['cname'] . '</span>发表</label><br />' . $content . $child['content'] . '</div></div>';
}
echo '<div class="cli">' . $content . '</div>', $comment['content'];
} else {
echo $comment['content'];
}
?>
</div>
<div class="fbnum">
<p class="no1">NO.<?php echo $k + 1; ?></p>
<p class="no2"><a href="javascript:void(0);" onclick="answer('<?php echo $comment['id']; ?>')">Reply</a></p>
</div>
<div class="clear"></div>
</li>
<?php endforeach; ?>
</ul>
<a href="__ORICOROOT__<?php echo url('/pinglun/lists', ['type' => strtolower(empty($type) ? 'Article' : $type), 'cid' => $detail['id']]); ?>" class="quanbu"> View all comments (<?php echo $total; ?>)</a>
<?php endif; ?>
</div>
<!-- 回复 -->
<div class="huifu">
<div class="love1 img-responsive">
<p>Reply </p>
<p><img src="__PUBLIC__/web/images/1line.png"></p>
</div>
<div class="login">Please Please comment after <a href="__ORICOROOT__<?php echo url('/login'); ?>" target="_blank">logging in</a>, <a href="__ORICOROOT__<?php echo url('/register'); ?>" target="_blank">register right away </a>if you dont have accounts.<!--<a href="#">QQ</a>account is also OK.</div>-->
<textarea id="ccont"></textarea>
<a href="javascript:void(0);" class="replay" onclick="submit_pl(0);">Post</a>
</div>
</div>
</div>
<!-- 新闻详情页 e -->
<script>
var type = 'Article';
var cid = '<?php echo $detail['id']; ?>';
//点击回复创建回复块
function answer(id) {
if ($('#c' + id).find('.answer_block' + id).html()) {
$('.answer_block' + id).remove()
} else {
var cname = '.answer_block' + id;
var fhHtml = '<div class="answer_block' + id + '"> \n\
<textarea class="hf_input" placeholder="Input reply content"></textarea> \
<div class="csunbmit"><button class="submitBtn" onclick=submit_pl("' + cname + '")>Confirm Reply</button></div>\n\
</div>';
$('#c' + id).append(fhHtml);
$(cname).find('.hf_input').css('width', '99%')
$(cname).find('.hf_input').css('height', '90px')
$(cname).find('.hf_input').css('resize', 'none')
$(cname).find('.hf_input').css('background', '#f6f9fb')
$(cname).find('.hf_input').css('border', '1px solid #ccc')
$(cname).children('.hf_input').focus().val("Reply: ");
}
}
function submit_pl(cname) {
var pid;
var content;
var data = {};
if (cname == 0) {
pid = 0;
content = $('#ccont').val()
if (!content.replace(/^ +| +$/g, '')) {
return false;
}
$('#ccont').val('');
}
else {
pid = cname.split('block')[1];
content = $(cname).children('.hf_input').val();
if (!content.replace('Reply: ', '').replace(/^ +| +$/g, '')) {
return false;
}
$(cname).children('.hf_input').val('');
$(cname).remove();
}
data.pid = pid;
data.content = content;
data.typeid = type;
data.cid = cid;
var options = {
url: "<?php echo url('__ORICOROOT__/pinglun/add'); ?>",
type: "post",
dataType: "json",
data: data,
success: function(data) {
if (data.code) {
alert(data.msg);
} else {
alert(data.msg);
}
},
error: function(xhr, ajaxOptions, thrownError) {
//alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
};
$.ajax(options);
return false;
}
</script>
<style>
.csunbmit{height: 35px;margin-top: 10px;margin-bottom: 5px;}
.submitBtn{width: 75px;height: 30px;line-height: 26px;background-color: #339b53;text-align: center;display: block;
color: #FFFFFF;font-size: 12px;border-radius: 6px;float: left;}
.cli{border-bottom: 1px dashed #ccc;text-align: left;font-size: 12px;/*margin-left: -40px;margin-top:10px;*/ }
.ctimestamp{color: red;}
.ccontent{width: 98%;padding: 10px; background: #f6f9fb;border:1px solid #ccc;margin-bottom: 10px}
/*回复*/
</style>
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>

148
app/id/view/article/lists.phtml Executable file
View File

@@ -0,0 +1,148 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
</head>
<body>
<!--top-->
<header class="header-PC header-Index">
<div id="header" class="theme-white">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
<!-- 轮播 s -->
<div class="homeban banner-other">
<div class="bd">
<ul>
<li><a href="#"><img src="__PUBLIC__/web/uploadfiles/image/ban2.jpg"/></a></li>
</ul>
</div>
</div>
<!-- 轮播 e -->
<!-- 新闻列表 s -->
<div class="new">
<div class="swt-Container">
<div class="vtext">
<p class="tl1">News</p>
<p class="tl2"></p>
</div>
<?php if ($list): ?>
<ul class="newfl">
<?php foreach ($list as $detail): ?>
<li>
<div class="xwtit"><a href="id<?php echo url_rewrite('/articledetail', array('id' => $detail['id'])); ?>"><?php echo $detail['name']; ?></a></div>
<div class="xname"><?php echo $detail['writer']; ?> published <?php echo getHMStime($detail['createtime'], time()); ?>/key words<?php echo $detail['tags']; ?></div>
<div class="xwcon"><?php echo msubstr($detail['description'], 0, 200); ?></div>
<div class="xwimg"><img src="<?php echo getImage($detail['picture'], 951, 459, 6); ?>"></div>
<div class="detail"><a href="id<?php echo url_rewrite('/articledetail', array('id' => $detail['id'])); ?>"><i></i>Detailed reading</a></div>
<div class="fx">
<a href="#"><i class="f1"></i>Share</a>
<a href="#"><i class="f2"></i>Favorite</a>
<a href="#"><i class="f3"></i>Comment (15)</a>
</div>
<div class="clear"></div>
</li>
<?php endforeach; ?>
<!-- 分页 s -->
<?php
if ($page) {
echo $page;
}
?>
<!-- 分页 e -->
</ul>
<?php endif; ?>
<div class="newrh">
<div class="plun">Wonderful Reviews</div>
<ul class="pllist">
<li>
<a href="#">
<div class="plfl">
<div class="plimg"><img src="__PUBLIC__/web/uploadfiles/image/ns1.jpg"></div>
<div class="peo1">Visitor</div>
<div class="peo2">2018-09-05</div>
</div>
<div class="plrh">
<div class="plrh1">ELITE916 of PHANTEKS, JD 7K supports ATX&ITX dual systems . And I remember 916 dual-system needs two power adapters. </div>
<div class="plrh2">REVOLTX power adapter and EVOLVX host. Thats friendly for users needing two systems… </div>
</div>
<div class="clear"></div>
</a>
</li>
<li>
<a href="#">
<div class="plfl">
<div class="plimg"><img src="__PUBLIC__/web/uploadfiles/image/ns2.jpg"></div>
<div class="peo1">Visitor</div>
<div class="peo2">2018-09-05</div>
</div>
<div class="plrh">
<div class="plrh1">ELITE916 of PHANTEKS, JD 7K supports ATX&ITX dual systems . And I remember 916 dual-system needs two power adapters. </div>
<div class="plrh2">REVOLTX power adapter and EVOLVX host. Thats friendly for users needing two systems… </div>
</div>
<div class="clear"></div>
</a>
</li>
<li>
<a href="#">
<div class="plfl">
<div class="plimg"><img src="__PUBLIC__/web/uploadfiles/image/ns3.jpg"></div>
<div class="peo1">Visitor</div>
<div class="peo2">2018-09-05</div>
</div>
<div class="plrh">
<div class="plrh1">ELITE916 of PHANTEKS, JD 7K supports ATX&ITX dual systems . And I remember 916 dual-system needs two power adapters.
</div>
<div class="plrh2">REVOLTX power adapter and EVOLVX host. Thats friendly for users needing two systems… </div>
</div>
<div class="clear"></div>
</a>
</li>
<li>
<a href="#">
<div class="plfl">
<div class="plimg"><img src="__PUBLIC__/web/uploadfiles/image/ns4.jpg"></div>
<div class="peo1">Visitor</div>
<div class="peo2">2018-09-05</div>
</div>
<div class="plrh">
<div class="plrh1">ELITE916 of PHANTEKS, JD 7K supports ATX&ITX dual systems . And I remember 916 dual-system needs two power adapters. </div>
<div class="plrh2">REVOLTX power adapter and EVOLVX host. Thats friendly for users needing two systems… </div>
</div>
<div class="clear"></div>
</a>
</li>
<li>
<a href="#">
<div class="plfl">
<div class="plimg"><img src="__PUBLIC__/web/uploadfiles/image/ns5.jpg"></div>
<div class="peo1">Visitor</div>
<div class="peo2">2018-09-05</div>
</div>
<div class="plrh">
<div class="plrh1">ELITE916 of PHANTEKS, JD 7K supports ATX&ITX dual systems . And I remember 916 dual-system needs two power adapters. </div>
<div class="plrh2">REVOLTX power adapter and EVOLVX host. Thats friendly for users needing two systems… </div>
</div>
<div class="clear"></div>
</a>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
</div>
<!-- 新闻列表 e -->
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>