Viewing file: AbsentList_bkp.php (15.88 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user") && session_is_registered("Priority") )
{
include("../include/FunctionDB.php");
include("admin_menu.php");
ConnectDB();
$Username = $valid_user;
$strSQL1 = "SELECT * FROM personal_tb WHERE Teacher_code='$Teacher_code' ";
$result1 = mysql_query($strSQL1) or die("Error ".mysql_error());
$rss = mysql_fetch_array($result1);
//$Teacher_code = $rss[Teacher_code];
$sql2 = "SELECT * FROM history_absent_tb Where Teacher_code='$Teacher_code' and Year='$Year' ";
$result2 = mysql_query($sql2) or die(" Error").mysql_error();
$rss1 = mysql_fetch_array($result2);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
.style3 {font-size: 14px}
.style5 {font-size: 14px; color: #000000; }
-->
</style>
<table width="807" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="807"><br>
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_teacher.php " >หน้าหลัก</a><a href="Menu_History.php?Teacher_code=<? echo $rss[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="AbsentByYear.php?Teacher_code=<? echo $rss[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="EditAbsentList.php?Teacher_code=<? echo $rss[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="Add_His_Absent.php?Teacher_code=<? echo $rss[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" />ประวัติการลาประจำปีงบประมาณ</font></legend>
<label><div align="center">
<form id="form1" name="form1" method="post" action="">
<div align="left"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font>
</div>
<table width="66%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
<tr>
<td height="29" bgcolor="#FFFFFF" class="style5"><font face="Tahoma">ี้</font></td>
</tr>
<tr>
<td height="43" ><table width="97%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF" style="border:0px solid gray">
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td colspan="5" bgcolor="#FFFFFF"><div align="center"> <div align="center"><span class="d style1 style3"><font face="Tahoma">ประวัติการลา <? echo $rs['Teacher_name'] ?> <? echo $rs['Teacher_lastname'] ?> ประจำปีงบประมาณ </font></span><font size="2" face="Tahoma"><font color="#003399"><? echo $Year?></font></font></div>
<div align="center"></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail_bkp.php?Absent_code=01&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=200')"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td width="4%" bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><img src="../picture/ico1.gif" width="22" height="22" align="absmiddle" /></strong></font></div></td>
<td width="29%" bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail_bkp.php?Absent_code=01&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=200')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลากิจ </a></font></td>
<td width="16%" bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><a href="AddAbsent01.php?Absent_code=01&Year=<? echo $rss1[Year];?>"><img src="../picture/add.gif" width="16" height="16" border="0" align="absmiddle" /></a></strong></font></div></td>
<td width="24%" bgcolor="#FFFFFF"> </td>
<td width="27%" bgcolor="#FFFFFF"><div align="center"><font size="4" face="Tahoma"> </font><font size="4" face="Tahoma">
<?php
$code = $rss["Teacher_code"];
$sql2 = "Select * From history_absent_tb Where Teacher_code='$Teacher_code' and Absent_code='01' and Year='$Year' ";
$result2 = mysql_query($sql2) or die(" Error".mysql_error());
$rc2 = mysql_num_rows($result2);
if ( $rc2 == 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#FF0000\">";
echo"ยังไม่ข้อมูล";
echo"</font>";
}
else if ($rc2 > 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#006633\">";
echo"$rc2 <font face=\"Tahoma\" Size=\"2\" color=\"#000000\">ระเบียน</font>";
echo"</font>";
}
?>
</font></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><img src="../picture/ico1.gif" width="22" height="22" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail_bkp.php?Absent_code=02&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=200')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาป่วย</a></font></td>
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><a href="AddAbsent02.php?Absent_code=02&Year=<? echo $rss1[Year];?>"><img src="../picture/add.gif" width="16" height="16" border="0" align="absmiddle" /></a></strong></font></div></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><div align="center"><font size="4" face="Tahoma"> </font><font size="4" face="Tahoma">
<?php
$code = $rss["Teacher_code"];
$sql2 = "Select * From history_absent_tb Where Teacher_code='$Teacher_code' and Absent_code='02' and Year='$Year' ";
$result2 = mysql_query($sql2) or die(" Error".mysql_error());
$rc2 = mysql_num_rows($result2);
if ( $rc2 == 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#FF0000\">";
echo"ยังไม่ข้อมูล";
echo"</font>";
}
else if ($rc2 > 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#006633\">";
echo"$rc2 <font face=\"Tahoma\" Size=\"2\" color=\"#000000\">ระเบียน</font>";
echo"</font>";
}
?>
</font></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><img src="../picture/ico1.gif" width="22" height="22" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail_bkp.php?Absent_code=03&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=200')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาพักผ่อน</a></font></td>
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><a href="AddAbsent03.php?Teacher_code=<? echo $rss [Teacher_code]?>"><img src="../picture/add.gif" width="16" height="16" border="0" align="absmiddle" /></a></strong></font></div></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><div align="center"><font size="4" face="Tahoma"> </font><font size="4" face="Tahoma">
<?php
$code = $rss["Teacher_code"];
$sql2 = "Select * From history_absent_tb Where Teacher_code='$Teacher_code' and Absent_code='03' and Year='$Year' ";
$result2 = mysql_query($sql2) or die(" Error".mysql_error());
$rc2 = mysql_num_rows($result2);
if ( $rc2 == 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#FF0000\">";
echo"ยังไม่ข้อมูล";
echo"</font>";
}
else if ($rc2 > 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#006633\">";
echo"$rc2 <font face=\"Tahoma\" Size=\"2\" color=\"#000000\">ระเบียน</font>";
echo"</font>";
}
?>
</font></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><img src="../picture/ico1.gif" width="22" height="22" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail_bkp.php?Absent_code=04&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=200')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาคลอด</a></font></td>
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><a href="AddAbsent04.php?Absent_code=04&Year=<? echo $rss1[Year];?>"><img src="../picture/add.gif" width="16" height="16" border="0" align="absmiddle" /></a></strong></font></div></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><div align="center"><font size="4" face="Tahoma"> </font><font size="4" face="Tahoma">
<?php
$code = $rss["Teacher_code"];
$sql2 = "Select * From history_absent_tb Where Teacher_code='$Teacher_code' and Absent_code='04' and Year='$Year' ";
$result2 = mysql_query($sql2) or die(" Error".mysql_error());
$rc2 = mysql_num_rows($result2);
if ( $rc2 == 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#FF0000\">";
echo"ยังไม่ข้อมูล";
echo"</font>";
}
else if ($rc2 > 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#006633\">";
echo"$rc2 <font face=\"Tahoma\" Size=\"2\" color=\"#000000\">ระเบียน</font>";
echo"</font>";
}
?>
</font></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><img src="../picture/ico1.gif" width="22" height="22" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail_bkp.php?Absent_code=05&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=200')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาอุปสมบท</a></font></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><div align="center"><font size="4" face="Tahoma"> </font><font size="4" face="Tahoma"> </font><font size="4" face="Tahoma">
<?php
$code = $rss["Teacher_code"];
$sql2 = "Select * From history_absent_tb Where Teacher_code='$Teacher_code' and Absent_code='05' and Year='$Year' ";
$result2 = mysql_query($sql2) or die(" Error".mysql_error());
$rc2 = mysql_num_rows($result2);
if ( $rc2 == 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#FF0000\">";
echo"ยังไม่ข้อมูล";
echo"</font>";
}
else if ($rc2 > 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#006633\">";
echo"$rc2 <font face=\"Tahoma\" Size=\"2\" color=\"#000000\">ระเบียน</font>";
echo"</font>";
}
?>
</font></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><img src="../picture/ico1.gif" width="22" height="22" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail_bkp.php?Absent_code=06&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=200')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาปฏิบัติธรรม</a></font></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><div align="center"><font size="4" face="Tahoma"> </font><font size="4" face="Tahoma">
<?php
$code = $rss["Teacher_code"];
$sql2 = "Select * From history_absent_tb Where Teacher_code='$Teacher_code' and Absent_code='06'and Year='$Year' ";
$result2 = mysql_query($sql2) or die(" Error".mysql_error());
$rc2 = mysql_num_rows($result2);
if ( $rc2 == 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#FF0000\">";
echo"ยังไม่ข้อมูล";
echo"</font>";
}
else if ($rc2 > 0)
{
echo"<font face=\"Tahoma\" Size=\"2\" color=\"#006633\">";
echo"$rc2 <font face=\"Tahoma\" Size=\"2\" color=\"#000000\">ระเบียน</font>";
echo"</font>";
}
?>
</font></div></td>
</tr>
</table></td>
</tr>
</table>
</form>
</div>
</label>
</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 ";
}
?>
|