7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
66 lines
5.9 KiB
PHP
66 lines
5.9 KiB
PHP
<?
|
|
//-----------------------------------------------------客户端->订单分析->款号排行(到色)
|
|
$s_order=$s_order?$s_order:"num";
|
|
$s_desc=$s_desc?$s_desc:"d1";
|
|
$kh_ph_num=get_set("kh_ph_num");
|
|
$kh_ph_num=$kh_ph_num>0?$kh_ph_num:10;
|
|
//$content_search="<select name=\"s_ka\" onchange=\"tj.submit();show_loading();\" style=\"width:80px;\"><option value=\"\">-显示删除款-</option>".get_main_op($arr_yn,$s_ka)."</select> ";
|
|
//系列
|
|
if(check_arr_select_show("series"))
|
|
$content_search.="<select name=\"s_series\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\"><option value=\"\">-按".get_cate_title_no("arr_select","series")."过滤-</option>".op_select_cate1("series",$s_series)."</select> ";
|
|
//主题
|
|
if(check_arr_select_show("theme"))
|
|
$content_search.="<select name=\"s_theme\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\"><option value=\"\">-按".get_cate_title_no("arr_select","theme")."过滤-</option>".op_select_cate1("theme",$s_theme)."</select> ";
|
|
//季节
|
|
if(check_arr_select_show("season"))
|
|
$content_search.="<select name=\"s_season\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\"><option value=\"\">-按".get_cate_title_no("arr_select","season")."过滤-</option>".op_select_cate1("season",$s_season)."</select> ";
|
|
$content_search.="<select name=\"s_bc\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\"><option value=\"\">-按".get_cate_title_no("arr_select","bc")."过滤-</option>".op_select_cate1("bc",$s_bc)."</select> ";
|
|
$content_search.="<select name=\"s_category\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\"><option value=\"\">-按".get_cate_title_no("arr_select","category")."过滤-</option>".op_select_cate1("category",$s_category)."</select> ";
|
|
//小类
|
|
if(check_arr_select_show("category1"))
|
|
$content_search.="<select name=\"s_category1\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\"><option value=\"\">-按".get_cate_title_no("arr_select","category1")."过滤-</option>".op_select_cate1("category1",$s_category1)."</select> ";
|
|
$content_search.="<select name=\"s_desc\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\">".get_main_op(array("d1"=>"前".$kh_ph_num."名","d2"=>"后".$kh_ph_num."名"),$s_desc)."</select> ";
|
|
$content_search.="<select name=\"s_order\" onchange=\"tj.submit();show_loading();\" style=\"width:100px;height:30px;\">".get_main_op(array("num"=>"按数量排序","je"=>"按金额排序"),$s_order)."</select> ";
|
|
//
|
|
$content="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" bgcolor=\"#000000\"><tr><td width=\"50\" height=\"25\" align=\"center\" bgcolor=\"#333333\" class=\"fontWhite\"><strong>总排名</strong></td><td align=\"center\" bgcolor=\"#333333\" class=\"fontWhite\"><strong>款号</strong></td><td align=\"center\" bgcolor=\"#333333\" class=\"fontWhite\"><strong>色号</strong></td><td align=\"center\" bgcolor=\"#333333\" class=\"fontWhite\"><strong>单价(元)</strong></td><td width=\"60\" height=\"25\" align=\"center\" bgcolor=\"#333333\" class=\"fontWhite\"><strong>我的排名</strong></td><td align=\"center\" bgcolor=\"#333333\" class=\"fontWhite\"><strong>我的订单(件)</strong></td><td align=\"center\" bgcolor=\"#333333\" class=\"fontWhite\"><strong>金额(元)</strong></td></tr>";
|
|
$order_ph=($s_desc=="d1")?" desc":"";
|
|
//取得款号总数
|
|
$tmp=get_db_msg("select count(distinct no) 'num' from ".$table_pre."view_ph where no<>'' ".$con);
|
|
$total_kh=$tmp["num"];
|
|
//取得我的排行
|
|
$arr_my_ph_num=array();
|
|
$q1="select sum(".get_size_sql("sum").") 'num',sum((".get_size_sql("sum").")*price) 'je',iid,color from ".$table_pre."order where uid='".$uid."' ".$con." group by no,color order by ".$s_order." desc";
|
|
$r1=$db->query($q1);
|
|
while($m1=$db->fetch_array($r1)){
|
|
$arr_my_ph_num[]=$m1["num"];
|
|
}
|
|
$arr_my_ph_num=array_unique($arr_my_ph_num);
|
|
//
|
|
$q="select sum(".get_size_sql("sum").") 'num',sum((".get_size_sql("sum").")*price) 'je',iid,price,color from ".$table_pre."order where no<>'' ".$con." group by no,color order by ".$s_order.$order_ph." limit 0,".$kh_ph_num;
|
|
//echo $q."<br>";
|
|
$r=$db->query($q);
|
|
$total_num=$total_money=$count=0;
|
|
while($m=$db->fetch_array($r)){
|
|
$bg=($count%2)?"#333333":"#444444";
|
|
if($s_desc=="d1")
|
|
$list=$count+1;
|
|
else
|
|
$list=$total_kh+$count;
|
|
$m1=get_db_msg("select * from ".$table_pre."kh where id='".$m["iid"]."'");
|
|
$num_my=get_order_num_kh_color($m["iid"],$m["color"]);
|
|
$total_num+=$num_my;
|
|
$money_my=$m["price"]*$num_my;
|
|
$total_money+=$money_my;
|
|
$ph_my="";
|
|
if($num_my>0){
|
|
$ph_my=get_main_key($arr_my_ph_num,$num_my);
|
|
$ph_my++;
|
|
}
|
|
$content.="<tr><td bgcolor=\"".$bg."\" class=\"fontWhite\">".$list."</td><td height=\"25\" bgcolor=\"".$bg."\" class=\"fontWhite\"><a href=\"?_m=order_single&id=".$m1["id"]."&color=".$m["color"]."&rurl=".urlencode($rurl).$thickbox."\" title=\"".$m1["no"]."的订单\"".$thickbox1.">".$m1["no"]."</a></td><td height=\"25\" bgcolor=\"".$bg."\" class=\"fontWhite\">".$m["color"]."-".get_cate_title_no("color",$m["color"])."</td><td height=\"25\" bgcolor=\"".$bg."\" class=\"fontWhite\">".$m1["price"]."</td><td height=\"25\" bgcolor=\"".$bg."\" class=\"fontWhite\">".$ph_my."</td><td height=\"25\" bgcolor=\"".$bg."\" class=\"fontWhite\">".$num_my."</td><td height=\"25\" bgcolor=\"".$bg."\" class=\"fontWhite\">".$money_my."</td></tr>";
|
|
if($s_desc=="d1")
|
|
$count++;
|
|
else
|
|
$count--;
|
|
}
|
|
$content.="<tr><td height=\"25\" colspan=\"5\" align=\"right\" bgcolor=\"#333333\" class=\"fontWhite\">合计</td><td height=\"25\" bgcolor=\"#333333\" class=\"fontWhite\">".$total_num."</td><td height=\"25\" bgcolor=\"#333333\" class=\"fontWhite\">".$total_money."</td></tr></table></td></tr></table>";
|
|
?>
|