Viewing file: ShowpersonalDev.php (15.45 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" );
require_once( "../includes/Function.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "dev_hrperson";
/** Table --> personal_tb */
$query = " SELECT * FROM dev_hrperson WHERE Teacher_code ='$Teacher_code' " ;
$result3 = $dbObj->execQuery($query);
$rs3 = $dbObj->fetchArray($result3);
$query = " SELECT * FROM dev_hreduhis WHERE perid ='$perid' " ;
$result4 = $dbObj->execQuery($query);
$rs4 = $dbObj->fetchArray($result4);
$query = " SELECT * FROM $myTable1 WHERE perid ='$perid' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
$Teacher_code = $rs['Teacher_code'];
$query = " SELECT * FROM personal_tb WHERE Teacher_code ='$Teacher_code' " ;
$result5 = $dbObj->execQuery($query);
$rss5 = $dbObj->fetchArray($result5);
/** โฟลเดอร์ไฟล์เอกสาร */
$doc_path = $_Config_live_site."/personal_pic";
} # 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">
<table width="748" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="748" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
<table width="737" border="0" cellspacing="0" cellpadding="0">
<form id="pc" name="pc" method="post" action="Edit_Fam_His.php?Teacher_code=<?=$Teacher_code;?>" enctype="multipart/form-data">
<tr>
<td width="737" height="5"></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="150" align="center"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="76%" height="407"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#E4E4E4">
<tr bordercolor="#E7FAFE">
<td width="137" height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">เลขที่บัตรประชาชน</td>
<td bgcolor="#FFFFFF">:</td>
<td width="410" bgcolor="#FFFFFF"><?=citizenID_format($rs['id']);?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">ชื่อ-นามสกุล</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php
$sql = " SELECT * FROM prefix Where prefixId='$rs[pcode]' ";
$result6 = mysql_query($sql);
$rs6 = $dbObj->fetchArray($result6);
echo $rs6['prefixName'];
?>
<? echo $rs['fname']; ?> <? echo $rs['lname']; ?>
</td>
</tr>
</table></td>
</tr>
<tr bordercolor="#FFFFFF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">วันเกิด</td>
<td width="6" nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
<?php
$sday = $rs[birthdate];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]+543);
$m = getThaiSubMonth($month);
echo (!empty($rs["birthdate"]) && $rs["birthdate"]!="0000-00-00")?"$day"." "."$m"." "."$year":"0000-00-00";
?>
</td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">เพศ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
<?=($rs["sex"]==1)?"ชาย":"";?>
<?=($rs["sex"]==2)?"หญิง":"";?>
</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF" >วันที่บรรจุ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
<?php
$sday = $rs[appointdate];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]+543);
$m = getThaiSubMonth($month);
echo (!empty($rs["appointdate"]) && $rs["appointdate"]!="0000-00-00")?"$day"." "."$m"." "."$year":"0000-00-00";
?>
</td>
</tr>
<tr bordercolor="#E7FAFE" bgcolor="#E7FAFE">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">วันที่ปฏิบัติงาน</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
<?php
$sday = $rs[startdate];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]+543);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo (!empty($rs["startdate"]) && $rs["startdate"]!="0000-00-00")?"$day"." "."$m"." "."$year":"0000-00-00";
?>
</td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">สถานภาพการปฏิบัติงาน</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php
$sql = " SELECT * FROM dev_cfperson Where fperson ='$rs[fperson]' ";
$result7 = mysql_query($sql);
$rs7 = mysql_fetch_array($result7) ;
echo $rs7['fpersonmn'] ;
?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">สถานการปฏิบัติงาน</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?php
$sql = " SELECT * FROM dev_status Where statusId ='$rs[statusId]' ";
$result8 = mysql_query($sql);
$rs8 = mysql_fetch_array($result8) ;
echo $rs8['StatusTh'] ;
?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">ตำแหน่งเลขที่</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><? echo $rs['posid']; ?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">ตำแหน่ง</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><?php
$sql4 = " SELECT * FROM dev_adlinepos Where adlineId ='$rs[poscode]' ";
$result4 = mysql_query($sql4);
$rs4 = mysql_fetch_array($result4) ;
echo $rs4['adlineName'] ;
?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td align="right" valign="top" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF">ระดับ</td>
<td width="6" nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><?php
$sql = " SELECT * FROM dev_clevelpos Where levelcode ='$rs[levelcode]' ";
$result5 = mysql_query($sql);
$rs5 = mysql_fetch_array($result5) ;
echo $rs5['kplevel'] ;
?>
</a></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">เงินเดือน</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF"><?=number_format($rs['salary']);?> บาท</td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">ใบประกอบโรคศิลปะ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
<?php
$sql = " SELECT * FROM dev_ccertificate Where cercode='$rs[cercode]'";
$result11 = mysql_query($sql);
$rs11 = mysql_fetch_array($result11) ;
echo (!empty($rs11['cername']))?$rs11['cername']:"ไม่มีข้อมูล";
?>
เลขที่ <?=(!empty($rs['cerid']))?$rs['cerid']:"ไม่มีข้อมูล";?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">ลักษณะของตำแหน่ง</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
<?php
if($rs["fposition"]=="1") echo "ระดับผู้บริหาร";
if($rs["fposition"]=="2") echo "หัวหน้าฝ่าย/หัวหน้างาน";
if($rs["fposition"]=="3") echo "ระดับปฏิบัติงาน";
?>
</td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">หน่วยงานตาม จ.</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><?php
$sql = " SELECT * FROM dev_cdepartment Where deptcode ='$rs[deptcode]' ";
$result4 = mysql_query($sql);
$rs4 = mysql_fetch_array($result4) ;
echo $rs4['longpre'] ; ?>
<? echo $rs4['deptname'];?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">หน่วยงานที่ปฏิบัติงานจริง</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><?php
$sql = " SELECT * FROM dev_cdepartment Where deptcode ='$rs[tcode]' ";
$result5 = mysql_query($sql);
$rs5 = mysql_fetch_array($result5) ;
echo $rs5['longpre'] ; ?>
<? echo $rs5['deptname'];?></td>
</tr>
<tr bordercolor="#E7FAFE">
<td height="20" align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF">กลุ่มงาน/ฝ่าย/หน่วย</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><?php
$strSQL3 = " SELECT * FROM faculty_tb Where faculty_code ='$rs[workcode]' ";
$result3 = mysql_query($strSQL3);
$rs3 = mysql_fetch_array($result3);
echo $rs3['Faculty_name'];
?></td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF" >สัญญาการใช้ทุน</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
<?=($rs["Dev_type"]=="Y")?"อยู่ระหว่างการใช้ทุน":"";?>
<?=($rs["Dev_type"]=="N")?"หมดระยะเวลาการใช้ทุนแล้ว":"";?>
</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="#FFFFFF" style="display:<?=($rs["Dev_type"]=="Y")?"":"none";?>">
<td height="20" align="right" nowrap="nowrap" bordercolor="#FFFFFF" bgcolor="#FFFFFF" >อยู่ระหว่าง</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">:</td>
<td nowrap="nowrap" bgcolor="#FFFFFF">
วันที่
<?php
$sday = $rs[schstartdate];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]+543);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo (!empty($rs["schstartdate"]) && $rs["schstartdate"]!="0000-00-00")?"$day"." "."$m"." "."$year":"0000-00-00";
?>
สิ้นสุด วันที่ :
<?php
$sday = $rs[schstopdate];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]+543);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo (!empty($rs["schstopdate"]) && $rs["schstopdate"]!="0000-00-00")?"$day"." "."$m"." "."$year":"0000-00-00";
?>
</td>
</tr>
<tr bgcolor="#CEE6FF">
<td colspan="3" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#CEE6FF">
<td height="20" bgcolor="#FFFFFF" align="center"> </td>
<td height="20" bgcolor="#FFFFFF" align="center"> </td>
<td height="20" bgcolor="#FFFFFF" align="left"> </td>
</tr>
</table></td>
<td width="24%" valign="top" align="center"><table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="<?=(is_file($personalPicPath.$rss5['Img1']))?$personalPicPath.$rss5['Img1']:(($rs["sex"]==1)?"../images/no_picture_male.jpg":"../images/no_picture_female.jpg");?>" width="150" height="170" /></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</form>
</table>
</fieldset></td>
</tr>
</table>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|