header('Content-Type: text/html; charset=tis-620');
echo "";
global $id;
include('db_config.php');
$sql0="select * from eef2009_act where kp_code='$act'" ;
$result0=mysql_query($sql0);
$db0=mysql_fetch_array($result0);
$kpgrp=$db0[kp_grp];
$kpact=$db0[kp_act];
$klev=$db0[kp_level];
$sql="SELECT * FROM eef2009_data,eef2009_reg,eef2009_act
WHERE kd_code=kp_code and kd_sch=scode and kd_code='$act'
order by kd_score desc,g desc,s desc,b desc,kd_rank desc,kd_sch";
$result=mysql_query($sql);
echo "