0){ $tmpl=get_db_msg("select count(id) 'num' from ".$table_pre."kh where ".$phb_config['key']."='".${'s_'.$phb_config['key']}."'");//先取总款数 $page_size=round($tmpl['num']*$phb_config['detail'][${'s_'.$phb_config['key']}]); } // $page_size=$page_size?$page_size:20; $s_time=$s_time?$s_time:3; $s_refresh_time=$s_refresh_time?$s_refresh_time:30; $s_reload_time=$s_reload_time?$s_reload_time:10; $xh_ms=get_set("xh_ms"); if($s_time<=0 || $page_size<=0){ alert_and_back("请输入数字!"); } $sql_qy=""; $url_var="s_time=".$s_time."&s_refresh_time=".$s_refresh_time."&page_size=".$page_size; //取得排行款号 if($s_qy || $s_brand || $s_sxz || $s_series || $s_theme || $s_category || $s_category1 || $s_season || $s_bc){ $sql_con="where "; if($s_qy){ $sql_con.="qy='".$s_qy."' and "; $sql_qy.=" and qy='".$s_qy."'"; $url_var.="&s_qy=".$s_qy; } if($s_brand){ $sql_con.="brand='".$s_brand."' and "; $url_var.="&s_brand=".$s_brand; } if($s_sxz){ $sql_con.="sxz='".$s_sxz."' and "; $url_var.="&s_sxz=".$s_sxz; } if($s_series){ $sql_con.="series='".$s_series."' and "; $url_var.="&s_series=".$s_series; } if($s_theme){ $sql_con.="theme='".$s_theme."' and "; $url_var.="&s_theme=".$s_theme; } if($s_category){ $sql_con.="category='".$s_category."' and "; $url_var.="&s_category=".$s_category; } if($s_category1){ $sql_con.="category1='".$s_category1."' and "; $url_var.="&s_category1=".$s_category1; } if($s_bc){ $sql_con.="bc='".$s_bc."' and "; $url_var.="&s_bc=".$s_bc; } $sql_con=substr($sql_con,0,-4); } $q="select sum(num) 'num',sum(je) 'je',iid 'id' from ".$table_pre."order ".$sql_con." group by iid order by num desc limit 0,".$page_size; $r=$db->query($q); $i=1; $content=$content_div=array(); while($m=$db->fetch_array($r)){ $m_kh=get_db_msg("select * from ".$table_pre."kh where id='".$m["id"]."'"); $xh=get_kh_xh($m_kh); $content[$i][]=$xh; $content[$i][]=$m_kh["no"]; $content[$i][]=get_cate_title_no("bc",$m_kh["bc"]); $content[$i][]=get_cate_title_no("category",$m_kh["category"]); //取得下单客户量 $m_num_client=get_db_msg("select count(distinct uid) 'num' from ".$table_pre."order where iid='".$m_kh["id"]."'".$sql_qy); // //取得定制选项 $select_dz=array(); $q1="select no,title from ".$table_pre."keyword where cate='arr_select' and flag_ka='y' and no<>'jgd' and no<>'sx' and no<>'color' order by ord"; $r1=$db->query($q1); $j=0; while($m1=$db->fetch_array($r1)){ $select_dz[$j][0]=$m1["title"].":"; $select_dz[$j][1]=get_cate_title_no($m1["no"],$m_kh[$m1["no"]]); $j++; } $dzHTML = ''; $dzCount = 0; for($k=0;$k".$select_dz[$k*2][1].""; if ($select_dz[$k*2][0]) $dzCount++; $dzHTML.="
".$select_dz[$k*2+1][0]."".$select_dz[$k*2+1][1]."
"; if ($select_dz[$k*2+1][0]) $dzCount++; } // $pic=get_kh_picture_big($m_kh["no"],$m_kh["main_pic"],$m_kh["color"]); $content_div[$i]="
NO.".$i." 第".$i."名
款号:".$m_kh["no"]."
序号:".get_kh_xh($m_kh)."
".$dzHTML."
款式名:".$m_kh["title"]."
下单客户:".$m_num_client["num"]."个
".out_good_pic($pic,280,300)."
"; $i++; } $num2=count($content)>20?count($content):20; ?> " /> 排行榜
排名 序号 款号  
 
           
0){ echo "
滚动间隔秒 刷新时间分钟 显示前