getStoreById($storeid); $GLOBALS['frames'] = $this->getNaveMenu($storeid, $action,$uid); $type=$_GPC['type']?$_GPC['type']:'wm'; if($type=='wm'){ $goods=pdo_getall('cjdc_goods',array('store_id'=>$storeid,'type'=>array(1,3)),array('id')); $where=' and b.state in (4,5,10)'; }else{ $goods=pdo_getall('cjdc_goods',array('store_id'=>$storeid,'type'=>array(2,3)),array('id')); $where=' and b.dn_state=2'; } $goods=array_column($goods,'id'); $data=array(); for($i=0;$i0){ $data[]=array( 'id'=>$goods[$i], 'goodnum'=>$number['goodnum'], 'name'=>$number['name'], 'img'=>$number['img'] ); } } foreach ($data as $key => $row) { $goodnum[$key] = $row['goodnum']; } array_multisort($goodnum, SORT_DESC, $data); include $this->template('web/dlgoodrank');