Viewing file: AbsentList.php (10.46 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
/** Define Validate Access */
define( '_VALID_ACCESS', 1 );
/** Check Session User Login */
if( !session_is_registered("valid_user") && !session_is_registered("Priority") ) {
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-874\" />";
echo "<p style=padding-top:115px><p align=center><br /><font color=red><strong>กรุณาทำการ Login ก่อน</strong></font></p></p>";
echo "<meta http-equiv=\"refresh\" content=\"1; URL=../login.php\" />";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "personal_tb";
$Username = $valid_user;
$query = " SELECT * FROM $myTable WHERE Teacher_code='$Teacher_code' ";
$resultS = $dbObj->execQuery($query);
$rss = $dbObj->fetchArray($resultS);
} # else
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<title>ศูนย์พัฒนาบุคลากร - ข้อมูลประวัติบุคลากร</title>
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
include("../templates/incHeader.php");
?>
<table width="1003" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="203" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
<td width="800" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="30" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>» <a href="Menu_Personal.php">ข้อมูลบุคลากร</a> » <a href="AbsentPersonalList.php">ข้อมูลการพัฒนาบุคลากร</a> » <a href="AbsentByYear.php?Teacher_code=<?=$Teacher_code;?>">ข้อมูลประวัติการลารายปี</a> » <span class="NOTE">ข้อมูลประวัติการลา</span></strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="370" align="center" valign="top"><table width="65%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="35" align="right"><input name="button" type="button" class="TEXT-GREEN10 WIDTH130" id="button" value="แก้ไขข้อมูลประวัติการลา" onclick="location.href='Add_His_Absent.php?Teacher_code=<?php echo $rss["Teacher_code"];?>'" />
<input name="button" type="button" class="TEXT-CLIMSON10 WIDTH130" id="button" value="แก้ไขข้อมูลประวัติการลา" onclick="location.href='EditAbsentList.php?Teacher_code=<?php echo $rss["Teacher_code"];?>'" /></td>
</tr>
</table>
<table width="65%" border="0" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF" style="background-color:#eeeeee; border:0px solid gray">
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td height="30" colspan="3" align="center" bgcolor="#F8F8F8" class="PATRON">ประวัติการลา อาจารย์ <span class="TEXT-DARK-BLUE10"><? echo $rss['Teacher_name'] ?> <? echo $rss['Teacher_lastname'] ?></span> ประจำปีงบประมาณ <span class="NOTE"><? echo $Year; ?></span></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td width="6%" bgcolor="#FFFFFF" align="center" class="PADDING-TOP-3"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
<td width="65%" bgcolor="#FFFFFF" class="PADDING-LEFT-5 PADDING-TOP-3"><?php
$sql2 = " SELECT * From history_absent_tb WHERE Teacher_code='$Teacher_code' AND Absent_code='01' AND Year='$Year' ";
$result2 = $dbObj->execQuery($sql2);
$num01 = $dbObj->_numrows;
?><?php if( $num01 > 0 ) { ?><a href="javascript:;" onclick="NewWindow('AbsentDetail.php?Absent_code=01&Teacher_code=<? echo $Teacher_code; ?>&Year=<? echo $Year; ?>','AbsentDetail','675','350','yes')">ข้อมูลลากิจ</a><?php } else { ?>ข้อมูลลากิจ<?php } ?></td>
<td width="29%" bgcolor="#FFFFFF" align="center"><?php if( $num01 < 1 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num01 > 0 ) echo '<font color=green>'. $num01 .'</font> ระเบียน'; ?></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
<td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
$sql2 = " SELECT * From history_absent_tb WHERE Teacher_code='$Teacher_code' AND Absent_code='02' AND Year='$Year' ";
$result2 = $dbObj->execQuery($sql2);
$num02 = $dbObj->_numrows;
?><?php if( $num02 > 0 ) { ?><a href="javascript:;" onclick="NewWindow('AbsentDetail.php?Absent_code=02&Teacher_code=<? echo $Teacher_code; ?>&Year=<? echo $Year; ?>','AbsentDetail','660','370','yes')">ข้อมูลลาป่วย</a><?php } else { ?>ข้อมูลลาป่วย<?php } ?></td>
<td bgcolor="#FFFFFF" align="center"><?php if( $num02 < 1 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num02 > 0 ) echo '<font color=green>'. $num02 .'</font> ระเบียน'; ?></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
<td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
$sql2 = " SELECT * From history_absent_tb WHERE Teacher_code='$Teacher_code' AND Absent_code='03' AND Year='$Year' ";
$result2 = $dbObj->execQuery($sql2);
$num03 = $dbObj->_numrows;
?><?php if( $num03 > 0 ) { ?><a href="javascript:;" onclick="NewWindow('AbsentDetail.php?Absent_code=03&Teacher_code=<? echo $Teacher_code; ?>&Year=<? echo $Year; ?>','AbsentDetail','675','350','yes')">ข้อมูลลาพักผ่อน</a><?php } else { ?>ข้อมูลลาพักผ่อน<?php } ?></td>
<td bgcolor="#FFFFFF" align="center"><?php if( $num03 < 1 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num03 > 0 ) echo '<font color=green>'. $num03 .'</font> ระเบียน'; ?></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
<td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
$sql2 = " SELECT * From history_absent_tb WHERE Teacher_code='$Teacher_code' AND Absent_code='04' AND Year='$Year' ";
$result2 = $dbObj->execQuery($sql2);
$num04 = $dbObj->_numrows;
?><?php if( $num04 > 0 ) { ?><a href="javascript:;" onclick="NewWindow('AbsentDetail.php?Absent_code=04&Teacher_code=<? echo $Teacher_code; ?>&Year=<? echo $Year; ?>','AbsentDetail','675','350','yes')">ข้อมูลลาคลอด</a><?php } else { ?>ข้อมูลลาคลอด<?php } ?></td>
<td bgcolor="#FFFFFF" align="center"><?php if( $num04 < 1 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num04 > 0 ) echo '<font color=green>'. $num04 .'</font> ระเบียน'; ?></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
<td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
$sql2 = " SELECT * From history_absent_tb WHERE Teacher_code='$Teacher_code' AND Absent_code='05' AND Year='$Year' ";
$result2 = $dbObj->execQuery($sql2);
$num05 = $dbObj->_numrows;
?><?php if( $num05 > 0 ) { ?><a href="javascript:;" onclick="NewWindow('AbsentDetail.php?Absent_code=05&Teacher_code=<? echo $Teacher_code; ?>&Year=<? echo $Year; ?>','AbsentDetail','675','350','yes')">ข้อมูลลาอุปสมบท</a><?php } else { ?>ข้อมูลลาอุปสมบท<?php } ?></td>
<td bgcolor="#FFFFFF" align="center"><?php if( $num05 < 1 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num05 > 0 ) echo '<font color=green>'. $num05 .'</font> ระเบียน'; ?></td>
</tr>
<tr onmouseover="this.style.backgroundColor='#FCFCF3'" onmouseout="this.style.backgroundColor='#EEEEEE'" >
<td bgcolor="#FFFFFF" align="center"><img src="../images/icons/arrow_rd.gif" width="21" height="21" /></td>
<td bgcolor="#FFFFFF" class="PADDING-LEFT-5"><?php
$sql2 = " SELECT * From history_absent_tb WHERE Teacher_code='$Teacher_code' AND Absent_code='06' AND Year='$Year' ";
$result2 = $dbObj->execQuery($sql2);
$num06 = $dbObj->_numrows;
?><?php if( $num06 > 0 ) { ?><a href="javascript:;" onclick="NewWindow('AbsentDetail.php?Absent_code=06&Teacher_code=<? echo $Teacher_code;?>&Year=<? echo $Year; ?>','AbsentDetail','675','350','yes')">ข้อมูลลาปฏิบัติธรรม</a><?php } else { ?>ข้อมูลลาปฏิบัติธรรม<?php } ?></td>
<td bgcolor="#FFFFFF" align="center"><?php if( $num06 < 1 ) echo '<font color=red>ยังไม่ข้อมูล</font>'; elseif( $num06 > 0 ) echo '<font color=green>'. $num06 .'</font> ระเบียน'; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|