| $num00 | ";
$find_sn=mysql_fetch_array(mysql_query("select * from zsmem where no=$pt[id_no]"));
if($_SESSION[zsPART]=='all' || $_SESSION[zsNO]==$pt[id_no]) {
$sn=$find_sn[sn];
}
else $sn="*******";
echo "$sn | ";
$grade=substr($sn, 3,1);
echo "$grade | ";
if($_SESSION[zsPART]=='all') $title_name="title='".$find_sn[name]."' onclick=location.href='zsdata.php?zno=$pt[id_no]'";
if($_SESSION[zsNO]) {
$pt_nick=$find_sn[nick];
}
else {
$rrr=mb_strlen($find_sn[nick], 'UTF-8')-2;
if($rrr<1) $rrr=1;
$pt_nick=mb_substr($find_sn[nick], 0, 1, 'UTF-8').str_repeat("#", $rrr).mb_substr($find_sn[nick], -1, 1, 'UTF-8');
}
if(mb_strlen($pt_nick, "utf-8")>10) $pt_nick=mb_substr($pt_nick, 0,7,"utf-8")."...";
echo "$pt_nick";
$u_d1=mysql_fetch_array(mysql_query("select * from zsRank2 where id_no='".$pt[id_no]."' AND reg_time='".$lasttime[reg_time]."' order by reg_time DESC LIMIT 1")); // 최근 등수
$u_d2=mysql_fetch_array(mysql_query("select * from zsRank2 where id_no='".$pt[id_no]."' AND reg_time<'".$lasttime[reg_time]."' order by reg_time DESC LIMIT 1")); // 그전 등수
//echo $u_d2[rank]."|".$u_d1[rank]."|".$u_d2[rank_avg]."|".$u_d1[rank_avg]."|".$pt[id_no]."";
if($_GET[od]=='pt') {
if(!$u_d2[rank] || $u_d1[rank]==$u_d2[rank]) {
echo " 〓";
}
else if ($u_d1[rank] && $u_d1[rank]>$u_d2[rank]) {
//echo " ▼".abs($u_d2[rank]-$u_d1[rank])."(".$u_d2[rank].", ".$u_d1[rank].")"."";
echo " ▼".abs($u_d2[rank]-$u_d1[rank])."";
}
else if ($u_d1[rank] && $u_d1[rank]<$u_d2[rank]) {
// echo " ▲".abs($u_d2[rank]-$u_d1[rank])."(".$u_d2[rank].", ".$u_d1[rank].")"."";
echo " ▲".abs($u_d2[rank]-$u_d1[rank])."";
}
}
else if(!$_GET[od] || $_GET[od]=='avgpt') {
if(!$u_d2[rank_avg] || $u_d1[rank_avg]==$u_d2[rank_avg]) {
echo " 〓";
}
else if ($u_d1[rank_avg] && $u_d1[rank_avg]>$u_d2[rank_avg]) {
//echo " ▼".abs($u_d2[rank_avg]-$u_d1[rank_avg])."(".$u_d2[rank_avg].", ".$u_d1[rank_avg].")"."";
echo " ▼".abs($u_d2[rank_avg]-$u_d1[rank_avg])."";
}
else if ($u_d1[rank_avg] && $u_d1[rank_avg]<$u_d2[rank_avg]) {
//echo " ▲".abs($u_d2[rank_avg]-$u_d1[rank_avg])."(".$u_d2[rank_avg].", ".$u_d1[rank_avg].")"."";
echo " ▲".abs($u_d2[rank_avg]-$u_d1[rank_avg])."";
}
}
echo " | ";
$daynum=3;
$recent_time=time()-(3600*24*$daynum);
$ptnum=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."'".$srttime." and checks<>'2'"));
$ptnum1=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."'".$srttime." and mem='".$pt[id_no]."' and checks='0'"));
$ptnum1_1=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."'".$srttime." and mem='".$pt[id_no]."' and checks='0' and reg_time>'".$recent_time."'"));
$ptnum2=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."'".$srttime." and mem<>'".$pt[id_no]."' and checks='0'"));
$ptnum2_1=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."'".$srttime." and mem<>'".$pt[id_no]."' and checks='0' and reg_time>'".$recent_time."'"));
$ptnum3=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."'".$srttime." and checks in (1, 3, 4)"));
$ptnum3_1=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."'".$srttime." and checks in (1, 3, 4) and reg_time>'".$recent_time."'"));
if($ptnum1_1[0]) $lastrecord1="font-weight:bold;color:green;";
if($ptnum2_1[0]) $lastrecord2="font-weight:bold;color:red;";
if($ptnum3_1[0]) $lastrecord3="font-weight:bold;color:blue;";
if($_SESSION[zsPART]=='all') {
echo "$ptnum[0] (";
if($ptnum2_1[0]) echo "$ptnum2_1[0]";
echo $ptnum2[0];
echo "/";
if($ptnum1_1[0]) echo "$ptnum1_1[0]";
echo $ptnum1[0];
echo "/";
if($ptnum3_1[0]) echo "$ptnum3_1[0]";
echo $ptnum3[0].") | ";
}
else {
echo "$ptnum[0] (".$ptnum2[0]."/".$ptnum1[0]."/".$ptnum3[0].") | ";
}
// 평균 포인트 출력
$daynum=3;
$recent_time3=time()-(86400*$daynum);
$recent_time=time()-86400;
$recent_post3=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."' AND reg_time>'".$recent_time3."'"));
$recent_post=mysql_fetch_array(mysql_query("select count(*) from zsdocu where to_mem='".$pt[id_no]."' AND reg_time>'".$recent_time."'"));
$recent_post1=mysql_fetch_array(mysql_query("select * from zsdocu order by reg_time DESC limit 1"));
$recent_post2=mysql_fetch_array(mysql_query("select * from zsdocu where to_mem='".$pt[id_no]."' order by reg_time DESC limit 1"));
if($recent_post3[0]) {
$fcolor="color:blue;";
$r_num="".$recent_post3[0]."";
}
if($recent_post[0]) {
$fcolor="color:#1e90ff;font-weight:bold;";
$r_num="".$recent_post[0]."/".$r_num;
}
// 평균 점수 출력
echo "".number_format($ptavg);
echo " (";
$lectnum=substr_count($find_sn[part], ",")+1;
if(strstr($find_sn[part], 'out')) $lectnum--;
echo $lectnum;
echo "강좌) | ";
// 마스터 로그인 시 총점 출력
if($_SESSION[zsPART]=='all') {
if($recent_post3[0]) $ptcolor="color:#00f;";
if($recent_post[0]) $ptcolor="color:#1e90ff;font-weight:bold;";
if($recent_post1[reg_time]==$recent_post2[reg_time]) $ptcolor="color:red;font-weight:bold;";
echo "$r_num ".number_format($zpt);
echo " | ";
}
// LOG 나타내기
if($_SESSION[zsPART]=='all') {
if($find_sn[log]>(time()-(86400*3))) $logcolor="color:red;font-weight:bold;";
else if($find_sn[log]>(time()-(86400*10))) $logcolor="color:blue;font-weight:bold;";
else if($find_sn[log]>(time()-(86400*30))) $logcolor="font-weight:bold;";
else $logcolor="";
echo "".date("Ymd H:i:s", $find_sn[log]);
echo " | ";
}
echo "
";
// 변수 초기화
$num++;
$trstyle="";
$lastrecord1="";
$lastrecord2="";
$lastrecord3="";
$fcolor="";
$r_num="";
$ptcolor="";
}
echo "