Viewing file: ProductDetail.php (16.1 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( "../include/Function.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "edu_product_tb";
$myTable2PK = "Prod_code";
/** Table --> personal_tb */
$query = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId WHERE Username='$Username' ";
$result1 = $dbObj->execQuery($query);
$rs1 = $dbObj->fetchObject($result1);
$Teacher_code = $rs1->Teacher_code;
/** Paging */
$page = $_GET['page'];
if( $page == "" ) { $page = 1; }
/** จำนวนข้อมูล ต่อ 1 หน้า */
$perpage = $_REQUEST['perpage'];
if( $perpage == "" ) { $perpage = 10; }
/** โฟลเดอร์ไฟล์เอกสาร */
$doc_path = $_Config_live_site."/Research_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">
<?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" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px">
<?php
$sql = " SELECT * FROM $myTable1 AS t, $myTable2 AS r WHERE t.Teacher_code = r.Teacher_code AND r.Prod_code='$Prod_code' ";
$result = mysql_query($sql);
$rs = mysql_fetch_array($result);
?>
<fieldset>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="<?=$PHP_SELF;?>?page=<?=$page;?>">
<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_Teach.php">ข้อมูลทั่วไปบุคลากร</a> » <span class="NOTE">รายละเอียดผลงานวชาการ</span></strong></td>
</tr>
<tr>
<td><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"><table width="760" border="0" align="center" cellpadding="2" cellspacing="2" style="border:1px solid #EEEEEE">
<tr bgcolor="#FFCC99">
<td height="25" colspan="2" bgcolor="#F8F8F8" align="center" class="PATRON11">แสดงรายละเอียดผลงานวิชาการ</td>
</tr>
<tr bgcolor="#FFEFDF">
<td width="166" height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF" class="PADDING-TOP-10">ชื่อผลงานวชาการ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10 PADDING-TOP-10"><?php echo htmlspecialchars_decode( nl2br( $rs['Product_name'] ) ); ?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ประเภทผลงาน</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><? echo $rs['Product_type']; ?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ชื่อผู้ทำผลงาน</td>
<td width="578" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
$Teacher_code = $rs['Teacher_code'] ;
$sql = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$Teacher_code' ";
$result12 = mysql_query($sql);
$rs12 = mysql_fetch_array($result12);
echo"$rs12[First_name] $rs12[Teacher_name] $rs12[Teacher_lastname]";
?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ปีที่เริ่มทำ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?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";
?>
</td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ปีที่แล้วเสร็จ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?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";
?>
</td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ผู้ร่วมคนที่
1</td>
<td width="578" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
$name1 = $rs['name1'] ;
$sql11 = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$name1' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo"$rs11[First_name] $rs11[Teacher_name] $rs11[Teacher_lastname]";
?></td>
</tr>
<?php
$name2 = $rs['name2'];
if( $name2 != 0 ) {
?>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ผู้ร่วมคนที่ 2</td>
<td width="578" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
//$name2 = $rs['name2'];
$sql11 = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$name2' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo "$rs11[First_name] $rs11[Teacher_name] $rs11[Teacher_lastname]";
?></td>
</tr>
<?php } #if ?>
<?php
$name3 = $rs['name3'];
if( $name3 != 0 ) {
?>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ผู้ร่วมคนที่ 3</td>
<td width="578" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
//$name3 = $rs['name3'] ;
$sql11 = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$name3' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo"$rs11[First_name] $rs11[Teacher_name] $rs11[Teacher_lastname]";
?></font></td>
</tr>
<?php } #if ?>
<?php
$name4 = $rs['name4'];
if( $name4 != 0 ) {
?>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ผู้ร่วมคนที่ 4</td>
<td width="578" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
//$name4 = $rs['name4'] ;
$sql11 = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$name4' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo"$rs11[First_name] $rs11[Teacher_name] $rs11[Teacher_lastname]";
?></td>
</tr>
<?php } #if ?>
<?php
$name5 = $rs['name5'];
if( $name5 != 0 ) {
?>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ผู้ร่วมคนที่
5</td>
<td width="578" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
//$name5 = $rs['name5'] ;
$sql11 = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$name5' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo"$rs11[First_name] $rs11[Teacher_name] $rs11[Teacher_lastname]";
?></font></td>
</tr>
<?php } #if ?>
<?php
$name6 = $rs['name6'];
if( $name6 != 0 ) {
?>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ร่วมคนที่ 6</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
//$name6 = $rs['name6'] ;
$sql11 = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$name6' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo"$rs11[First_name] $rs11[Teacher_name] $rs11[Teacher_lastname]";
?></font></td>
</tr>
<?php } #if ?>
<?php
$name7 = $rs['name7'];
if( $name7 != 0 ) {
?>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ผู้ร่วมคนที่
7</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
//$name7 = $rs['name7'] ;
$sql11 = " SELECT *, prefixName as First_name FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Teacher_code='$name7' ";
$result11 = mysql_query($sql11);
$rs11 = mysql_fetch_array($result11);
echo"$rs11[First_name] $rs11[Teacher_name] $rs11[Teacher_lastname]";
?></font></td>
</tr>
<?php } #if ?>
<?php
$name8 = $rs['name8'];
if( $name8 != 0 ) {
?>
<?php } #if ?>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">จำนวเงินทุนทั้งหมด</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><? echo number_format($rs['Benefit']); ?> บาท</td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">การเผยแพร่</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><? echo $rs['Propagate']; ?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">งบประมาณ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><? echo $rs['Fund']; ?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ปีงบประมาณ</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><? echo $rs['Year_prop']; ?> </td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ปีการศึกษา</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><? echo $rs['Term']; ?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ปีที่เผยแพร่</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10">
<?php
$sday = $rs['Year_sprop'];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
$m = getThaiSubMonth($month);
echo"$day"." "."$m"." "."$year";
?>
</td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">การนำไปใช้อ้างอิง</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><? echo htmlspecialchars_decode($rs['Use_ref']); ?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="20" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF">ดาว์โหลดไฟล์เอกสาร</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"><?php if( $rs['Filetex'] != "" ) { ?>
<a href="<?=$doc_path;?>/<?=$rs['Filetex'];?>" target="_blank"><img src="../images/icons/download.png" alt=" ดาวน์โหลดไฟล์ <?=$rs['Filetex'];?> " width="16" height="16" border="0" /></a>
<?php } else { ?>
<img src="../images/icons/download_off.png" width="16" height="16" />
<?php } ?></td>
</tr>
<tr bgcolor="#FFEFDF">
<td height="10" align="right" nowrap="nowrap" bordercolor="#D8D2A9" bgcolor="#FFFFFF"></td>
<td height="10" nowrap="nowrap" bgcolor="#FFFFFF" class="PADDING-LEFT-10"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
<input type="button" name="button" id="button" value="ย้อนกลับ" class="CURSOR-HAND" onclick="window.history.back();" /></td>
</tr>
<tr>
<td> </td>
</tr></form>
</table>
</fieldset></td>
</tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
$dbObj->freeresult($result1);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|