<?php
session_start
();

 if (
session_is_registered("valid_user")&&session_is_registered("Priority") )
 {
include(
"../include/FunctionDB.php");
include(
"admin_menu.php");
ConnectDB();
$sql "Select * From personal_tb Where Degree_code='$Degree_code' Order  By  Teacher_id  ASC ";
$result mysql_query($sql) or die(" Error").mysql_error();
$num mysql_num_rows($result);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">

<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {
    font-size: 14px;
    font-family: Tahoma;
}
.style4 {
    color: #0000FF;
    font-weight: bold;
    font-size: 16px;
}
.style5 {font-size: 14px}
.style6 {
    color: #FF0000;
    font-weight: bold;
    font-size: 16px;
}
-->
</style>
<table width="814" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="814"><br />
        <fieldset>
        <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="Menu_Develop.php" >หน้าหลัก</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="PersonalData.php?Teacher_code=<? echo $rs[Teacher_code?>">ข้อมูลส่วนตัวบุลากร</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="EducationData.php?Teacher_code=<? echo $rs[Teacher_code?>">ข้อมูลวุฒิบุคลากร</a><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" />รายชื่ออาจารย์</font></legend>
          <label></label>
        <div align="center">
          <form id="form1" name="form1" method="post" action="InsertSalary.php">
            <p align="left"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()"  width="85" height="22" border="0" /></font></p>
            <table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC" style="border:0px solid gray">
              
              <tr bgcolor="#EEEEEE">
                <td width="45" align="center" style="border:1px solid gray"><strong><font color="#003399" size="2" face="Tahoma">ลำดับ</font></strong></td>
                <td width="237" align="center" style="border:1px solid gray"><strong><font color="#003399" size="2" face="Tahoma">ชื่อ-นามสกุล</font></strong></td>
                <td width="240" align="center" style="border:1px solid gray"><strong><font color="#003399" size="2" face="Tahoma">ตำแหน่งทางราชการ</font></strong></td>
                <td width="263" align="center" style="border:1px solid gray"><strong><font color="#003399" size="2" face="Tahoma">ตำแหน่งทางการบริหาร</font></strong></td>
              </tr>
              <?
$i 
1;
 while(
$rs mysql_fetch_array($result))
 {

     if(
$count==0)
     {
?>
              <tr bgcolor="#FFFFFD">
                <td height="21" align="center" bgcolor="#F7F5EC"><font size="2" face="Tahoma"><? echo $i?></font></td>
                <td bgcolor="#F7F5EC"><font size="2" face="Tahoma"> <a href="PersonalDetail.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d"> <? echo $rs[First_name]?> <? echo $rs[Teacher_name]?> <? echo $rs[Teacher_lastname]?></a></font></td>
                <td bgcolor="#F7F5EC"><font size="2" face="Tahoma"><? echo $rs[Gover_pos]?></font></td>
                <td bgcolor="#F7F5EC"><font size="2" face="Tahoma"><? echo $rs[Manage_pos]?></font></td>
              </tr>
              <?
    $count
=1;
     }
else
{
?>
              <tr bgcolor="#FFFFFF">
                <td align="center"><font size="2" face="Tahoma"><? echo $i?></font></td>
                <td><font size="2" face="Tahoma"> <a href="PersonalDetail.php?Teacher_code=<? echo $rs[Teacher_code]?>" class="d"> <? echo $rs[First_name]?> <? echo $rs[Teacher_name]?> <? echo $rs[Teacher_lastname]?></a></font></td>
                <td><font size="2" face="Tahoma"><? echo $rs[Gover_pos]?></font></td>
                <td><font size="2" face="Tahoma"><? echo $rs[Manage_pos]?></font></td>
              </tr>
              <?
$count
=0;
}
$i++;
 }    
?>
              <tr bgcolor="#EEEEEE">
                <td colspan="4" align="center"><div align="center"><font color="#FF0000" size="2" face="Tahoma">ทั้งหมด <? echo $num ?> คน&nbsp;</font></div></td>
              </tr>
            </table>
          </form>
        </div>
      </fieldset>
      <br />
        <font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br />
    </font></td>
  </tr>
</table>
<?php 
    
}
else
{
       echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
       echo
"Please Login ";
}
?>