Viewing file: AbsentList_bkp.php (12.91 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">
<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}
-->
</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_manage.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" />ข้อมูลการลา</font></legend>
<label><div align="center">
<form id="form1" name="form1" method="post" action="">
<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="56%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
<tr>
<td height="43" ><table width="99%" height="187" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#CCCCCC" style="border:0px solid gray">
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td height="33" colspan="3" bgcolor="#FFFFFF"><div align="center"><span class="d style1 style3"><font face="Tahoma">ประวัติการลา อ</font><font size="2" face="Tahoma">.<font color="#993333"><strong><? echo $rss['Teacher_name'] ?> <? echo $rss['Teacher_lastname'] ?></strong></font> </font><font face="Tahoma">ประจำปีงบประมาณ </font></span><font size="2" face="Tahoma"><font color="#003399"><? echo $Year?></font></font></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td height="18" colspan="3" bgcolor="#FFFFFF"><div align="center">
<div align="center"></div></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td width="6%" bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><strong><img src="../picture/ico5.gif" width="16" height="16" align="absmiddle" /></strong></font></div></td>
<td width="78%" bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail.php?Absent_code=01&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=300')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลากิจ </a></font></td>
<td width="16%" 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/ico5.gif" width="16" height="16" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail.php?Absent_code=02&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=300')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาป่วย</a></font></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/ico5.gif" width="16" height="16" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail.php?Absent_code=03&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=300')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาพักผ่อน</a></font></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/ico5.gif" width="16" height="16" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail.php?Absent_code=04&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=300')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาคลอด</a></font></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/ico5.gif" width="16" height="16" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail.php?Absent_code=05&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=300')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาอุปสมบท</a></font></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/ico5.gif" width="16" height="16" align="absmiddle" /></strong></font></div></td>
<td bgcolor="#FFFFFF" onclick="MM_openBrWindow('AbsentDetail.php?Absent_code=06&Teacher_code=<? echo $rss[Teacher_code]?>&Year=<? echo $rss1[Year]?>','Detail','scrollbars=yes,width=700,height=300')"><font color="#996600" face="Tahoma"><a href="#" class="style3">ข้อมูลลาปฏิบัติธรรม</a></font></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 ";
}
?>
|