";
while ($db=mysql_fetch_array($result)) {
$sql1="select * from $_act where act_type='1' and act_std='$db[std_id]'
group by act_target order by act_target";
$result1=mysql_query($sql1);
$rw=0; $act='';
while ($db1=mysql_fetch_array($result1)) {
$act.="$db1[act_target],";
$rw++;
}
if ($rw==0) { $cl='red'; $less=''; $rw='-'; } else { $cl=''; $less='บทที่'; }
echo "