Your IP : 216.73.216.170


Current Path : /home/zqegovsj/www/us3web.haibo.com.cn/topsignal/
Upload File :
Current File : /home/zqegovsj/www/us3web.haibo.com.cn/topsignal/product2.php

<?php 
include("function.php");

$page = !empty($_GET['st']) ? (int)$_GET['st'] : 1;
$limit = 20; // 每页显示的数量
$offset = ($page - 1) * $limit; // 计算偏移量
isset($_GET['st'])?$st=$_GET['st']:$st=1;

$countsubidsql=$db->selectarray( "SELECT id from ".$noe_version."_producttypes where level =".$_GET['sort_id']);
$countsubid=$db->toarray($countsubidsql);

if (!empty($countsubid)){
$r=$db->array_multi2single($countsubid); 
if (!is_array($r)) {
$r = is_iterable($r) ? iterator_to_array($r) : array($r);
}
@$r=array_unique($r);
$r = implode(",", $r);

$countsubsubidsql =$db->selectarray( "select id from ".$noe_version."_producttypes where level in (".$_GET['sort_id'].",".$r.")");
$countsubsubid=$db->toarray($countsubsubidsql);

if (!empty($countsubsubid)){
$subr=$db->array_multi2single($countsubsubid); 
if (!is_array($subr)) {
$r = is_iterable($subr) ? iterator_to_array($subr) : array($subr);
}
@$subr=array_unique($subr);
$subr = implode(",", $subr);

$sql = "select count(id) from ".$noe_version."_products where producttype_id in (".$_GET['sort_id'].",".$r.",".$subr.") ";
$products =$db->selectarray( "select id,name,sn,picture,name2,price,sizes from ".$noe_version."_products where producttype_id in (".$_GET['sort_id'].",".$r.",".$subr.") order by ep_range desc LIMIT ".($st-1)*$limit.','.$limit);
}
else
{
$sql = "select count(id) from ".$noe_version."_products where producttype_id in (".$_GET['sort_id'].",".$r.") ";
$products =$db->selectarray( "select id,name,sn,picture,name2,price,sizes from ".$noe_version."_products where producttype_id in (".$_GET['sort_id'].",".$r.") order by ep_range desc LIMIT ".($st-1)*$limit.','.$limit);
}
}
else
{
$sql = "select count(id) from ".$noe_version."_products where producttype_id = ".$_GET['sort_id'];
$products =$db->selectarray( "select id,name,sn,picture,name2,price,sizes from ".$noe_version."_products where producttype_id =".$_GET['sort_id']." order by ep_range desc LIMIT ".($st-1)*$limit.','.$limit);
}


$num = $db->selectarray($sql);
$num = $db->toarray($num);


isset($num[0][0])?$pagecount=$num[0][0]:$st=1;

$number=($st-1)*$limit+1;
$number2=($st-1)*$limit+$limit;
$total_pages = ceil($pagecount / $limit);

$tit=$db->selectone("select id,name,level,img,name2,keyword,des,titname,titdes from ".$noe_version."_producttypes where id='".$_GET['sort_id']."'");

if($tit[2]==0){
$bb=$db->turn_name($tit[4]).'_supply'.$tit[0].'.html';
$bbb=$tit[1];
$pcateid=$tit[0];
}
else{
$cc=$db->turn_name($tit[4]).'_supply'.$tit[0].'.html';
$ccc=$tit[1];

$uptit=$db->selectone("select id,name,img,name2,level from ".$noe_version."_producttypes where id='".$tit[2]."'");

$bb=$db->turn_name($uptit[3]).'_supply'.$uptit[0].'.html';
$bbb=$uptit[1];	
$pcateid=$uptit[0];

if($uptit[4]!=0){
$ptoptybe=$db->selectone("select id,name,img,name2,level from ".$noe_version."_producttypes where id='".$uptit[4]."'");

	if(isset($ccc)){$ddd=$ccc;
	$dd=$cc;};
	if(isset($bbb)){$ccc=$bbb;
	$cc=$bb;};
	$bb=$db->turn_name($ptoptybe[3]).'_supply'.$ptoptybe[0].'.html';
	$bbb=$ptoptybe[1];
}

}

$aa='product.html';
$aaa=$lang['words'][72];
$urlsort=$db->turn_name($tit[4]).'_supply'.$tit[0];
$purl=$db->turn_name($tit[4]).'_supply'.$tit[0].'.html';
$feedbacktit=$tit[1];
$pageh1=$aaa;
$topbg='about';

$pagekeyword=$tit['1'].', '.$lang['words'][1];

$pagekeyword2=$pagekeyword;

$pagekeyword3=$tit['1'].' '.$lang['words'][159].', '.$lang['words'][194].', '.$lang['words'][193].', '.$lang['words'][191].' '.$tit['1'].' '.$lang['words'][156].', '.$lang['words'][157].', '.$lang['words'][158];


include("head.php");
?>
<section id="content">
<div class="content-wrap pt-0 mt-5">
<div class="container">


<h2 class="mb-1"><? if(isset($ccc))echo $ccc;elseif(isset($bbb))echo $bbb;else{?><?=$lang['words'][94]?><? }?>: <span class="en-3"><?=$lang['words'][93]?> <?=$pagecount?> | <?=$number?> - <?=$number2?></span></h2>
<p class="mb-5"><?=str_replace("\n","<br>",str_replace(' ',' ',$tit[8]))?>
</p>

<div id="shop" class="shop row gutter-20">
<? $i=1; while(@$a=mysqli_fetch_row($products)){
?>
<div class="product col-lg-3 col-md-4 col-sm-6 col-6">
<div class="charity-card h-shadow shadow-ts card rounded-0">
<div class="p-4">
<div class="box__ins2 ">
<a href="/<?=$db->turn_name($a[4])?>_product<?=$a[0]?>.html" title="<?=$a[1]?>"><img src="https://<?=$imgprod?>/upload/middle/<?=$a[3]?>" alt="<?=$a[1]?>" style="max-height:250px; width:auto;"></a>
</div>
<div class="product-desc" style="min-height:120px;">
<div class="product-title mb-0">
<p class="fw-semibold mb-2 mt-2"><?=$a[2]?></p>
<h3 class="mb-0 font-14px"><a class="fw-light" href="/<?=$db->turn_name($a[4])?>_product<?=$a[0]?>.html" title="<?=$a[1]?>"><?=$a[1]?></a></h3></div>
</div>
</div>
</div></div>
<? $i++;?>

<? }?> 
 </div>
                     
                   
<? if($pagecount>20){?>                    
<div class="page_num clearfix">
<? include("page_navigation.php");?>
</div>
<? }?>
					
</div>
</div>

</section>

<? include("foot.php");?>