//echo "" ;
header('Content-Type: text/html; charset=tis-620');
echo "";
include('db_config.php');
$max=78; $max2=60;
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
เลือกสถานศึกษาในเครือข่าย สหวิทยาเขตอนุบาล จ.ศรีสะเกษ
ที่ |
สถานศึกษา |
สพป. |
สมัครแล้ว (คน) |
ร้อยละ |
TH;
$rw=1; $total=0; $tpc=0; $tp=0;
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]==s302) {
// $prec=number_format($nst*100/$max2,2,".",",");
// } else {
$prec=number_format($nst*100/$max,2,".",",");
// }
if ($prec==0) {
$prec='-';
$col='#ffecff';
} elseif ($prec>0) {
$col='#fed5c2';
}
if ($db0[nstd]==$max) {
$col='#E1FFE1';
} elseif ($db[scode]==s57 and $nst==$max2) {
$col='#E1FFE1';
}
echo <<
$rw |
$db[sname] |
$db[scgrp] |
$nst |
$prec |
TB;
$rw++; $total+=$nst ;;
}
$ttt=($max * ($rw-2)) + $max2*1;
$tp=number_format($total*100/$ttt,2,".",",");
$total=number_format($total,0,".",",");
echo "รวม |
$total | $tp | ";
echo " ";
?>
|