Viewing file: addSendOutDeptTable.php (5.12 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include_once("../../class/clsConnection.php"); include_once("../../class/clsDB.php"); include_once "../global.php"; include_once "../class/clsTable.php"; include_once "../class/clsDocuments.php"; include_once "../link/function.php"; include_once "../class/clsReceiveSendType.php"; include_once "../link/keyThai.php"; include_once "../class/clsCollegeDetail.php"; include_once "../class/clsCollegeUnder.php"; include_once "../class/clsQuarterCollege.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDoc = new Documents($oC); $oRSt = new receiveSendType($oC); $oCd = new collegedetail($oC);
$oCu = new collegeUnder($oC); $oQc = new quarterCollege($oC); $oCu2 = new collegeUnder($oC); $oQc2 = new quarterCollege($oC);
if($RsID==1){ $searchRsID=2; }else if($RsID==2){ $searchRsID=1; }
?> <script language="JavaScript"> function ReturnValue(showDocRef) { window.opener.document.ff.DocRef.value = showDocRef; window.close(); } </script> <html> <head> <title>ค้นหาหน่วยงานที่ต้องการส่งอิเล็กทรอนิกส์</title> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <link href="../source/style.css" rel="stylesheet" type="text/css"> </head> <body><br> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_2"];?>"> <strong><img src="../picture/official_letter.gif" border="0" > ค้นหาหน่วยงานที่ต้องการส่งอิเล็กทรอนิกส์</strong> </font></legend> <br> <form name="ff"> <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><br> <input name="NocheckAll" id="NocheckAll" type="checkbox" value="1" onClick="return select_NocheckAll();">ยกเลิกทั้งหมด</td></tr> <? $oCd->RScollegeSRordercollegeqCIDcollegecUID($GLOBALS["COLLEGEID"]); $iselectps=1; $getcollegeqCID=""; while($oCd->GetRecord()){ if($oCd->collegeqCID!=$getcollegeqCID){ $getcollegeqCID=$oCd->collegeqCID; $oQc->SearchByKey($getcollegeqCID); $oQc->GetRecord(); echo "<tr><td> <b>เครือข่าย".$oQc->quarterName."</b></td></tr>"; } ?> <tr><td> <input name="collegeSR[<? echo $oCd->collegeID; ?>]" id="selectPs[<? echo $iselectps;?>]" type="checkbox" value="<? echo $oCd->collegeAbbr; ?>" onClick="return NocheckAll2();"> <? 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> <table border="0" align="center" width="98%"> <tr bgcolor="#FFFFFF"><td align="center" colspan="2"> <input type="submit" name="selectdept" value="เลือก" onClick="selectDept()"> <input type="button" name="cancel" value="ยกเลิก" onClick="window.close();"> </td></tr> </table> <input name="RsID" type="hidden" value="<?php echo $RsID; ?>"> </form> </fieldset> </body> </html> <script type="text/javascript"> function selectDept(){ var strDept=''; iselectps=document.getElementById("iselectps").value; for(i=1;i<=iselectps;i++){ if(document.getElementById("selectPs["+i+"]").checked == true){ if(strDept==''){ strDept=document.getElementById("selectPs["+i+"]").value; }else{ strDept=strDept+','+document.getElementById("selectPs["+i+"]").value; } }
}
window.opener.document.ff.DocTo.value = strDept; window.close(); } 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; } document.getElementById("NocheckAll").checked = false; }else{
} } function NocheckAll2(){ var k=0; var j=0;
iselectps=document.getElementById("iselectps").value; if(iselectps){ for(i=1;i<=iselectps;i++){ if(document.getElementById("selectPs["+i+"]").checked == true){ k++; } if(document.getElementById("selectPs["+i+"]").checked == false){ j++; } } }
if(k!=0){ document.getElementById("NocheckAll").checked = false; } if(j!=0){ document.getElementById("checkAll").checked = false; } } function select_NocheckAll(){ if(document.getElementById("NocheckAll").checked==true){ iselectps=document.getElementById("iselectps").value; if(iselectps){ for(i=1;i<=iselectps;i++){ document.getElementById("selectPs["+i+"]").checked = false; } } document.getElementById("checkAll").checked = false; } } </script>
|