192 lines
8.5 KiB
PHTML
Executable File
192 lines
8.5 KiB
PHTML
Executable File
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>News-ORICO Global Site</title>
|
||
{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><img src="<?php echo getImage($category['picture']); ?>"/></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<!-- 轮播 e -->
|
||
<div class="swt-Container">
|
||
<div class="news-vertu">
|
||
<div class="tab">
|
||
<?php if (!empty($cate_list)): ?>
|
||
<?php foreach ($cate_list as $key => $value): ?>
|
||
<a href="/us/article/category/<?php echo $value['id'] ?>.html" class="<?php if ($category['id'] == $value['id']): ?> on <?php endif; ?>"><?php echo $value['name']; ?><span></span></a>
|
||
<?php endforeach; ?>
|
||
<?php endif; ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<!-- 轮播 e -->
|
||
<?php endif; ?>
|
||
<!-- 新闻列表 s -->
|
||
<div class="new">
|
||
<div class="swt-Container">
|
||
<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="/us<?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="<?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']); ?>"></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="detail"><?php echo msubstr($detail['description'], 0, 150);?></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="/us<?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('/us/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="<?php echo url('us/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 -->
|
||
<script>
|
||
$(function(){
|
||
$(".news-vertu .tab a").click(function(){
|
||
$(this).addClass('on').siblings().removeClass('on');
|
||
var index = $(this).index();
|
||
number = index;
|
||
$('.news-vertu .content li').hide();
|
||
$('.news-vertu .content li:eq('+index+')').show();
|
||
});
|
||
|
||
var auto = 1; //等于1则自动切换,其他任意数字则不自动切换
|
||
if(auto ==1){
|
||
var number = 0;
|
||
var maxNumber = $('.news-vertu .tab a').length;
|
||
function autotab(){
|
||
number++;
|
||
number == maxNumber? number = 0 : number;
|
||
$('.news-vertu .tab a:eq('+number+')').addClass('on').siblings().removeClass('on');
|
||
$('.news-vertu .content ul li:eq('+number+')').show().siblings().hide();
|
||
}
|
||
}
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|