Viewing file: showSendDocToPs_old.php (26.25 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<html>
<head>
<script language="javascript" src="../source/calendarDateInput.js"></script>
<script language="javascript">
function select_checkAll(){
if(document.getElementById("checkAll").checked==true){
iselect=document.getElementById("iselect").value;
for(i=1;i<=iselect;i++){
if(document.getElementById("mydept").value==i){
document.getElementById("select1["+i+"]").checked = false;
}else{
document.getElementById("select1["+i+"]").checked = true;
}
}
iselect2=document.getElementById("iselect2").value;
for(i=1;i<=iselect2;i++){
if(document.getElementById("mydept2").value==i){
document.getElementById("select2["+i+"]").checked = false;
}else{
document.getElementById("select2["+i+"]").checked = true;
}
}
iselect3=document.getElementById("iselect3").value;
for(i=1;i<=iselect3;i++){
if(document.getElementById("mydept3").value==i){
document.getElementById("select3["+i+"]").checked = false;
}else{
document.getElementById("select3["+i+"]").checked = true;
}
}
iselect4=document.getElementById("iselect4").value;
for(i=1;i<=iselect4;i++){
if(document.getElementById("mydept4").value==i){
document.getElementById("select4["+i+"]").checked = false;
}else{
document.getElementById("select4["+i+"]").checked = true;
}
}
iselect5=document.getElementById("iselect5").value;
for(i=1;i<=iselect5;i++){
if(document.getElementById("mydept5").value==i){
document.getElementById("select5["+i+"]").checked = false;
}else{
document.getElementById("select5["+i+"]").checked = true;
}
}
document.getElementById("NocheckAll").checked = false;
}else{
/*
iselect=document.getElementById("iselect").value;
for(i=1;i<=iselect;i++){
document.getElementById("select1["+i+"]").checked = false;
}
iselect2=document.getElementById("iselect2").value;
for(i=1;i<=iselect2;i++){
document.getElementById("select2["+i+"]").checked = false;
}
iselect3=document.getElementById("iselect3").value;
for(i=1;i<=iselect3;i++){
document.getElementById("select3["+i+"]").checked = false;
}
iselect4=document.getElementById("iselect4").value;
for(i=1;i<=iselect4;i++){
document.getElementById("select4["+i+"]").checked = false;
}
iselect5=document.getElementById("iselect5").value;
for(i=1;i<=iselect5;i++){
document.getElementById("select5["+i+"]").checked = false;
}
*/
}
return true;
}
function select_checkAll2(){
if(document.getElementById("checkAll").checked==true){
iselect=document.getElementById("iselect").value;
for(i=1;i<=iselect;i++){
if(document.getElementById("mydept").value==i){
document.getElementById("select1["+i+"]").checked = false;
}else{
if(document.getElementById("select1["+i+"]").value==""){
document.getElementById("select1["+i+"]").checked = false;
}else{
document.getElementById("select1["+i+"]").checked = true;
}
}
}
document.getElementById("NocheckAll").checked = false;
}else{
/*
iselect=document.getElementById("iselect").value;
for(i=1;i<=iselect;i++){
document.getElementById("select1["+i+"]").checked = false;
}
*/
}
return true;
}
function select_checkAllPs(){
if(document.getElementById("checkAllPs").checked==true){
iselectps=document.getElementById("iselectps").value;
for(i=1;i<=iselectps;i++){
document.getElementById("selectPs["+i+"]").checked = true;
}
document.getElementById("NocheckAllPs").checked = false;
}else{
/*
iselectps=document.getElementById("iselectps").value;
for(i=1;i<=iselectps;i++){
document.getElementById("selectPs["+i+"]").checked = false;
}
*/
}
}
function select_NocheckAllPs(){
if(document.getElementById("NocheckAllPs").checked==true){
iselectps=document.getElementById("iselectps").value;
for(i=1;i<=iselectps;i++){
document.getElementById("selectPs["+i+"]").checked = false;
}
document.getElementById("checkAllPs").checked = false;
}
}
function select_checkAllPsSec(){
if(document.getElementById("checkAllPsSec").checked==true){
iselectpsSec=document.getElementById("iselectpsSec").value;
for(i=1;i<=iselectpsSec;i++){
document.getElementById("selectPsSec["+i+"]").checked = true;
}
document.getElementById("NocheckAllPsSec").checked = false;
}else{
/*
iselectpsSec=document.getElementById("iselectpsSec").value;
for(i=1;i<=iselectpsSec;i++){
document.getElementById("selectPsSec["+i+"]").checked = false;
}
*/
}
}
function select_NocheckAllPsSec(){
if(document.getElementById("NocheckAllPsSec").checked==true){
iselectpsSec=document.getElementById("iselectpsSec").value;
for(i=1;i<=iselectpsSec;i++){
document.getElementById("selectPsSec["+i+"]").checked = false;
}
document.getElementById("checkAllPsSec").checked = false;
}
}
function select_NocheckAll(){
if(document.getElementById("NocheckAll").checked==true){
iselect=document.getElementById("iselect").value;
if(iselect){
for(i=1;i<=iselect;i++){
document.getElementById("select1["+i+"]").checked = false;
}
}
iselect2=document.getElementById("iselect2").value;
if(iselect2){
for(i=1;i<=iselect2;i++){
document.getElementById("select2["+i+"]").checked = false;
}
}
iselect3=document.getElementById("iselect3").value;
if(iselect3){
for(i=1;i<=iselect3;i++){
document.getElementById("select3["+i+"]").checked = false;
}
}
iselect4=document.getElementById("iselect4").value;
if(iselect4){
for(i=1;i<=iselect4;i++){
document.getElementById("select4["+i+"]").checked = false;
}
}
iselect5=document.getElementById("iselect5").value;
if(iselect5){
for(i=1;i<=iselect5;i++){
document.getElementById("select5["+i+"]").checked = false;
}
}
document.getElementById("checkAll").checked = false;
}
}
function NocheckAll1(){
iselectps=document.getElementById("iselectps").value;
var k=0; var j=0;
for(i=1;i<=iselectps;i++){
if(document.getElementById("selectPs["+i+"]").checked == false){
k++;
}
if(document.getElementById("selectPs["+i+"]").checked == true){
j++;
}
}
if(k!=0){
document.getElementById("checkAllPs").checked = false;
}else{
document.getElementById("NocheckAllPs").checked = false;
}
if(j!=0){
document.getElementById("NocheckAllPs").checked = false;
}else{
document.getElementById("checkAllPs").checked = false;
}
}
function NocheckAll2(){
var k=0; var j=0;
iselect=document.getElementById("iselect").value;
if(iselect){
for(i=1;i<=iselect;i++){
if(document.getElementById("select1["+i+"]").checked == true){
k++;
}
if(document.getElementById("select1["+i+"]").checked == false){
j++;
}
}
}
iselect2=document.getElementById("iselect2").value;
if(iselect2){
for(i=1;i<=iselect2;i++){
if(document.getElementById("select2["+i+"]").checked == true){
k++;
}
if(document.getElementById("select2["+i+"]").checked == false){
j++;
}
}
}
iselect3=document.getElementById("iselect3").value;
if(iselect3){
for(i=1;i<=iselect3;i++){
if(document.getElementById("select3["+i+"]").checked == true){
k++;
}
if(document.getElementById("select3["+i+"]").checked == false){
j++;
}
}
}
iselect4=document.getElementById("iselect4").value;
if(iselect4){
for(i=1;i<=iselect4;i++){
if(document.getElementById("select4["+i+"]").checked == true){
k++;
}
if(document.getElementById("select4["+i+"]").checked == false){
j++;
}
}
}
iselect5=document.getElementById("iselect5").value;
if(iselect5){
for(i=1;i<=iselect5;i++){
if(document.getElementById("select5["+i+"]").checked == true){
k++;
}
if(document.getElementById("select5["+i+"]").checked == false){
j++;
}
}
}
if(k!=0){
document.getElementById("NocheckAll").checked = false;
}
if(j!=0){
document.getElementById("checkAll").checked = false;
}
}
</script>
<? extract ($_REQUEST); ?>
<?
$oRstt->searchHaveSendDoc2($searchDoc);
while($oRstt->GetRecord()){
$ReceivedMyDoc[$oRstt->DlcID]='1';
//echo $oRstt->DlcID.'-'.$ReceivedMyDoc[$oRstt->DlcID];
//echo '<br>';
}
?>
<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%" 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 bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>">
<td height="20" valign="top" colspan="3" align="right"><a onClick = "showpopuppswork()" style="cursor:pointer;"><font color="#FF3300">[<img src="../picture/inputSecTQ.gif" border="0" >คลิกดูรายชื่อผู้บังคับบัญชาที่ปฏิบัติงานอยู่]</font></a></td>
</tr>
<? $resultsendall=SearchSendAll($oDlc->DlpID); ?>
<tr height=22 width="100%" align="center" >
<td align="center" colspan="3" valign="top" bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>">
<div style="overflow: auto; height: 120px; width: 100%; vertical-valign: top">
<table bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>" width="94%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr bgcolor="#F2F2F2"><td align="left"> <input name="checkAll" id="checkAll" type="checkbox" value="1" <? if($checkAll=="1"){ echo "checked";}?> <? if(($resultsendall!="All" && $oSys->sendAllDeptUp!="Y" && $oSys->sendAllDeptUpLevel1!="Y") || ($resultsendall=="All" && $oSys->sendAllDeptDown!="Y")){ echo "onClick=\"return select_checkAll();\""; }else{ echo "onClick=\"return select_checkAll2();\""; } ?>>
<font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">เลือกส่งให้สารบรรณของทุกหน่วยงานย่อย</font><br>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" size="2">(ยกเว้นหน่วยงานย่อยของตนเอง)</font><br> <input name="NocheckAll" id="NocheckAll" type="checkbox" value="1" onClick="return select_NocheckAll();">ยกเลิกทั้งหมด</td></tr>
<?
if(($resultsendall!="All" && $oSys->sendAllDeptUp!="Y" && $oSys->sendAllDeptUpLevel1!="Y") || ($resultsendall=="All" && $oSys->sendAllDeptDown!="Y")){
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$oDPt->SearchByShowselectdoc($oDlc->deptId);
$oDPt->GetRecord();
if($oDPt->deptParentId==0){
$oDPt2->RSmenuByDeptParent2($oDPt->deptParentId);
$iselect=1;
while($oDPt2->GetRecord()){
$pssend=ShowSendtoPs2($oDPt2->deptId);
if($pssend!=''){ ?>
<tr><td>
<? if($pssend!=""){?>
<input name="mainDepts[<? echo $oDPt2->deptId; ?>]" type="radio" value="<? echo $pssend; ?>" id="mainDepts<? echo $pssend; ?>" ><? }else{ echo " "; }?>
<input name="deptPs[<? echo $oDPt2->deptId; ?>]" id="select1[<? echo $iselect;?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt2->deptId]!=$deptPs[$oDPt2->deptId]){ echo "checked";}?> onClick="return NocheckAll2();">
<? if($oDlc->deptId==$oDPt2->deptId){ $mydept=$iselect; }?>
<?
$nextpssend=searchnextpssend($pssend,$oDPt2->deptId);
if($ReceivedMyDoc[$pssend]=='1' || $ReceivedMyDoc[$nextpssend]=='1'){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<?
$oDlc4->SearchByKey($pssend); $oDlc4->GetRecord();
$oPS2->SearchByKey($oDlc4->personId); $oPS2->GetRecord();
echo "$oDPt2->deptName";
?>
<input name="deptPssend[<? echo $oDPt2->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>">
<?
//------my child-------
if($DlcdeptId==$oDPt2->deptId){
$oDPt3->RSmenuByDeptParent2($oDPt2->deptId);
$iselect2=1;
while($oDPt3->GetRecord()){
$pssend=ShowSendtoPs2($oDPt3->deptId);
if($pssend!=''){
?>
<tr><td>
<? if($pssend!=""){?>
<input name="mainDepts" type="radio" value="<? echo $pssend; ?>" id="mainDepts<? echo $pssend; ?>" ><? }else{ echo " "; }?>
<input name="deptPs[<? echo $oDPt3->deptId; ?>]" id="select2[<? echo $iselect2;?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt3->deptId]!=$deptPs[$oDPt3->deptId]){ echo "checked";}?> onClick="return NocheckAll2();">
<? if($oDlc->deptId==$oDPt3->deptId){ $mydept2=$iselect2; }?>
<? $nextpssend=searchnextpssend($pssend,$oDPt3->deptId);
if($ReceivedMyDoc[$pssend]=='1' || $ReceivedMyDoc[$nextpssend]=='1'){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<?
$oDlc5->SearchByKey($pssend); $oDlc5->GetRecord();
$oPS2->SearchByKey($oDlc5->personId); $oPS2->GetRecord();
echo " <b>$oDPt3->deptName</b>";
// [".GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName."]"; //echo "deptPs=".$pssend." deptPssend=".$oDlc4->personId;?>
<input name="deptPssend[<? echo $oDPt3->deptId; ?>]" type="hidden" value="<? echo $oDlc5->personId; ?>">
</td></tr>
<? $iselect2++; } } }
$iselect++;
} //if*/
} //while
}else{ //-----------have deptparent
$oDPt2->SearchByKey($oDPt->deptParentId);
$oDPt2->GetRecord();
$pssend=ShowSendtoPs2($oDPt2->deptId);
$iselect3=1;
if($pssend!=''){
?>
<tr><td>
<? if($pssend!=""){?>
<input name="mainDepts" type="radio" value="<? echo $pssend; ?>" id="mainDepts<? echo $pssend; ?>" ><? }else{ echo " "; }?>
<input name="deptPs[<? echo $oDPt2->deptId; ?>]" id="select3[<? echo $iselect3;?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt2->deptId]!=$deptPs[$oDPt2->deptId]){ echo "checked";}?> onClick="return NocheckAll2();">
<? if($oDlc->deptId==$oDPt2->deptId){ $mydept3=$iselect3; }?>
<? $nextpssend=searchnextpssend($pssend,$oDPt2->deptId);
if($ReceivedMyDoc[$pssend]=='1' || $ReceivedMyDoc[$nextpssend]=='1'){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<?
$oDlc4->SearchByKey($pssend); $oDlc4->GetRecord();
$oPS2->SearchByKey($oDlc4->personId); $oPS2->GetRecord();
echo "$oDPt2->deptName";
// [".GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName."]"; //echo "deptPs=".$pssend." deptPssend=".$oDlc4->personId; ?>
<input name="deptPssend[<? echo $oDPt2->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>">
</td></tr>
<? $iselect3++;}
$oDPt3->RSmenuByDeptParent2($oDPt2->deptId);
$iselect4=1;
while($oDPt3->GetRecord()){
$pssend=ShowSendtoPs2($oDPt3->deptId);
if($pssend!=''){
?>
<tr><td>
<? if($pssend!=""){?>
<input name="mainDepts" type="radio" value="<? echo $pssend; ?>" id="mainDepts<? echo $pssend; ?>" ><? }else{ echo " "; }?>
<input name="deptPs[<? echo $oDPt3->deptId; ?>]" id="select4[<? echo $iselect4;?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt3->deptId]!=$deptPs[$oDPt3->deptId]){ echo "checked";}?> onClick="return NocheckAll2();">
<? if($oDlc->deptId==$oDPt3->deptId){ $mydept4=$iselect4; }?>
<? $nextpssend=searchnextpssend($pssend,$oDPt3->deptId);
if($ReceivedMyDoc[$pssend]=='1' || $ReceivedMyDoc[$nextpssend]=='1'){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<?
$oDlc4->SearchByKey($pssend); $oDlc4->GetRecord();
$oPS2->SearchByKey($oDlc4->personId); $oPS2->GetRecord();
echo " <b>$oDPt3->deptName</b>";
// [".GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName."]"; //echo "deptPs=".$pssend." deptPssend=".$oDlc4->personId;?>
<input name="deptPssend[<? echo $oDPt3->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>">
</td></tr>
<?
if($oDPt3->deptId==$oDPt->deptId){
$oDPt4->RSmenuByDeptParent2($oDPt3->deptId);
$iselect5=1;
while($oDPt4->GetRecord()){
$pssend=ShowSendtoPs2($oDPt4->deptId);
if($pssend!=''){
?>
<tr><td>
<? if($pssend!=""){?>
<input name="mainDepts" type="radio" value="<? echo $pssend; ?>" id="mainDepts<? echo $pssend; ?>" ><? }else{ echo " "; }?>
<input name="deptPs[<? echo $oDPt4->deptId; ?>]" id="select5[<? echo $iselect5;?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt4->deptId]!=$deptPs[$oDPt4->deptId]){ echo "checked";}?> onClick="return NocheckAll2();">
<? if($oDlc->deptId==$oDPt4->deptId){ $mydept5=$iselect5; }?>
<? $nextpssend=searchnextpssend($pssend,$oDPt4->deptId);
if($ReceivedMyDoc[$pssend]=='1' || $ReceivedMyDoc[$nextpssend]=='1'){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<?
$oDlc4->SearchByKey($pssend); $oDlc4->GetRecord();
$oPS2->SearchByKey($oDlc4->personId); $oPS2->GetRecord();
echo " $oDPt4->deptName";
// [".GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName."]"; //echo "deptPs=".$pssend." deptPssend=".$oDlc4->personId; ?>
<input name="deptPssend[<? echo $oDPt4->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>">
</td></tr>
<?
$iselect5++; }
}
}
$iselect4++; }
}
}
?>
<input name="iselect" type="hidden" id="iselect" value="<? echo $iselect-1; ?>">
<input name="iselect2" type="hidden" id="iselect2" value="<? echo $iselect2-1; ?>">
<input name="iselect3" type="hidden" id="iselect3" value="<? echo $iselect3-1; ?>">
<input name="iselect4" type="hidden" id="iselect4" value="<? echo $iselect4-1; ?>">
<input name="iselect5" type="hidden" id="iselect5" value="<? echo $iselect5-1; ?>">
<input name="mydept" type="hidden" id="mydept" value="<? echo $mydept; ?>">
<input name="mydept2" type="hidden" id="mydept2" value="<? echo $mydept2; ?>">
<input name="mydept3" type="hidden" id="mydept3" value="<? echo $mydept3; ?>">
<input name="mydept4" type="hidden" id="mydept4" value="<? echo $mydept4; ?>">
<input name="mydept5" type="hidden" id="mydept5" value="<? echo $mydept5; ?>">
<?
}else{ //send all
$oDPt->RSMainDepartment(); //deptParentId=0
$iselect=1;
while($oDPt->GetRecord()){
$pssend='';
$pssend=ShowSendtoPs2($oDPt->deptId);
?>
<? if($pssend!=''){ ?>
<tr><td> <input name="mainDepts" type="radio" value="<? echo $pssend; ?>" id="mainDepts<? echo $pssend; ?>" >
<input name="deptPs[<? echo $oDPt->deptId; ?>]" id="select1[<? echo $iselect;?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($pssend==''){ echo 'disabled'; }?> onClick="return NocheckAll2();">
<? if($oDlc->deptId==$oDPt->deptId){ $mydept=$iselect; }?>
<? $nextpssend=searchnextpssend($pssend,$oDPt->deptId);
if($ReceivedMyDoc[$pssend]=='1' || $ReceivedMyDoc[$nextpssend]=='1'){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<?
echo $oDPt->deptName;
?>
</td></tr>
<? }else{ ?> <input name="deptPs[<? echo $oDPt->deptId; ?>]" id="select1[<? echo $iselect;?>]" type="hidden" value="<? echo $pssend; ?>" ><? }?>
<? //edit
if(($resultsendall!="All" && $oSys->sendAllDeptUpLevel1!="Y") || ($resultsendall!="All" && $oSys->sendAllDeptUpLevel1=="Y" && $oDPt->deptId==SearchdeptIdlevel0($oDlc->deptId)) || ($resultsendall=="All")){
$oDPt2->RSmenuByDeptParent2($oDPt->deptId);
while($oDPt2->GetRecord()){
$iselect++;
showDeptForSend($oDPt2->deptId,$iselect,$oDlc->deptId,$searchDoc);
}
}
$iselect++;
}
?>
<input name="iselect" type="hidden" id="iselect" value="<? echo $iselect-1; ?>">
<input name="mydept" type="hidden" id="mydept" value="<? echo $mydept; ?>">
<input name="maindept" type="hidden" value="1">
<input name="iselect2" type="hidden" id="iselect2" value="">
<input name="iselect3" type="hidden" id="iselect3" value="">
<input name="iselect4" type="hidden" id="iselect4" value="">
<input name="iselect5" type="hidden" id="iselect5" value="">
<?
} //case send all
?>
</table>
</div>
</td>
</tr>
<tr height=22>
<td height=22 bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" colspan="3"> <strong>ส่งให้บุคลากรที่อยู่ในหน่วยงานของท่านเป็นหลัก</strong></td>
</tr>
<tr><td colspan="3">
<div style="overflow: auto; height: 120px; width: 100%;">
<table bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>" width="94%" border=0>
<tr bgcolor="#F2F2F2"><td colspan="2" align="right"> <input name="checkAllPs" id="checkAllPs" type="checkbox" value="1" <? if($checkAllPs=="1"){ echo "checked";}?> onClick="return select_checkAllPs();"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">เลือกทั้งหมด <input name="NocheckAllPs" id="NocheckAllPs" type="checkbox" value="1" onClick="return select_NocheckAllPs();">ยกเลิกทั้งหมด</font></td></tr>
<input name="deptId" type="hidden" value="<? echo $DlcdeptId; ?>">
<input name="mainPs" type="hidden" value="0" id="mainPs0" onClick="radioSelectType('0')">
<? $oPS2->SearchByDeptIdadminId($DlcdeptId);
$iselectps=1;
while($oPS2->GetRecord()){
?>
<tr>
<td width="10%" valign="top">
<input name="mainPs" type="radio" value="<? echo $oPS2->personId; ?>" id="mainPs[<? echo $oPS2->personId; ?>]" onClick="radioSelectType('<? echo $oPS2->personId; ?>')" <? if($mainPsselect==$oPS2->personId){ echo "checked"; ?><? }?>></td>
<td width="90%" valign="top"><input name="Ps[<? echo $oPS2->personId; ?>]" type="checkbox" id="selectPs[<? echo $iselectps;?>]" value="1" <? if(($Pss[$oPS2->personId]!=$Ps[$oPS2->personId]) || ($mainPsselect==$oPS2->personId) ){ echo "checked";}?> onClick="return NocheckAll1();">
<? $oRs10->searchHaveSendDocps($oPS2->personId,$searchDoc); if($oRs10->GetRecord()==1){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<? echo GetPrefix($oPS2->prefixId).$oPS2->fName." ".$oPS2->lName; ?></td>
</tr>
<? $iselectps++; } ?>
<input name="iselectps" type="hidden" id="iselectps" value="<? echo $iselectps-1; ?>">
</table>
</div>
</td></tr>
<? //////////////////////////////////////////////////////////////////////////////////////////////// ?>
<? $oPSd->SearchBydeptId($DlcdeptId);
$countPSd=$oPSd->NumRow();
if($countPSd!="" && $countPSd!="0"){
?>
<tr height=22>
<td height=22 bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_16"]; ?>" colspan="3"> <strong>ส่งให้บุคลากรที่อยู่ในหน่วยงานของท่านเป็นงานรอง</strong></td>
</tr>
<tr><td colspan="3">
<div style="overflow: auto; height: 120px; width: 100%;">
<table bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_17"]; ?>" width="94%" >
<tr bgcolor="#F2F2F2"><td colspan="2" align="right"> <input name="checkAllPsSec" id="checkAllPsSec" type="checkbox" value="1" <? if($checkAllPsSec=="1"){ echo "checked";}?> onClick="return select_checkAllPsSec();"><font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>">เลือกทั้งหมด <input name="NocheckAllPsSec" id="NocheckAllPsSec" type="checkbox" value="1" onClick="return select_NocheckAllPsSec();">ยกเลิกทั้งหมด</font></td></tr>
<?
$iselectpsSec=1;
while($oPSd->GetRecord()){
$oPS->SearchByKey($oPSd->personId);
$oPS->GetRecord();
?>
<tr>
<td width="10%" valign="top">
<input name="mainPs" type="radio" value="<? echo $oPSd->personId; ?>" id="mainPs[<? echo $oPSd->personId; ?>]" onClick="radioSelectType('<? echo $oPSd->personId; ?>')" <? if($mainPsselect==$oPSd->personId){ echo "checked"; ?><? }?>>
</td>
<td valign="top">
<? //echo "[".$oPSd->personId."]"; ?><input name="Ps[<? echo $oPSd->personId; ?>]" type="checkbox" value="1" id="selectPsSec[<? echo $iselectpsSec;?>]" <? if(($Pss[$oPSd->personId]!=$Ps[$oPSd->personId]) || ($mainPsselect==$oPSd->personId) ){ echo "checked";}?>>
<? $oRs10->searchHaveSendDocps($oPSd->personId,$searchDoc); if($oRs10->GetRecord()==1){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?>
<? echo GetPrefix($oPS->prefixId).$oPS->fName." ".$oPS->lName; ?></td>
</tr>
<? $iselectpsSec++; } ?>
<input name="iselectpsSec" type="hidden" id="iselectpsSec" value="<? echo $iselectpsSec-1; ?>">
</table>
</div>
</td></tr><? } ?>
</table>
</body>
</html>
<script>
function showpopuppswork(p){
FileName = "showPsWorkTable.php";
var w=450;
var h=300;
strOption = "scrollbars=yes,left=600,top=20,menubar=0,width=" + w + ",height=" + h;
window.open(FileName,"",strOption);
}
</script>
|