微信
{ if $langzh eq zh}中文 {/if} { if $langtw eq tw}{$lang.tw}|{/if} { if $langen eq en}{$lang.en} {/if}
{php}navname(productshow){/php}
{php}navname('productshow'){/php}
{php} $size = 12; $page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1; if(!empty($_GET['classid'])){ $where = " AND ClassID = '".intval($_GET['classid'])."' "; $classidsql = "&classid=".$_GET['classid'] ; } if(!empty($_GET['keyword'])){ $where = " AND Name like '%".trim($_GET['keyword'])."%' "; $classidsql = "&keyword=".$_GET['keyword'] ; } if($GLOBALS['lang'] == 'zh'){ $sql = "SELECT COUNT(*) FROM ".$GLOBALS['eces']->table('firm_products')." WHERE FirmID = '". $GLOBALS['FrimID']."' $where "; }elseif($GLOBALS['lang'] == 'tw'){ $sql = "SELECT COUNT(*) FROM ".$GLOBALS['eces']->table('firm_products_tw')." WHERE FirmID = '". $GLOBALS['FrimID']."' $where "; }else{ $sql = "SELECT COUNT(*) FROM ".$GLOBALS['eces']->table('firm_products_en')." WHERE FirmID = '". $GLOBALS['FrimID']."' $where "; } $record_count = $GLOBALS['dbes']->getOne($sql); $start = ($page-1)*$size; $pages = ceil($record_count/$size); $pageq = $page-1; $pagel = $page+1; if($pageq < '1'){ $pageq = '1'; } if($pagel>$pages){ $pagel=$pages; } $limit = "LIMIT $start,$size "; for($i=1;$i<=$pages;$i++){ if($i==$page){$selected="selected";}else{$selected="";} $option .=""; } $pagesstr = "
第".$page."页/共".$pages."页  第一页  上一页  下一页  最后页  跳到    页 
"; if($GLOBALS['lang'] == 'zh'){ $sql = "SELECT * FROM ".$GLOBALS['eces']->table('firm_products')." WHERE FirmID = '". $GLOBALS['FrimID']."' $where "; }elseif($GLOBALS['lang'] == 'tw'){ $sql = "SELECT * FROM ".$GLOBALS['eces']->table('firm_products_tw')." WHERE FirmID = '". $GLOBALS['FrimID']."' $where "; }else{ $sql = "SELECT * FROM ".$GLOBALS['eces']->table('firm_products_en')." WHERE FirmID = '". $GLOBALS['FrimID']."' $where "; } $sql .= "ORDER BY `addTime` DESC ".$limit ; $RS = $GLOBALS['dbes']->getAll($sql); foreach($RS AS $v){ if($GLOBALS['lang'] == 'zh'){ $cat_name = $GLOBALS['dbes']->getRow("SELECT cat_id,parent_id,cat_name FROM ".$GLOBALS['eces']->table('category_zh')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND cat_id = '".$v[ClassID]."' "); }elseif($GLOBALS['lang'] == 'tw'){ $cat_name = $GLOBALS['dbes']->getRow("SELECT cat_id,parent_id,cat_name FROM ".$GLOBALS['eces']->table('category_tw')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND cat_id = '".$v[ClassID]."' "); }else{ $cat_name = $GLOBALS['dbes']->getRow("SELECT cat_id,parent_id,cat_name FROM ".$GLOBALS['eces']->table('category_en')." WHERE FirmID = '". $GLOBALS['FrimID']."' AND cat_id = '".$v[ClassID]."' "); } if(!empty($v[PicPath])){ $picimg = $v[PicPath] ; }else{ $picimg = $GLOBALS['tpl']['img']."imgjs/erreso.gif"; } $contenet .= '
'.$v[Name].'  '.$cat_name['cat_name'].'
'; } echo $contenet; {/php}
{php} echo $pagesstr; {/php}
{literal} {/literal} {literal} {/literal} {$flaotQQ}