Viewing file: ManDetail.php (8.73 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../../include/FunctionDB.php");
ConnectDB();
$sql = "Select * From manament_tb Where code='$code'";
$result = mysql_query($sql) or die(" Error").mysql_error();
$rs = mysql_fetch_array($result)
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> Detail</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link rel="stylesheet" href="../css/cart3.css" type="text/css">
<style type="text/css">
<!--
.style1 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" topmargin="0">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" style="border:1px solid gray"size="12">
<tr bgcolor="#6699CC">
<td height="26" colspan="4"><img src="../../Image/Manlogo.jpg" width="837" height="110"></td>
</tr>
<tr bgcolor="#6699CC">
<td height="26" colspan="4"> <div align="center" class="style1"><font size="4" face="Tahoma">แสดงรายละเอียด</font></div></td>
</tr>
<tr bgcolor="#eeeeee">
<td width="291" height="20" bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">วัน ที่แจ้งซ่อม </font></div></td>
<td nowrap bordercolor="#DDF8D1"></td>
<td nowrap bordercolor="#DDF8D1"><strong><font color="#000000" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma">
<?php
$sday = $rs[Date_buy];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
// $month = TxtThaiMonth($month);
echo"$day"."/"."$month"."/"."$year";
?>
</font><font color="#000000" size="2" face="Tahoma"> </font></strong></td>
<td width="241" rowspan="16" nowrap bordercolor="#DDF8D1"><strong><font color="#000000" size="2" face="Tahoma">
</font><font color="#003366" size="2" face="Tahoma">
</font><font color="#000000" size="2" face="Tahoma"> </font></strong> <strong><font color="#000000" size="2" face="Tahoma">
</font></strong> <font color="#000000" size="2" face="Tahoma"> </font><font color="#003366" size="2" face="Tahoma">
</font><font color="#000000" size="2" face="Tahoma">
<?php
echo"<center>";
echo"<img src=\"$rs[Img1]\" width=\"200\" height=\"150\" >";
echo"</center>";
?>
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">ชื่ออุปกรณ์/ยี่ห้อ</font></div></td>
<td nowrap bordercolor="#DDF8D1"></td>
<td nowrap bordercolor="#DDF8D1"><strong><font color="#000000" size="2" face="Tahoma">
<?php
echo"$rs[Acc_name]";
?>
</font></strong></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" nowrap bordercolor="#D8D2A9"><div align="center"><font size="2" face="Tahoma">ชนิดของอุปกรณ์</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td bordercolor="#DDF8D1"><font color="#000000" size="2" face="Tahoma"><? echo $rs[Status] ?></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9"><div align="center"><font size="2" face="Tahoma">รายการ</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td ><font color="#000000" size="2" face="Tahoma"> <? echo nl2br($rs[Acc_code])?> </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9"><div align="center"><font size="2" face="Tahoma">สถานที่อุปกรณ์</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td ><font color="#000000" size="2" face="Tahoma"><? echo nl2br($rs[Store])?></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">ประวัติการซ่อม</font></div></td>
<td width="8" bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td width="459" ><font color="#000000" size="2" face="Tahoma"> <? echo nl2br($rs[Fix_History])?> </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">สาเหตุอาการ</font></div></td>
<td width="8" bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td width="459" bordercolor="#DDF8D1"><font color="#000000" size="2" face="Tahoma"><? echo $rs[Contact]?></font><font color="#003366" size="2" face="Tahoma"> </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" >
<div align="center"><font size="2" face="Tahoma">วันที่ซ่อมเสร็จ</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td bordercolor="#DDF8D1"><font color="#003366" size="2" face="Tahoma">
<?php
$sday = $rs[Date_year];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
// $month = TxtThaiMonth($month);
echo"$day"."/"."$month"."/"."$year";
?>
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">ราคา</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td bordercolor="#DDF8D1"><font color="#993333" size="2" face="Tahoma"><?echo number_format($rs['Price'],2,'.',','); ?></font><font color="#000000" size="2" face="Tahoma"> บาท </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9">
<div align="center"><font color="#003366" size="2" face="Tahoma">
</font><font size="2" face="Tahoma">งบประมาณการซ่อมแซม</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td bordercolor="#DDF8D1"><font color="#000000" size="2" face="Tahoma"><? echo $rs[Fix_budget] ?> บาท </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" nowrap bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">สถานะการใช้งาน</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td bordercolor="#DDF8D1"><font color="#000000" size="2" face="Tahoma"><? echo $rs[Status_1] ?></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">สถิติการใช้งาน</font> </div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td ><font color="#000000" size="2" face="Tahoma"><? echo $rs[Statistic] ?></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" nowrap bordercolor="#D8D2A9"><div align="center"><font size="2" face="Tahoma">บันทึกซ่วยจำ</font></div></td>
<td ><!--DWLayoutEmptyCell--> </td>
<td ><font color="#000000" size="2" face="Tahoma"><? echo nl2br($rs[Description]) ?></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9"><div align="center"><font size="2" face="Tahoma">นักศึกษาผู้แจ้ง</font></div></td>
<td nowrap bordercolor="#DDF8D1"></td>
<td nowrap bordercolor="#DDF8D1"><font color="#000000" size="2" face="Tahoma">
<?php
$Student_id = $rs[Student_id];
$sql2= "Select * From student_tb Where Student_id='$Student_id' ";
$result2 = mysql_query($sql2) or die("Error Select".mysql_query());
$rs2 = mysql_fetch_array($result2);
echo"$rs2[Name] $rs2[Lastname]";
?>
</font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#D8D2A9"><div align="center"><font size="2" face="Tahoma">อาจารย์ที่รับผิดชอบ</font></div></td>
<td bordercolor="#DDF8D1"><!--DWLayoutEmptyCell--> </td>
<td bordercolor="#DDF8D1"><font color="#000000" size="2" face="Tahoma">
<?php
$Teacher_code = $rs["Teacher_code"];
$sql = "Select * From personal_tb Where Teacher_code='$Teacher_code'";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss = mysql_fetch_array($result1);
echo "$rss[Teacher_name] $rss[Teacher_lastname]";
?>
</font><font color="#336600" size="2" face="Tahoma"> </font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="29" nowrap bordercolor="#D8D2A9">
<div align="center"><font size="2" face="Tahoma">บันทึกซ่วยจำ</font></div></td>
<td ><!--DWLayoutEmptyCell--> </td>
<td ><font color="#000000" size="2" face="Tahoma"><? echo nl2br($rs[Description]) ?></font></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="26" colspan="4"><div align="center"></div></td>
</tr>
</table>
<p> </p>
</body>
</html>
|