|
if (!empty($catalog_show[GSURL])) {
echo " 点击上图浏览厂家网站! "; }
else { echo " "; }
?>
$sql="select * from cy_catalog where GXMQ='".$gsmq."' and kind=1 order by forid DESC";
$result=mysql_query($sql);
$total= mysql_numrows($result);//取得总和
$maxrow=($total+1)/4;
$l=0;
echo " ";
for ($k=0; $k<$maxrow; $k++) {
for ($i=0; $i<4; $i++) {
$m=$l++;
if ($m<$total) {
echo "".mysql_result($result,$m,"XLMQ")."";
if (mysql_result($result,$m,"pro_new")=="new") {
echo ""; }
echo " | ";
}
}
}
echo " |
";
if ($xlmq==Null) {
$xlmq=mysql_result($result,0,"XLMQ");
}
if ($xlmq != Null) { //有系列名
$sql="select * from cy_catalog where GXMQ='".$gsmq."' and XLMQ='".$xlmq."' and kind=1";
$result=mysql_query($sql);
//数据集赋值到数组
$XLJJ=nl2br(mysql_result($result,0,"GSJJ"));
//如果系列无简介,显示品牌简介
}
?>
echo " ■ ".$xlmq."".$XLJJ;
$sql="select * from cy_catalog where GXMQ='".$gsmq."' and XLMQ='".$xlmq."' and kind=2 order by forid";
$result=mysql_query($sql);
$total= mysql_numrows($result);//取得总和
$maxrow=($total+1)/2; //计算最大行数
echo " ";
$l=0;
for ($k=0; $k<$maxrow; $k++) {
echo "";
for ($j=0; $j<2; $j++) { //每行四列
// echo ($maxrow*4-1)."-".$total;
$m=$l++;
if ($m<$total) {
$catalog1_show[$m][id]=mysql_result($result,$m,"ID");
$catalog1_show[$m][xkmq]=mysql_result($result,$m,"XKMQ");
$catalog1_show[$m][xkbm]=mysql_result($result,$m,"XKBM");
$catalog1_show[$m][type]=mysql_result($result,$m,"type");
$catalog1_show[$m][sales]=mysql_result($result,$m,"price");
$catalog1_show[$m][unit]=mysql_result($result,$m,"unit");
$catalog1_show[$m][pro_new]=mysql_result($result,$m,"pro_new");
$catalog1_show[$m][spec]=mysql_result($result,$m,"spec");
$catalog1_show[$m][spec_date1]=mysql_result($result,$m,"spec_date1");
$catalog1_show[$m][spec_date2]=mysql_result($result,$m,"spec_date2");
$catalog1_show[$m][kick]=mysql_result($result,$m,"kick");
$img_path = explode(";",mysql_result($result,$m,"img_path"));
$color = explode(";",mysql_result($result,$m,"color"));
$realIP=get_real_ip();
if (check_ip($realIP)!="ok") { $catalog1_show[$m][sales]=0; }
echo " | ";
echo " | ";
}
}
echo " ";
}
echo " ";
?>
$page=$_REQUEST["page"];
$sql="select * from cy_text where kind = 3 and disp =0 and maker like '". $gsmq ."' order by id desc";
$result=mysql_query($sql);
$total= mysql_num_rows($result);
if(!$page)$page =0;
$eachpage=20;
$start=$page*$eachpage;
$end=$start+$eachpage;
if($end>$total) $end =$total;
$totalpage =round($total/$eachpage);
if ($maker=="%") {
$pagestr="有".$total."条器评 共".$totalpage."页 ";}
else { $pagestr="有".$total."条 ".$maker." 器评 共".$totalpage."页 "; }
if($page>0) $pagestr=$pagestr." 上一页 ";
$pagelegth = 5;
$pagestart = 0;
if (($page +1) > 4) { $pagelegth = $page +2 ; $pagestart = ($page +2) - 5 ; }
if ($pagelegth > $totalpage) { $pagelegth = $totalpage; }
for ($i= $pagestart ; $i < $pagelegth ; $i++)
{
if ($i!=$page) {$pagestr=$pagestr." ".($i+1)." ";}
else {$pagestr=$pagestr.($i+1)." ";}
}
if ($page<($totalpage-1)) $pagestr=$pagestr." 下一页";
?>
echo " ".$pagestr; ?>
echo " ";
if($total==0){
echo "
没有符合要求的资料! | ";
} else {
for ($i=$start; $i<$end; $i++) {
$news_show[$i][news_id]=mysql_result($result,$i,"id");
$news_show[$i][news_title]=mysql_result($result,$i,"title");
$news_show[$i][news_date]=mysql_result($result,$i,"date");
$color="#f2f2f2";
if (($i%2)==0) { echo "";}
echo " | ";
if ((($i+1)%2)==0) { echo " ";}
if ($color=="#f2f2f2") { $color="#f6f6f6";} else { $color="#f2f2f2"; }
}
}
echo " ";
?>
|
|
$sql="select GXMQ ,img_path from cy_catalog where kind=0 order by ID ";
$gxmqlist=mysql_query($sql);
$j=1;
while (list($GXMQ,$img_path) =mysql_fetch_row($gxmqlist)) {
if (($j%2)==1) { echo "";}
echo " | ";
if (($j%2)==0) { echo " ";}
$j++;
}
?>
|
|