header('Content-Type: text/html; charset=tis-620');
echo "";
include('../header.php');
include('db_config.php');
if ($reg!='') {
$rem="where scgrp='$reg' ";
} else {
$rem='';
}
$sql="select scode,sname,scgrp from $_sch $rem order by scode" ;
$result=mysql_query($sql);
echo "
ระบบรับสมัคร
$_title
$_title2
เลือกสถานศึกษาในเครือข่าย
ที่ |
สถานศึกษา | สพป. |
สมัครแล้ว (คน) |
ร้อยละ |
";
$rw=1; $total=0; $tpc=0; $tp=0; $max=78; $max2=60;
while ($db=mysql_fetch_array($result)) {
$sc=$db[scode];
$sql0="select count(*) as nstd from $_data where kd_sch='$sc' " ;
$result0=mysql_query($sql0);
$db0=mysql_fetch_array($result0);
if ($db0[nstd]==0) {
$nst='-';
} else {
$nst=$db0[nstd];
}
if ($db[scode]==s55) {
$prec=number_format($nst*100/$max2,2,".",",");
} else {
$prec=number_format($nst*100/$max,2,".",",");
}
if ($prec==0) {
$prec='-';
$col='#FFDDFF';
} elseif ($prec>0) {
$col='#FFE8E8';
}
if ($db0[nstd]==$max) {
$col='#E1FFE1';
} elseif ($db[scode]==s55 and $nst==60) {
$col='#E1FFE1';
}
echo "
$rw |
$db[sname] |
$db[scgrp] |
$nst |
$prec |
";
$rw++; $total+=$nst ;;
}
$tstd=$max*($rw-1);
$tp=number_format($total*100/$tstd,2,".",",");
$total=number_format($total,0,".",",");
echo "รวม |
$total | $tp |
[ กลับรายการหลัก ]";
include('../footer.php');
?>