Viewing file: UnitDetail.php (5.97 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 No ='$No' and Acc_type_code='$Acc_type_code' ";
$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
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<title><?=$_Config_sitename;?></title>
<script type="text/javascript" src="../js/utilities.js"></script>
<table width="574" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="574" scope="col"><form action="" method="post" name="form1" id="form1"><br/>
<fieldset>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="1" style=" border:0px solid gray"size="12">
<tr >
<td colspan="2" align="center"> </td>
</tr>
<tr >
<td colspan="2" align="left">¤ÃØÀѳ±ì :<?php echo"$rs[Acc_name]"; ?> ÃËÑÊ : <?php echo"$rs[Acc_code]"; ?></td>
</tr>
<tr >
<td colspan="2" align="left"> </td>
</tr>
<tr>
<td colspan="2" align="center" >
<img src="../Man_pic/<?php echo $rs['Img1']; ?>" width="284" height="264" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ʶҹ·Õè¨Ñ´à¡çº :
<?php
$RoomId = $rs['RoomId'];
$strSQL3 = "SELECT * FROM room_tb Where code='$RoomId' ";
$result4 = mysql_query($strSQL3);
$rs4 = mysql_fetch_array($result4) ;
echo $rs4['Room_name'] ;
?></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">àÅ¢·ÕèËÃ×ÍÃËÑʤÃØÀѳ±ì :
<?php echo"$rs[Acc_code]"; ?></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ÃØè¹/Ẻ :
<?php echo"$rs[Acc_module]"; ?></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">¤ÃØÀѳ±ì : <?php echo"$rs[Acc_name]";
?></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">Çѹ·Õè¨Ñ´«×éÍ :
<?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 bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ÃÒ¤Ò·Õè¨Ñ´«×éÍ/˹èÇÂ:<?php echo number_format($rs['Price'],2,'.',','); ?></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">»ÃÐàÀ·¤ÃØÀѳ±ì :
<?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);
$rs1 = mysql_fetch_array($result1) ;
echo $rs1['Acc_type'] ;
?>
</a></td>
</tr>
<tr bgcolor="#eeeeee">
<td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">˹èǧҹ /½èÒ :
<?php
$Faculty_code = $rs['Faculty_code'];
$strSQL3 = "SELECT * FROM faculty_tb Where Faculty_code='$Faculty_code' ";
$result3 = mysql_query($strSQL3);
$rs3 = mysql_fetch_array($result3) ;
echo $rs3['Faculty_name'] ;
?>
</a></td>
</tr>
<tr bgcolor="#eeeeee">
<td width="22%" bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td width="71%" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#BFD0E6">
<td height="20" colspan="2" align="center" bgcolor="#FFFFFF"><input type="button" name="Submit" value=" »Ô´Ë¹éÒµèÒ§" onclick="javascript:parent.close();" class="button" />
</td>
</tr>
</table>
</fieldset>
</form></th>
</tr>
</table>
|