Viewing file: TrainingDetailY.php (9.85 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
/** Define Validate Access */
define( '_VALID_ACCESS', 1 );
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
require_once( "../include/Function.php" );
/** Create Database Object */
$dbObj = new DBConn;
/*
$sql = " SELECT * FROM personal_tb AS t
JOIN training_tb AS r
ON t.Teacher_code=r.Teacher_code AND r.Training_code='$Training_code' ";
*/
//$query = " SELECT * FROM personal_tb AS p, training_tb AS t WHERE p.Teacher_code=t.Teacher_code AND p.Teacher_code='$Teacher_code' AND t.Training_code='$Training_code' ";
$query = " SELECT * FROM personal_tb AS p, training_tb AS t WHERE p.Teacher_code=t.Teacher_code AND t.Training_code='$Training_code' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Training Detail</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
<table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th align="center" scope="col"><fieldset>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#F7F7F7">
<tr>
<td height="25" colspan="2" bgcolor="#F0F0F0" align="center"><strong class="NOTE">แสดงรายละเอียดการพัฒนาบุคลากร</strong></td>
</tr>
<tr>
<td width="160" height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">ปี งบประมาณ</font></span></td>
<td width="507" nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma">
<?php echo $rs["Year_std"]; ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">ชื่อ-นามสกุล</font></span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma">
<?php echo "$rs[First_name]"; ?> <?php echo "$rs[Teacher_name]"; ?> <?php echo "$rs[Teacher_lastname]"; ?></font></td>
</tr>
<tr>
<td height="25" align="right"><span class="style1"><font face="Tahoma">ชื่อเรื่อง</font></span></td>
<td bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma">
<?php
//$Project_code = $rss["Project_code"];
$sql = " Select * From training_tb Where Training_code='$Training_code' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs1 = mysql_fetch_array($result1);
echo "$rs1[Training_name] ";
?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">ประเภท</font></span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font size="2" color="#003399" face="Tahoma">
<?php
$Training_type = $rs["Training_type"];
$sql = " Select * From training_type_tb Where Training_type='$Training_type' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[Detail]";
?>
/ <?php echo $rs['Place']; ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">สาขาวิชา</font></span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"> <?php echo $rs['Major']; ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">วันทีเริ่ม-วันที่สิ้นสุด</font></span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma">
<?php
$sday = $rs['Date_start'];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
$m = getThaiSubMonth($month);
echo "$day"." "."$m"." "."$year";
?>
<font color="#000000">ถึง</font> <?php
$sday = $rs['Date_finish'];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
$m = getThaiSubMonth($month);
echo "$day"." "."$m"." "."$year";
?> จำนวน <?php echo $rs['Day']; ?> วัน</font></td>
</tr>
<tr>
<td height="20" align="right" nowrap><span class="style1"><font color="#000000" face="Tahoma">สถานที่จัด</font></span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"><?php echo $rs['CNEU']; ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma"> จำนวชั่วโมง</font></span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"><?php echo $rs['Total_hour']; ?> </font><font size="2" face="Tahoma">ชั่วโมง</font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">จำนวนเงินที่ใช้</font> </span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma">
<?php echo number_format($rs['Budget_use'],2,'.',','); ?>
</font><font size="2" face="Tahoma">บาท</font> </td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">แหล่งเงินสนับสนุน</font></span></td>
<td nowrap bordercolor="#DDF8D1" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"><?php echo $rs['Fund_resource']; ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">หน่วยงานที่จัด</font></span></td>
<td nowrap bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"><?php echo $rs[Organiz] ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">สถานที่จัด</font></span></td>
<td nowrap bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"><?php echo $rs['CNEU']; ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">สถานที่</font></span></td>
<td nowrap bgcolor="#ffffff" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"><?php echo $rs['Place']; ?> <?php echo $rs['Place_des']; ?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma"> วันที่ส่งรายงาน</font></span></td>
<td nowrap bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma">
<?php
$sday = $rs['Date_send'];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
$m = getThaiSubMonth($month);
echo "$day"." "."$m"." "."$year";
?></font></td>
</tr>
<tr>
<td height="20" align="right" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">เวลาที่เผยแพร่ในหน่วยงาน</font></span></td>
<td nowrap bgcolor="#ffffff" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma">
<?php
switch ($rs['Period_prop']) {
case 1 :
echo "<font color=\"#003399\">น้อยกว่า 2 สัปดาห์ </font>";
break;
case 2 :
echo "<font color=\"#006633\">2 สัปดาห์</font>";
break;
case 3 :
echo "<font color=\"#333333\">มากกว่า 4 สัปดาห์</font>";
break;
}
?></font></td>
</tr>
<tr>
<td height="20" align="right" valign="top" nowrap bordercolor="#D8D2A9"><span class="style1"><font color="#000000" face="Tahoma">การประยุกต์นำไปใช้งาน</font></span></td>
<td valign="top" nowrap bgcolor="#FFFFFF" class="PADDING-LEFT-10"><font color="#003399" size="2" face="Tahoma"><?php echo htmlspecialchars_decode( nl2br( $rs['Apply'] ) ); ?></font></td>
</tr>
<tr>
<td height="10" colspan="2" bgcolor="#FFFFFF"></td>
</tr>
</table>
</fieldset>
<br>
<input name="Close" type="button" class="CURSOR-HAND" onClick="window.close();" value="ปิดหน้าต่าง" /></th>
</tr>
</table>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|