Viewing file:      confirmCopyTimeTable.php (3.92 KB)      -rw-r--r-- Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
 include_once "template.php";
 showHeader();
 include_once "../class/clsOfficer.php";
 include_once "../class/clsSysSemesterDes.php";
 include_once "../class/clsClass.php";
 include_once "../class/clsrg_OFSetTT.php";
 
 confirmSubmit();
 
 $conn = new Connection();
 
 $oOf = new Officer();
 $oSse = new SysSemesterDes();
 $oCl1 = new Class1();
 $oCl2 = new Class1();
 $oOst = new rg_OFSetTT();
 
 $oOf->SearchByOfficerCode($oU->userPsCodeReg);
 $oOf->GetRecord();
 ?>
 <meta http-equiv="Content-Type" content="text/html; charset=tis-620">
 <script>
 function changeAcYAndSe(acY, se) {
     f = document.pc;
     
     if(confirm("คุณต้องการยืนยันภาระงานสอน !!\n\nเมื่อกดปุ่ม OK แล้ว จะทำการยืนยันทันที โดยที่จะไม่สามารถเปลี่ยนแปลงได้อีก\nถ้ายืนยัน ให้กดปุ่ม OK")) {
         f.acadYear.value = acY;
         f.semester.value = se;
         
         return true;
     }
     else
         return false;
 }
 </script>
 <table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
     <tr>
         <td><br><fieldset>
             <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="adminIndex.php?mm=1">ภาระงานสอน</a> <img src="../picture/ico3.gif" align="absmiddle" border="0"> ยืนยันภาระงานสอน</font></legend>
             <label><div align="center"><br><form name="pc" method="post" action="processConfirmCopyTimeTable.php"><table width="400" align="center" border="0" cellpadding="1" cellspacing="1">
                 <tr>
                     <td colspan="4" align="center"><font size="3" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><b>ยืนยันภาระงานสอน</b></font><br><br></td>
                 </tr>
                 <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
                     <td width="40%" rowspan="2" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b>ปีการศึกษา</b></font></td>
                     <td colspan="3" height="22" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ภาคการศึกษา</b></font></td>
                 </tr>
                 <tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
 <?php
                     $oSse->RSSysSemesterDes();
                     while($oSse->GetRecord()) {
 ?>
                     <td width="20%" height="22" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b><?php echo $oSse->semester;?></b></font></td>
 <?php
                     }
 ?>
                 </tr>
 <?php
                 $i = 0;
                 $oCl1->RSClassByCTGroupAcYOrderAcYDesc();
                 while($oCl1->GetRecord()) {
                     if(($i%2) == 0)
                         echo "<tr>";
                     else
                         echo "<tr bgcolor=\"".$GLOBALS["COLOR_BG_TABLE_3"]."\">";
 ?>                                                          
                     <td align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><?php echo $oCl1->acadYear;?></font></td>
 <?php
                     $oSse->RSSysSemesterDes();
                     while($oSse->GetRecord()) {
 ?>
                     <td align="center">
 <?php
                         $oCl2->RSClassByAcYAndSeAndCtConfirmIsN($oCl1->acadYear, $oSse->semester);
                         if($oCl2->GetRecord()) {
                             $oOst->RSrg_OFSetTTByOfIdAndAcYAndTmIdAndWLIsY($oOf->officerId, $oCl1->acadYear, $oSse->semester);
                             $res = ($oOst->GetRecord()) ? '' : 'disabled';
 ?>
                     <input type="submit" name="comfirm" value="ยืนยัน" onClick="return changeAcYAndSe(<?php echo $oCl1->acadYear;?>, <?php echo $oSse->semester;?>)" <?php echo $res;?>>
 <?php
                         }
                         else
                             echo '-';
 ?>
                     </td>
 <?php
                     }
 ?>    
                 </tr>
 <?php
                     $i++;
                 }
                 
                 if($i == 0) {
 ?>
                 <tr>
                     <td colspan="4" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">** ไม่ปรากฏรายการในฐานข้อมูล **</font></td>
                 </tr>
 <?php
                 }
 ?>
                 <tr>
                     <td colspan="4"><input type="button" name="back" value="กลับเมนูหลัก" onClick="location.href = 'adminIndex.php?mm=1'">
                     <input type="hidden" name="method" value="confirm">
                     <input type="hidden" name="acadYear">
                     <input type="hidden" name="semester"></td>
                 </tr>
             </table></form></div></label>
         </fieldset><br></td>
     </tr>
 </table>
 <?php
 $oOf->Destroy();
 $oSse->Destroy();
 $oCl1->Destroy();
 $oCl2->Destroy();
 $oOst->Destroy();
 $conn->Disconnect();
 showFooter();
 ?>
  |