";
$rw=1; $tt1=0; $tt2=0;
while ($db=mysql_fetch_array($result)) {
$kgp=$db[ef_grp];
$sql1="select * from $_data,$_act
where kd_code=kp_code and kp_cd='$kgp' group by kp_code,kp_grp";
$result1=mysql_query($sql1);
$res=mysql_num_rows($result1);
$pc=number_format($res*100/$db[ef_act],2,".",",");
if ($res>0) { $res=$res; } else { $res='-'; }
echo "