" ; header('Content-Type: text/html; charset=tis-620'); echo ""; include('db_config.php'); $sql0="SELECT * FROM $_sch where scode='$scid' "; $result0=mysql_query($sql0); $db0=mysql_fetch_array($result0); $scn="$db0[sname] $db0[abb_sch]"; $scgrp=$db0[scgrp]; $lev=$db0[level]; //if ($lev=='p') { // $sql="SELECT * FROM $_act where eef_sc=1 order by kp_code"; //} else { $sql="SELECT * FROM $_act order by kp_cd,kp_id"; //} $result=mysql_query($sql); echo "
กิจกรรมการแข่งขันทั้งหมด โรงเรียน$scn
$_title [ กลับรายการเดิม ]"; echo ""; echo ""; $rw=1; $tst=0; $nst=0; while ($db=mysql_fetch_array($result)) { $sql2="select kd_code from $_data where kd_code='$db[kp_id]' and kd_sch='$scid' "; $result2=mysql_query($sql2); $nst=mysql_num_rows($result2); if ($nst==0) { $nst="-" ; } echo ""; $rw++; $tst+=$nst; } echo ""; echo "
ที่เลือกกิจกรรมแข่งขันที่จะสมัคร กลุ่มสาระจำนวนสมัคร
$rw $db[kp_act] $db[kp_abb]$nst
รวม $tst
[ กลับรายการเดิม ]"; include("../footer.php"); ?>