Viewing file: AccDetail.php (11.72 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" );
include("../include/Function.php");
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "accessories_tb";
$myTable1 ="accessories_type_tb";
$myTableFK = "AccId";
$query = " SELECT * FROM $myTable WHERE AccId ='$AccId' ";
$result0 = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result0);
$Acc_type_code = $rs['Acc_type_code'];
$query = " SELECT * FROM $myTable1 WHERE Acc_type_code='$Acc_type_code' ";
$result = $dbObj->execQuery($query);
$rss = $dbObj->fetchArray($result);
/** โฟลเดอร์ไฟล์เอกสาร */
$Img1 = str_replace( "../", "", $rs['Img1'] );
$doc_path = $Img1."/Man_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" />
<title>รายละเอียด</title>
<script type="text/javascript" src="../js/utilities.js"></script>
<style type="text/css">
<!--
.style1 {
color: royalblue;
font-weight: bold;
}
.style2 {color: royalblue}
.style3 {color: royalblue; font-size: 14px; }
.style4 {color: royalblue; font-size: 14px; font-weight: bold; }
.style31 {color: royalblue; font-size: 14px; }
.style11 { color: royalblue;
font-weight: bold;
}
-->
</style>
</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
?>
<fieldset>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" enctype="multipart/form-data" action="InsertAcc.php" onSubmit="return checkData();" >
<tr>
<td width="70%" height="30" align="left" background="../images/background/bg-head-topic.gif" class="PADDING-LEFT-10"><strong><span class="style2"><a href="index.php"><span class="PADDING-LEFT-10"><span class="style1">หน้าหลัก</span></span></a> </span>» <span class="style2">ข้อมูลมูลครุภัณฑ์</span></strong></td>
<td width="30%" align="right" class="PADDING-LEFT-10 PADDING-RIGHT-15"> </td>
</tr>
<tr>
<td height="385" colspan="2" align="center" valign="top">
<table width="760" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td height="10"></td>
</tr>
<tr>
<td height="10"><span class="PADDING-TOP-10"><img src="../images/icons/arrow-circle-225-left.png" width="16" height="16" border="0" align="absmiddle" /> <a href="javascript:;" onclick="window.history.back();"><strong>‹ ย้อนกลับ</strong></a></span></td>
</tr>
<tr>
<td height="10"> </td>
</tr>
</table>
<table width="713" border="0" align="center" cellpadding="1" cellspacing="2" class="BORDER-GREY">
<tr>
<th height="16" colspan="2" align="center" bgcolor="#FFFFFF" class="style2" scope="col"> </th>
</tr>
<tr>
<th height="31" colspan="2" align="center" bgcolor="#FFFFFF" class="style2" scope="col"><span style="padding-left:3px">
<input type="radio" name="Dura" id="Dura" <?php if (!(strcmp("$rs[Dura]","Y"))){echo "checked";} ?> value="Y" />
ครุภัณฑ์
<input type="radio" name="Dura" id="Dura" <?php if (!(strcmp("$rs[Dura]","N"))){echo "checked";} ?> value="N" />
วัสดุ/อะไหล่</span></th>
</tr>
<tr>
<td colspan="2" align="left" ><strong>รหัสครุภัณฑ์วิทยาลัย : :</strong> <?php echo"$rs[Acc_no]"; ?> </a></td>
</tr>
<tr>
<td colspan="2" align="left" bgcolor="#FFFFFF"><strong>เลขที่หรือรหัสครุภัณฑ์ (ตามทะเบียนคุมทรัพสิน) : :</strong><?php echo"$rs[Acc_code]"; ?></td>
</tr>
<tr>
<td colspan="2" align="left" bgcolor="#FFFFFF"><strong>รายการหรือชื่อครุภัณฑ์ : :</strong> <?php echo"$rs[Acc_name]";
?></td>
</tr>
<tr>
<td height="28" colspan="2" align="left" bgcolor="#FFFFFF"><strong>รุ่น/แบบ : :</strong> <?php echo"$rs[Acc_module]"; ?></td>
</tr>
<tr>
<td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ประเภทครุภัณฑ์ : : </strong><?php
$Acc_type_code = $rs['Acc_type_code'];
$strSQL1 = "SELECT * FROM accessories_type_tb Where Acc_type_code='$Acc_type_code' ";
$result1 = mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[Acc_type_code]\" >$rs1[Acc_type]</option>\n";
}
?>
</a></td>
</tr>
<tr>
<td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>แหล่งเงิน : :</strong> <?php
$MoneyS_C = $rs['MoneyS_C'];
$strSQL1 = "SELECT * FROM money_source_tb Where MoneyS_C='$MoneyS_C' ";
$result1= mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[MoneyS_C]\" >$rs1[MoneyS_M]</option>\n";
}
?>
</a></td>
</tr>
<tr>
<td height="22" colspan="2" align="left" bgcolor="#FFFFFF"><strong>วิธีการที่ได้มา ::</strong> <?php echo"$rs[Fix_detail]"; ?>
</td>
</tr>
<tr>
<td height="24" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>วันที่จัดซื้อ ::</strong> <?php
$sday = $rs['Date_buy'];
$yearthai = explode( "-", $sday );
$day = intval( $yearthai[2] );
$month = intval( $yearthai[1] );
$year = intval( $yearthai[0] );
$m = getThaiSubMonth( $month );
echo $day ." ". $m ." ". $year;
?>
</a></td>
</tr>
<tr>
<td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>วันที่หมดอายุการใช้งาน :: </strong>
<?php
$sday = $rs['Date_buy'];
$yearthai = explode( "-", $sday );
$day = intval( $yearthai[2] );
$month = intval( $yearthai[1] );
$year = intval( $yearthai[0] )+ $rss ['Year'];
$m = getThaiSubMonth( $month );
echo $day ." ". $m ." ". $year;
?>
</td>
</tr>
<tr>
<td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ราคาที่จัดซื้อ/หน่วย ::</strong> <?php echo number_format($rs['Price'],2,'.',','); ?></td>
</tr>
<tr>
<td colspan="2" align="left" bgcolor="#FFFFFF" ><strong>จำแนกเป็นครุภัณฑ์ ::</strong> <?php echo"$rs[Fund]"; ?>
</span></td>
</tr>
<tr>
<td colspan="2" align="left" bgcolor="#FFFFFF" ><strong>หน่วยงาน /ฝ่าย :: </strong>
<?php
$Faculty_code = $rs['Faculty_code'];
$strSQL3 = "SELECT * FROM faculty_tb Where Faculty_code='$Faculty_code' ";
$result3 = mysql_query($strSQL3);
while( $rs3 = mysql_fetch_array($result3))
{
echo"<option value=\"$rs3[Faculty_code]\" >$rs3[Faculty_name]</option>\n";
}
?>
</a></td>
</tr>
<tr>
<td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ใช้ประจำที่/สถานที่จัดเก็บ :: </strong><?php
$RoomId = $rs['RoomId'];
$strSQL3 = "SELECT * FROM room_tb Where code='$RoomId' ";
$result3 = mysql_query($strSQL3);
while( $rs3 = mysql_fetch_array($result3))
{
echo"<option value=\"$rs3[code]\" >$rs3[Room_name]</option>\n";
}
?>
</td>
</tr>
<tr>
<td height="25" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ลักษณะคุณสมบัติของครุภัณฑ์ ::</strong></td>
</tr>
<tr>
<td height="27" colspan="2" align="left" bgcolor="#FFFFFF" > <?= (nl2br($rs['Statistic'])) ;?></td>
</tr>
<tr>
<td height="27" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>เลขที่เอกสารที่ได้มา:: </strong><?php echo"$rs[In_document]"; ?></td>
</tr>
<tr>
<td height="27" colspan="2" align="left" bgcolor="#FFFFFF"><strong>หลักฐานการจ่ายเงิน :: </strong><?php echo"$rs[Price_document]"; ?></td>
</tr>
<tr>
<td height="27" colspan="2" align="left" bgcolor="#FFFFFF" ><strong> รายการที่เปลี่ยนแปลง :: </strong><?php echo"$rs[Modify_detail]"; ?></td>
</tr>
<tr>
<td height="27" colspan="2" align="left" bgcolor="#FFFFFF"><strong>เลขที่เอกสารที่เปลี่ยนแปลง :: </strong><?php echo"$rs[Modify_document]"; ?></td>
</tr>
<tr>
<td height="27" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>ชื่อผู้ขาย / บริจาค :: </strong><?php echo"$rs[Name]"; ?></td>
</tr>
<tr>
<td height="16" colspan="2" align="left" bgcolor="#FFFFFF"><strong>ที่อยู่ผู้ขาย :: </strong><?= (nl2br( $rs['Address']));?></td>
</tr>
<tr>
<td height="22" colspan="2" align="left" bgcolor="#FFFFFF" ><strong>โทรศัพท์ :: </strong><?php echo"$rs[Phone]"; ?></td>
</tr>
<tr>
<td width="145" height="16" bgcolor="#FFFFFF" class="style2"> </td>
<td width="562" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td height="16" colspan="2" align="center" bgcolor="#FFFFFF" ><img src="../Man_pic/<?php echo $rs['Img1']; ?>" /></td>
</tr>
</table>
<br />
<br />
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php if( $numrows > 0 ) { ?>
<?php } #if ?></td>
</tr>
</table>
<br /></td></tr>
</form>
</table>
</fieldset></td>
</tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|