# *********************************************************
# °³¹ßÀÚ : ÀÌ»óºÀ(webin)
#
# »ý¼ºÀÏ : 2001/06/29
# homepage : http://webin.sarang.net
# e-mail : webin@webin.sarang.net
# ICQ : 69796775
#
# CopyRight2001¨Ïwebin
# ¢Ñmade by sangbong lee¢Ð
#
# °³ÀÎÀûÀÎ »ç¿ëÀº ÇÁ¸®ÀÔ´Ï´Ù. ^^;
# »ó¾÷ÀûÀÎ ¿ëµµÀÇ »ç¿ëÀº °³¹ßÀÚÀÇ µ¿ÀǸ¦ ÇÊ¿ä·Î ÇÕ´Ï´Ù.
# *********************************************************
include "db_con.php";
//Àüü Ä«¿îÆ®
if(!$year){
$query = "select total from webin_static where id='$id' order by num desc limit 1";
}else{
$query = "select total from webin_static where id='$id' and year=$year and month=$month order by num desc limit 1";
}
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result) or die(mysql_error());
$total_count = $row[total];
mysql_free_result($result);
?>
Untitled Document
O/Sº° |
HIT |
O/Sº° Á¢¼Ó Åë°è |
// ÃÑ Ä«¿îÆ® ÀúÀå -> $total_day[$i], Ä«¿îÆ®À² ÀúÀå -> $per_day[$i]
$scale = 4.5;
$os = array('win95','win98','win2000','winnt','linux','mac','os_etc');
$os_2 = array('Win95','Win98','Win2000','WinNT','Linux','mac','etc');
for($i=0; $i<7; $i++){
if(!$year){
$result = mysql_query("select SUM($os[$i]) from webin_static where id='$id' and $os[$i]>0");
}else{
$result = mysql_query("select SUM($os[$i]) from webin_static where id='$id' and year=$year and month=$month and $os[$i]>0");
}
$row = mysql_fetch_array($result) or die(mysql_error());
$total_week[$i] = $row[0];
if($row[0]==""){ $row[0] = 0;}else{ $week_var++; }
$per_week[$i] = round(($total_week[$i]/$total_count)*100);
$width = $per_week[$i]*$scale;
echo "
$os_2[$i] |
$row[0] |
${per_week[$i]}% |
";
} //for($i=0;$i<$num_day;$i++){
mysql_free_result($result);
$avr_count = $total_count / $week_var ;
$per_total = round(($avr_count/$total_count)*100);
$avr_width = $per_total*$scale;
$avr_count = substr($avr_count,0,5);
echo "
Æò±Õ |
$avr_count |
|
";
?>
|
include "db_close.php"; ?>