155 lines
7.3 KiB
PHTML
Executable File
155 lines
7.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>
|
||
</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="__ORICOROOT__<?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: "__ORICOROOT__<?php echo url('/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>
|