"; include('db_config.php'); $sql1="select * from $_sch where scgrp='$ceo' "; $result1=mysql_query($sql1); $db1=mysql_fetch_array($result1); $sql="select * from $_act group by kp_cd"; $result=mysql_query($sql); echo <<��ػ�š���Ѻ��Ѥ�� �¡�����������С�����¹���
����� $db1[sgrp]
TH; $rw=1; $tstd=0; while ($db=mysql_fetch_array($result)) { $sql0="select *,count(*) as nstd from $_data,$_act,$_sch where kd_code=kp_id and kd_sch=scode and kp_cd='$db[kp_cd]' and scgrp='$ceo' group by kp_cd "; $result0=mysql_query($sql0); $db0=mysql_fetch_array($result0); if (empty($db0[nstd])) { $std='-'; } else { $std=$db0[nstd]; } $sql2="select * from $_data,$_act,$_sch where kd_code=kp_id and kd_sch=scode and kp_cd='$db[kp_cd]' and scgrp='$ceo' group by kp_cd,kd_sch "; $result2=mysql_query($sql2); $db2=mysql_fetch_array($result2); $nreg=mysql_num_rows($result2); if (empty($nreg)) { $reg='-'; } else { $reg=$nreg; } echo << TB; $rw++; $tact+=$db1[nact]; $tstd+=$db0[nstd]; } echo <<
��������С�����¹��� ��.��Ѥ� �ӹǹ ��.
$rw.$db[kp_abb] $reg $std
��� $tstd
TF; ?>