|
¿ù |
±×·¡ÇÁ |
ȸ¼ö |
% |
°æÀ¯»çÀÌÆ® |
$vi_max){$vi_max=$vi[num];}
$query="select id,pay_for from ord where order_date like '$y-$m-%'";
$sa_db=mysql_query($query);
query_chk($sa_db,"sa_db error");
$sale_num=number_format(mysql_num_rows($sa_db));
if(mysql_num_rows($sa_db)>$ord_max){$ord_max=mysql_num_rows($sa_db);}
}
# ÇØ´ç³â¿¡ °¡Àå Å« °ª ±¸Çϱâ (Á¶È¸,ÆÇ¸Å) ³¡
if($vi_max<$ord_max){
$vi_max=$ord_max;
}
for($i=1;$i<$tm;$i++){
#-------Àüü º¯¼ö°ª±¸Çϱ⠽ÃÀÛ
if($cell_color=="#F8F8F8"){
$cell_color="#FFFFFF";
}
else{
$cell_color="#F8F8F8";
}
$m=str_pad($i,2,"0",STR_PAD_LEFT);
$query="select sum(h00+h01+h02+h03+h04+h05+h06+h07+h08+h09+h10+h11+h12+h13+h14+h15+h16+h17+h18+h19+h20+h21+h22+h23) as 'num' from logs where date like '$y-$m-%'";
$vi_db=mysql_query($query);
query_chk($vi_db,"vi_db error");
$vi=mysql_fetch_array($vi_db);
if($vi_tot_num!=0){$vi_per=($vi[num]/$vi_tot_num)*100;}
else{$vi_per=0;}
if($vi_max!=0){$vi_tw_per=($vi[num]/$vi_max)*100;}
else{$vi_tw_per=0;}
$vi_per=number_format($vi_per,2);
$vi_all_tot=$vi_all_tot+$vi[num];
$vi_num=number_format($vi[num]);
$query="select id,pay_for from ord where order_date like '$y-$m-%'";
$sa_db=mysql_query($query);
query_chk($sa_db,"sa_db error");
$sale_num=number_format(mysql_num_rows($sa_db));
$ord_all_tot=$ord_all_tot+mysql_num_rows($sa_db);
if($sale_tot_num!=0){$sale_per=($sale_num/$sale_tot_num)*100;}
else{$sale_per=0;}
$sale_per=number_format($sale_per,2);
if($vi_max!=0){$sale_tw_per=($sale_num/$vi_max)*100;}
else{$sale_tw_per=0;}
$query="select distinct(host) from logs where date like'$y-$m-%'";
$host_db=mysql_query($query);
query_chk($host_db,"host_db error");
$host_num=number_format(mysql_num_rows($host_db));
$query="select distinct(from_domain) from ord where order_date like'$y-$m-%'";
$ord_host_db=mysql_query($query);
query_chk($ord_host_db,"ord_host_db error");
$order_host_num=number_format(mysql_num_rows($ord_host_db));
#-------Àüü º¯¼ö°ª±¸Çϱ⠳¡
echo"
$y ³â $m ¿ù |
|
¹æ¹® |
$vi_num |
$vi_per % |
$host_num |
|
ÁÖ¹® |
$sale_num |
$sale_per % |
$order_host_num |
";
}
?>
ÃÑ °è |
¹æ¹® |
|
100 % |
|
ÁÖ¹® |
|
100 % |
|
|
|
¿ù |
±×·¡ÇÁ |
¸ÅÃâ¾×
|
% |
$o_tot_max){$o_tot_max=$o_tot;}
$p_tot=$p_tot+$o_tot;
}
# ¿ùº° ¸ÅÃâ¾× Ãâ·Â ½ÃÀÛ
$cell_color="#F8F8F8";
for($i=1;$i<$tm;$i++){
if($cell_color=="#F8F8F8"){
$cell_color="#FFFFFF";
}
else{
$cell_color="#F8F8F8";
}
$m=str_pad($i,2,"0",STR_PAD_LEFT);
$query="select order_no,pay_for,send_cost from ord where order_date like '$y-$m-%'";
$ord_db=mysql_query($query);
query_chk($ord_db,"ord_db error");
$o_tot=0;
while($ord=mysql_fetch_array($ord_db)){
$query="select unit,cost from cart_order where order_no='$ord[order_no]'";
$oct_db=mysql_query($query);
query_chk($oct_db,"oct_db error");
$oct_tot=0;
while($oct=mysql_fetch_array($oct_db)){
$oct_tot=$oct_tot+($oct[cost]*$oct[unit]);
}
if($ord[pay_for]!="¿Â¶óÀÎÀÔ±Ý"){
$oct_tot=$oct_tot+ceil($oct_tot*($mir[card_per]/100));
}
$oct_tot=$oct_tot+$ord[send_cost];
$o_tot=$o_tot+$oct_tot;
}
$o_tot_dp=number_format($o_tot);
if($p_tot!=0){$o_tot_per=number_format(($o_tot/$p_tot)*100,2);}
else{$o_tot_per=0;}
if($o_tot_max!=0){$o_tw_per=($o_tot/$o_tot_max)*100;}
else{$o_tw_per=0;}
#$p_tot=$p_tot+$o_tot;
echo"
$y-$m |
|
$o_tot_dp ¿ø |
$o_tot_per % |
";
}
# ¿ùº° ¸ÅÃâ¾× Ãâ·Â ³¡
?>
ÃÑ °è |
¿ø |
100 % |
|
|
|
ÁÖ¼Ò |
±×·¡ÇÁ |
¼ö·® |
% |
$vi_max){$vi_max=$vi[num];}
$vi_tot=$vi_tot+$vi[num];
$query="select order_no,pay_for from ord where from_domain='$host[host]' and order_date like'$y-%'";
$ord_host_db=mysql_query($query);
query_chk($ord_host_db,"ord_host_db error");
$ord_tot=$ord_tot+mysql_num_rows($ord_host_db);
if($os_max
$host[host] |
|
¹æ¹® |
$vi_num |
$vi_per % |
|
ÁÖ¹® |
$order_host_num |
$ord_per % |
";
}
?>
ÃÑ °è |
¹æ¹® |
|
100 % |
ÁÖ¹® |
|
100 % |
|
|
ÁÖ¼Ò |
±×·¡ÇÁ |
¸ÅÃâ¾× |
% |
$o_max){$o_max=$o_tot;}
$p_tot=$p_tot+$o_tot;
}
$query="select distinct(host) as 'host' from logs where date like'$y-%'";
$host_db=mysql_query($query);
query_chk($host_db,"host_db error");
if(mysql_num_rows($host_db)<1){
$query="select distinct(from_domain) as 'host' from ord where order_date like '$y-%'";
$host_db=mysql_query($query);
query_chk($host_db,"host_db error");
}
$cell_color="#F8F8F8";
while($host=mysql_fetch_array($host_db)){
if($cell_color=="#F8F8F8"){
$cell_color="#FFFFFF";
}
else{
$cell_color="#F8F8F8";
}
$query="select order_no, pay_for,send_cost from ord where from_domain='$host[host]' and order_date like'$y-%'";
$ord_db=mysql_query($query);
query_chk($ord_db,"ord_db error");
$o_tot=0;
while($ord=mysql_fetch_array($ord_db)){
$query="select unit,cost from cart_order where order_no='$ord[order_no]'";
$oct_db=mysql_query($query);
query_chk($oct_db,"oct_db error");
$oct_tot=0;
while($oct=mysql_fetch_array($oct_db)){
$oct_tot=$oct_tot+($oct[cost]*$oct[unit]);
}
if($ord[pay_for]!="¿Â¶óÀÎÀÔ±Ý"){
$oct_tot=$oct_tot+ceil($oct_tot*($mir[card_per]/100));
}
$oct_tot=$oct_tot+$ord[send_cost];
$o_tot=$o_tot+$oct_tot;
}
$o_tot_dp=number_format($o_tot);
if($p_tot!=0){$o_tot_per=number_format(($o_tot/$p_tot)*100,2);}
else{$o_tot_per=0;}
if($o_max!=0){$o_tw_per=($o_tot/$o_max)*100;}
else{$o_tw_per=0;}
echo"
$host[host] |
|
$o_tot_dp ¿ø |
$o_tot_per % |
";
}
?>
ÃÑ °è |
|
|
|