| Current Path : /home/zqegovsj/www/us3web.haibo.com.cn/biguo/ |
| Current File : /home/zqegovsj/www/us3web.haibo.com.cn/biguo/news2.php |
<?php
include("function.php");
$page = !empty($_GET['st']) ? (int)$_GET['st'] : 1;
$limit = 12; // 每页显示的数量
$offset = ($page - 1) * $limit; // 计算偏移量
$num =$db->selectone( "select count(id) from ".$noe_version."_companynewses where member_id='".$id."' and type_id =".$_GET['ntid']." ");
$pagecount=$num[0];
if(!isset($st))$st=1;
$number=($st-1)*$limit+1;
$number2=($st-1)*$limit+$limit;
$total_pages = ceil($pagecount / $limit);
$sql = "select id,title,created,content,picture,title2 from ".$noe_version."_companynewses where member_id='".$id."' and type_id =".$_GET['ntid']." order by created desc LIMIT ".($st-1)*$limit.','.$limit;
$res=$db->selectarray($sql);
$news=$res;
$cate=$db->selectone( "select id,name,name2,keyword,des from ".$noe_version."_newstypes where id='".$_GET['ntid']."'");
$aa='news.html';
$aaa=$lang['words'][73];
$bb=$db->turn_name($cate[2]).'_newstype'.$cate[0].'.html';
$bbb=$cate[1];
$purl=$bb;
$urlsort=$db->turn_name($cate[2]).'_newstype'.$cate[0];
$pagekeyword=$cate[1];
$pagekeyword2=$pagekeyword;
$pagekeyword3=$pagekeyword;
include("head.php");
?><section class="content">
<h2 class="p-b-20 font-bold"><span><?=$bbb?></span></h2>
<section class="postlist" style="margin-top:0px;">
<? $i=1; while(@$b=mysqli_fetch_row($news)){
?><article class="post" style="margin-top:0px;">
<h2 style="margin-top:0px;"><a href="/<?=$db->turn_name($b[5])?>_newsview<?=$b[0]?>.html"><?=$b[1]?></a></h2>
<p class="post-meta"><?=date("d",$b[2])?> <?=date("M",$b[2])?>, <?=date("Y",$b[2])?></p>
<div class="img medium"><a href="/<?=$db->turn_name($b[5])?>_newsview<?=$b[0]?>.html"><img src="https://<?=$imgprod?>/upload/middle/<?=$b[4]?>" alt="<?=$b[1]?>"></a></div>
<p><?=$db->mystrcut(html_entity_decode($b[3]),260)?>...</p>
</article><? $i++;?><? }?>
<? if($pagecount>12){?><div class="cell-md-12">
<? include("page_navigation.php");?></div>
<? }?>
</section>
</section>
<? include("foot.php");?>