<html>
<head>
<script>
function select_checkAll(){
if(document.getElementById("checkAll").checked==true){
iselectps=document.getElementById("iselectps").value;
for(i=1;i<=iselectps;i++){
document.getElementById("selectPs["+i+"]").checked = true;
}
}else{
iselectps=document.getElementById("iselectps").value;
for(i=1;i<=iselectps;i++){
document.getElementById("selectPs["+i+"]").checked = false;
}
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_2"]; ?>" height=22>
<td align="left" colspan="3"> เลือกผู้รับหนังสือ</td>
</tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<td height="22" valign="bottom" colspan="2"> <strong>ส่งให้วิทยาลัย</strong></td>
<td width="7%" align="right"></td>
</tr>
<tr height=22 width="100%" align="center">
<td align="center" colspan="3">
<div style="overflow: auto; height: 200px; width: 100%;">
<table bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>" width="94%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr bgcolor="#F2F2F2"><td>
<input name="checkAll" id="checkAll" type="checkbox" value="1" <? if($checkAll=="1"){ echo "checked";}?> onClick="return select_checkAll();">
<font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">
ส่งให้ทุกวิทยาลัย</font></td></tr>
<?
$oCd->RScollegeSR($GLOBALS["COLLEGEID"]);
$iselectps=1;
while($oCd->GetRecord()){
?>
<tr><td>
<input name="collegeSR[<? echo $oCd->collegeID; ?>]" id="selectPs[<? echo $iselectps;?>]" type="checkbox" value="<? echo $oCd->collegeID; ?>">
<? echo $oCd->collegeAbbr;?>
</td></tr>
<?
$iselectps++; }
?>
<input name="iselectps" type="hidden" id="iselectps" value="<? echo $iselectps-1; ?>">
<input name="ucollegeID" type="hidden" id="ucollegeID" value="<? echo $GLOBALS["COLLEGEID"]; ?>">
</table>
</div>
</td>
</tr>
</table>
</body>
</html>