Viewing file: showSendDocToPstest.php (10.62 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once "template.php"; include_once "../class/clsTable.php"; include_once "../class/clsDepartment.php"; include_once "../class/clsPerson.php"; include_once "../link/function.php"; include_once "../link/functionshow.php"; include_once "../class/clsDocLinePosition.php"; include_once "../class/clsDocLineConfig.php"; include_once "../class/clsReceiveSendType.php"; include_once "../class/clsDocType.php"; include_once "../class/clsDocSpeedLevel.php"; include_once "../class/clsDocSecreLevel.php"; include_once "../class/clsDocattatchesTmp.php"; include_once "../class/clsDocuments.php"; include_once "../class/clsDocattatches.php"; include_once "../class/clsDocReceiveSend.php"; include_once "../class/clsProposeType.php"; include_once "funct.php"; include_once "../class/clsDocSendtoPsTmp.php"; include_once "../class/clsannounceDocType.php"; include_once "../class/clsannounceDocType.php"; include_once "getPrefix.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDP = new Department($oC); $oDP2 = new Department($oC); $oDP3 = new Department($oC); $oDP4 = new Department($oC);
$oDPt = new Department($oC); $oDPt2 = new Department($oC); $oDPt3 = new Department($oC); $oDPt4 = new Department($oC);
$oDP5 = new Department($oC); $oPS = new person($oC); $oPS2 = new person($oC); $oPS3 = new person($oC); $oPS4 = new person($oC); $oPS5 = new person($oC); $oPS6 = new person($oC); $oUG = new umgroup($oCu); $oDlc = new DocLineConfig($oC); $oDlc2 = new DocLineConfig($oC); $oDlc3 = new DocLineConfig($oC); $oDlc4 = new DocLineConfig($oC); $oDlc5 = new DocLineConfig($oC); $oDlc6 = new DocLineConfig($oC); $oDlp = new docLinePosition($oC); $oDlp1 = new docLinePosition($oC); $oDlp2= new docLinePosition($oC); $oRSt = new receiveSendType($oC); $oDt = new doctype($oC); $oDsl = new DocSpeedLevel($oC); $oDcl = new DocSecretLevel($oC); $oDtmp = new DocattatchesTmp($oC); $oDoc = new Documents($oC); $oDoc2 = new Documents($oC); $oDoc3 = new Documents($oC); $oDoc4 = new Documents($oC); $oDoc5 = new Documents($oC); $oDatt = new Docattatches($oC); $oRs = new DocReceiveSend($oC); $oRs1 = new DocReceiveSend($oC); $oRs2 = new DocReceiveSend($oC); $oRs3 = new DocReceiveSend($oC); $oRs4 = new DocReceiveSend($oC); $oRs6 = new DocReceiveSend($oC); $oRs7 = new DocReceiveSend($oC); $oRs8 = new DocReceiveSend($oC); $oRs9 = new DocReceiveSend($oC); $oRs10 = new DocReceiveSend($oC); $oPt = new ProposeType($oC); $oStmp=new DocSendToPsTmp($oC); $oAn=new announceDocType($oC); $oAn=new announceDocType($oC); $MaxDocGroup=$oDP->SearchMaxDocGroup();
doCheckAll();
$oDoc->SearchByKey($DocID); $oDoc->GetRecord(); $oDlc->SearchByKey(33); $oDlc->GetRecord(); $oRs->SearchByKey($DrsID); $oRs->GetRecord(); $DlcdeptId=$oDlc->deptId; ?> <html> <head> <script language="javascript" src="../source/calendarDateInput.js"></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: 120px; 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" type="checkbox" value="1" <? if($checkAll=="1"){ echo "checked";}?>> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>"> ส่งให้สารบรรณของทุกหน่วยงานย่อย<br> (ยกเว้นหน่วยงานย่อยของตนเอง)</font></td></tr> <? $oDPt->SearchByKey($oDlc->deptId); $oDPt->GetRecord(); if($oDPt->deptParentId==0){ $oDPt2->RSmenuByDeptParent2($oDPt->deptParentId); while($oDPt2->GetRecord()){ $pssend=ShowSendtoPs($oDPt2->deptId); if($pssend=="N"){ ?> <input name="deptPs[<? echo $oDPt2->deptId; ?>]" type="hidden" value="" <? if($deptPss[$oDPt2->deptId]!=$deptPs[$oDPt2->deptId]){ echo "checked";}?>> <? }else{ ?> <tr><td> <input name="deptPs[<? echo $oDPt2->deptId; ?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt2->deptId]!=$deptPs[$oDPt2->deptId]){ echo "checked";}?>> <? $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; $nextpssend=searchnextpssend($pssend,$oDPt2->deptId); $oRs9->searchHaveSendDoc($pssend,$nextpssend,$searchDoc); if($oRs9->GetRecord()==1){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?> <input name="deptPssend[<? echo $oDPt2->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>"> <? } } }else{ //-----------have deptparent $oDPt2->SearchByKey($oDPt->deptParentId); $oDPt2->GetRecord(); $pssend=ShowSendtoPs($oDPt2->deptId); ?> <tr><td> <input name="deptPs[<? echo $oDPt2->deptId; ?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt2->deptId]!=$deptPs[$oDPt2->deptId]){ echo "checked";}?>> <? $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; $nextpssend=searchnextpssend($pssend,$oDPt2->deptId); $oRs9->searchHaveSendDoc($pssend,$nextpssend,$searchDoc); if($oRs9->GetRecord()==1){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?> <input name="deptPssend[<? echo $oDPt2->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>"> </td></tr> <? $oDPt3->RSmenuByDeptParent2($oDPt2->deptId); while($oDPt3->GetRecord()){ $pssend=ShowSendtoPs($oDPt3->deptId); ?> <tr><td> <input name="deptPs[<? echo $oDPt3->deptId; ?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt3->deptId]!=$deptPs[$oDPt3->deptId]){ echo "checked";}?>> <? $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; $nextpssend=searchnextpssend($pssend,$oDPt3->deptId); $oRs9->searchHaveSendDoc($pssend,$nextpssend,$searchDoc); if($oRs9->GetRecord()==1){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?> <input name="deptPssend[<? echo $oDPt3->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>"> </td></tr> <? if($oDPt3->deptId==$oDPt->deptId){ $oDPt4->RSmenuByDeptParent2($oDPt3->deptId); while($oDPt4->GetRecord()){ $pssend=ShowSendtoPs($oDPt4->deptId); ?> <tr><td> <input name="deptPs[<? echo $oDPt4->deptId; ?>]" type="checkbox" value="<? echo $pssend; ?>" <? if($deptPss[$oDPt4->deptId]!=$deptPs[$oDPt4->deptId]){ echo "checked";}?>> <? $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; $nextpssend=searchnextpssend($pssend,$oDPt4->deptId); $oRs9->searchHaveSendDoc($pssend,$nextpssend,$searchDoc); if($oRs9->GetRecord()==1){?><img src="../picture/yes.gif" border="0" title="หมายถึงหน่วยงานย่อยหรือบุคลากรผู้นั้น เคยได้รับหนังสือนี้แล้ว"> <? } ?> <input name="deptPssend[<? echo $oDPt4->deptId; ?>]" type="hidden" value="<? echo $oDlc4->personId; ?>"> </td></tr> <? } } } } ?> </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%" > <tr bgcolor="#F2F2F2"><td> <input name="checkAllPs" type="checkbox" value="1" <? if($checkAllPs=="1"){ echo "checked";}?>> <font color="<?php echo $GLOBALS["COLOR_FONT_2"]; ?>"> ส่งให้ทุกคนในหน่วยงานย่อย</font></td></tr> <input name="deptId" type="hidden" value="<? echo $DlcdeptId; ?>"> <? $oPS2->SearchByDeptIdadminId($DlcdeptId); while($oPS2->GetRecord()){ ?> <tr> <td>
<input name="mainPs" type="hidden" value="0" id="mainPs0" onClick="radioSelectType('0')"> <? if($PtID!=""){ if($PtID!="1" && $PtID!="2"){ $canselect=1; } }else if($oRs->PtID!=""){ if($oRs->PtID!="1" && $oRs->PtID!="2"){ $canselect=1; } } if($canselect==1){?> <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"; ?><? }?>> <? } ?> <? //echo "[".$oPS2->personId."]"; ?><input name="Ps[<? echo $oPS2->personId; ?>]" type="checkbox" value="1" <? if(($Pss[$oPS2->personId]!=$Ps[$oPS2->personId]) || ($mainPsselect==$oPS2->personId) ){ echo "checked";}?>> <? $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> <? } ?> </table> </div> </td></tr> </table> </body> </html>
|