Viewing file: DetailDurable.php (22.96 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" );
require_once( "../calendar/check.php" );
/** Create Database Object */
$dbObj = new DBConn;
/** Config Table for This Page */
$myTable = "personal_tb";
$myTable1 = "budget_year_tb";
$myTable2 = "durable_tb";
$myTable3 ="durable_type_tb";
$query = " SELECT * FROM $myTable WHERE Teacher_code='$Teacher_code' ";
$result = $dbObj->execQuery($query);
$rss = $dbObj->fetchArray($result);
$query1 = " SELECT * FROM $myTable1 ";
$result1 = $dbObj->execQuery($query1);
$rs = $dbObj->fetchObject($result1);
$query2 = " SELECT * FROM $myTable2 WHERE duraId='$duraId' AND Teacher_code='$Teacher_code' ";
$result2 = $dbObj->execQuery($query2);
$rs1 = $dbObj->fetchObject($result2);
} # 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" />
<title><?=$_Config_sitename;?></title>
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script language="javascript">
function checkData() {
var formObj = document.myForm;
if( (formObj.No_in.value == "" ) && (formObj.Day.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.No_in.style.backgroundColor='#F1F9FC'; formObj.No_in.focus(); return false; }
else if(formObj.No_in.value == "" ) { alert("กรุณากรอก เลขที่หนังสือ"); formObj.No_in.style.backgroundColor='#F1F9FC'; formObj.No_in.focus(); return false;}
else if(formObj.Day.value == "" ) { alert("กรุณากรอก จำนวนวัน"); formObj.Day.style.backgroundColor='#F1F9FC'; formObj.Day.focus(); return false;}
else if(formObj.Year_std.value == "" ) { alert("กรุณากรอก ปีงบประมาณ"); formObj.Year_std.style.backgroundColor='#F1F9FC'; formObj.Year_std.focus(); return false;}
else return true ;
}
</script>
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="760" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
<table width="751" border="0" cellspacing="0" cellpadding="0">
<form id="pc" name="pc" method="post" action="EditDurable.php" onSubmit="return checkData();">
<tr>
<td width="751" height="1028" align="center">
<table width="750" border="0" cellpadding="0" cellspacing="3">
<tr height="31">
<td height="31" colspan="4" align="center" class="PATRON11">บันทึกข้อความ</td>
</tr>
<tr height="29">
<td height="29" colspan="4" l="l">ส่วนราชการ <font size="2" face="Tahoma">
<?php
$collegeCode = $rss["collegeCode"];
$sql = "Select * From college Where collegeStatus ='1'";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[collegeName] ";
?>
</font></td>
</tr>
<tr>
<td width="155" height="29" align="left">ที่<font color="#0000FF" size="2" face="Tahoma">
<input type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->DuraNo;?>" size="15" />
</font></td>
<td width="186" height="29" align="left"> </td>
<td height="29" colspan="2" align="left"> <span class="style1">วันที่</span> <span class="style5">*</span><font color="#0000FF" size="2" face="Tahoma">
<input name="add_update2" type="text" id="add_update2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php echo dateThai($rs1->add_updated); ?>" size="15" />
</font></td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left">เรื่อง
<input name="durableCode" type="text" id="durableCode" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php
$durableCode = $rs1->durableCode ;
$sql = "Select * From $myTable3 Where durableCode='$durableCode'";
$result = mysql_query($sql) or die("Error".mysql_error());
$rs3 = mysql_fetch_array($result);
echo "$rs3[durableName] ";
?>" size="35" /></td>
<td width="154"></td>
<td width="276"></td>
</tr>
<tr height="29">
<td height="29" colspan="4" align="left">เรียน ผู้อำนวยการ <font size="2" face="Tahoma">
<?php
$collegeCode = $rss["collegeCode"];
$sql = "Select * From college Where collegeStatus ='1'";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[collegeName] ";
?>
</font></td>
</tr>
<tr height="29">
<td height="25" colspan="4"> เนื่องจาก งาน/ภาค/ฝ่าย
<input name="Faculty_name2" type="text" id="Faculty_name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value=" <?php
$Faculty_code = $rss["Faculty_code"];
$sql = "Select * From faculty_tb Where Faculty_code='$Faculty_code'";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[Faculty_name] ";
?>" size="30" />
<font color="#000000" size="2" face="Tahoma"> </font><font color="#0000FF" size="2" face="Tahoma">
<input name="Faculty_code" type="hidden" id="Faculty_code" value="<? echo $rs2['Faculty_code'];?>" />
</font><font color="#000000" size="2" face="Tahoma">มีความประสงค์ที่จะต้องการซ่อมครุภัณฑ์/สิ่งของ</font></td>
</tr>
<tr height="29">
<td height="29" colspan="4" align="left">ครุภัณฑ์ ชื่อ <font color="#0000FF" size="2" face="Tahoma">
<input name="Acc_name2" type="text" id="Acc_name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->Acc_name;?>" size="40" />
<font color="#000000" size="2" face="Tahoma">รหัส </font>
<input name="Acc_code2" type="text" id="Acc_code2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->Acc_code;?>" size="35" />
</font></td>
</tr>
<tr height="29">
<td height="29" colspan="4" align="left">ประเภทครุภัณฑ์ </font></strong></font></strong></font>
<input type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value=" <?php
$Acc_type_code = $rs1->Acc_type_code;
$sql = "Select * From accessories_type_tb Where Acc_type_code='$Acc_type_code' ";
$result3 = mysql_query($sql) or die("Error".mysql_error());
$rs3 = mysql_fetch_array($result3);
echo "$rs3[Acc_type]";
?>" size="25" /></td>
</tr>
<tr height="29">
<td height="29" colspan="4" align="left">สถานที่ตั้งครุภัณฑ์ <font size="2" face="Tahoma"><span class="style9">*</span></font><font color="#0000FF" size="2" face="Tahoma">
<input name="Room_name2" type="text" id="Room_name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->Room_name;?>" size="20" />
<input name="Room_code2" type="text" id="Room_code2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->Room_code;?>" size="30" />
</font></td>
</tr>
<tr height="29">
<td height="26" colspan="4" align="left"><span class="style7">ชำรุดเนื่องจาก<font color="#0000FF" size="2" face="Tahoma"><font color="#0000FF" size="2" face="Tahoma">
<input name="Fix_History2" type="text" id="Fix_History2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->Fix_History;?>" size="40" />
</font></font></font>ปีงบประมาณ<font color="#0000FF" size="2" face="Tahoma">
<input name="Budget_year2" type="text" id="Budget_year2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs->Budget_year;?>" size="2" maxlength="4" />
</font></span></td>
</tr>
<tr height="29">
<td height="26" colspan="4" align="left">ความเห็นทั่วไปและข้อเสนอแนะ<font color="#0000FF" size="2" face="Tahoma">
<input name="Store2" type="text" id="Store2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->Store;?>" size="60" />
</font></span></td>
</tr>
<tr height="29">
<td height="16" colspan="4" align="left">สถานะการดำเนินงาน <font color="#0000FF" size="2" face="Tahoma">
<input name="Status3" type="text" disabled="disabled" id="Status3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->Status;?>" size="15" />
</font></td>
</tr>
<tr height="29">
<td height="26" colspan="4" align="left"> จึงเรียนเสนอมาเพื่อโปรดพิจารณา</td>
</tr>
<tr height="29">
<td height="29" colspan="4" align="left"><table width="771" border="0" align="center" cellpadding="0" cellspacing="3">
<tr>
<th width="296" align="center" scope="col"><font color="#0000FF" size="2" face="Tahoma">
<input name="Detail_name5" type="text" id="Detail_name5" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled="disabled" />
</font></th>
<th width="337" align="center" class="ALERT" scope="col"> </th>
</tr>
<tr>
<td height="27" align="center">ลงชื่อ.................................หัวหน้าภาค/ฝ่าย.</td>
<td align="center">ลงชื่อ.................................ผู้แจ้งซ่อม</td>
</tr>
<tr>
<td height="25" align="center">(<font size="2" face="Tahoma">
<?php
//$Teacher_code = $rss["TeacherId"];
$sql = "Select * From personal_tb Where Faculty_code ='$Faculty_code' and TeacherId='1' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[First_name]$rs2[Teacher_name] $rs2[Teacher_lastname]";
?>
</font>)
<input name="TeacherId" type="hidden" id="TeacherId" value="<? echo $rs2["Teacher_code"]?>" /></td>
<td align="center">( <font color="#003366" size="2" face="Tahoma"><? echo $rss[First_name]?> <? echo $rss[Teacher_name]?> <? echo $rss[Teacher_lastname]?></font>)
<input name="Teacher_code" type="hidden" id="Teacher_code" value="<? echo $rss['Teacher_code']?>" /></td>
</tr>
<tr>
<td align="center">ตำแหน่ง.<font color="#0000FF" size="2" face="Tahoma">
<input type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="25" value=" <? $PositionId = $rs2["PositionId"];
$sql = "Select * From position_tb Where PositionId ='$PositionId' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[Position_name] ";?>
" />
</font></td>
<td align="center">ตำแหน่ง.<font color="#0000FF" size="2" face="Tahoma">
<input name="Name" type="text" id="Name4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="25" value=" <? $PositionId = $rss["PositionId"];
$sql = "Select * From position_tb Where PositionId ='$PositionId' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[Position_name] ";?>
" />
</font></td>
</tr>
</table></td>
</tr>
<tr height="29">
<td height="16" colspan="4" align="left"><hr /></td>
</tr>
<tr height="29">
<td height="29" colspan="4" align="left"><table width="780" align="center">
<tr>
<th width="379" scope="col">(1) บันทึกหน่วยงานซ่อมบำรุง</th>
<th width="375" scope="col">(2) บันทึกผู้ตรวจรับงาน</th>
</tr>
<tr>
<td><input type="radio" name="DetailDura" id="Detail" <?php if (!(strcmp("$rs1->DetailDura","1"))) {echo "checked";} ?> value="1" />
<font face="Tahoma" class="ALERT" size="2">ซ่อมเองได้</font></td>
<td><input type="radio" name="Detail" id="Detail" <?php if (!(strcmp("$rs1->Detail","1"))) {echo "checked";} ?> value="1" />
ใช้งานได้ตามปกติ</td>
</tr>
<tr>
<td><input type="radio" name="DetailDura" id="Detail" <?php if (!(strcmp("$rs1->DetailDura","2"))) {echo "checked";} ?> value="2" />
<font face="Tahoma" class="ALERT" size="2">ซ่อมเองได้แต่ต้องจัดซื้อวัสดุ( ตามรายละเอียดแนบมา)</font></td>
<td><input type="radio" name="Detail" id="Detail" <?php if (!(strcmp("$rs1->Detail","2"))) {echo "checked";} ?> value="2" />
<font face="Tahoma" class="ALERT" size="2">ไม่สามารถใช้งานอีกต่อไป</font></td>
</tr>
<tr>
<td><input type="radio" name="DetailDura" id="Detail2" <?php if (!(strcmp("$rs1->DetailDura","3"))) {echo "checked";} ?> value="3" />
สมควรส่งซ่อมภายนอก</td>
<td><input type="radio" name="Detail" id="Detail" <?php if (!(strcmp("$rs1->Detail","3"))) {echo "checked";} ?> value="3" />
<font face="Tahoma" class="ALERT" size="2">ความเห็นอื่นๆ</font><font color="#0000FF" size="2" face="Tahoma">
<input name="DetailName" type="text" id="DetailName" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->DetailName;?>" size="35" />
</font></td>
</tr>
<tr>
<td><label>
<input type="radio" name="DetailDura" id="Detail" <?php if (!(strcmp("$rs1->DetailDura","4"))) {echo "checked";} ?> value="4" />
</label>
<font face="Tahoma" class="ALERT" size="2">ความเห็นอื่นๆ</font><font color="#0000FF" size="2" face="Tahoma">
<input name="DetailDura_name" type="text" id="DetailDura_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1->DetailDura_name;?>" size="35" />
</font></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center"><font face="Tahoma"><span class="style7">ลงชื่อ</span></font><font color="#0000FF" size="2" face="Tahoma">
<input name="name2" type="text" id="name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="20" disabled="disabled" />
</font><font color="#003366" size="2" face="Tahoma">ผู้ตรวจซ่อม</font></td>
<td align="center"><font face="Tahoma"><span class="style7">ลงชื่อ</span></font><font color="#0000FF" size="2" face="Tahoma">
<input name="name" type="text" id="name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="20" disabled="disabled" />
</font><font color="#003366" size="2" face="Tahoma">ผู้ตรวจรับ</font></td>
</tr>
<tr>
<td> </td>
<td align="center"> </td>
</tr>
<tr>
<td align="center">วันที่.....เดือน..........พ.ศ.......…</td>
<td align="center">วันที่......เดือน...........พ.ศ.......</td>
</tr>
<tr>
<td><hr /></td>
<td><hr /></td>
</tr>
<tr>
<td>(3) บันทึกงานอาคารและสถานที่</td>
<td>(4) ความเห็นและคำสั่งผู้อำนวยการ</td>
</tr>
<tr>
<td align="center"> สถานการดำเนินการ :
<select name="Status" id="Status">
<option value="รอดำเนินการ" <?php if($rs1->Status=="รอดำเนินการ"){ echo "selected" ; } ?> >รอดำเนินการ </option>
<option value="กำลังดำเนินการ" <?php if($rs1->Status=="กำลังดำเนินการ"){ echo "selected" ; } ?> >กำลังดำเนินการ </option>
<option value="ดำเนินการเรียบร้อยแล้ว" <?php if($rs1->Status=="ดำเนินการเรียบร้อยแล้ว"){ echo "selected" ; } ?> >ดำเนินการเรียบร้อยแล้ว</option>
</select>
</font></td>
<td align="center"> </td>
</tr>
<tr>
<td align="center">ใช้เวลาในการซ่อม <font color="#0000FF" size="2" face="Tahoma"><font color="#0000FF" size="2" face="Tahoma"><font color="#0000FF" size="2" face="Tahoma"><font color="#0000FF" size="2" face="Tahoma">
<input name="Time_total" type="text" id="Time_total" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value=" <?=$rs1->Time_total;?>" size="5" maxlength="5" />
</font></font></font></font></td>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><font color="#0000FF" size="2" face="Tahoma">
<input name="Detail_name3" type="text" id="Detail_name3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled="disabled" />
</font></td>
<td align="center"><font color="#0000FF" size="2" face="Tahoma">
<input name="Detail_name4" type="text" id="Detail_name4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="35" disabled="disabled" />
</font></td>
</tr>
<tr>
<td> </td>
<td><input name="Flag" type="checkbox" id="Flag" value="1" disabled="disabled" />
อนมัติ
<input name="Flag" type="checkbox" id="Flag" value="2" disabled="disabled" />
ไม่อนุมัติ</td>
</tr>
<tr>
<td height="29" align="center">ลงชื่อ..................................</td>
<td align="center">ลงชื่อ..................................</td>
</tr>
<tr>
<td height="26" align="center">ตำแหน่ง..................................</td>
<td align="center">ตำแหน่ง..................................</td>
</tr>
<tr>
<td align="center">วันที่.....เดือน...........พ.ศ.......</td>
<td align="center">วันที่.....เดือน...........พ.ศ.......</td>
</tr>
<tr>
<td><hr /></td>
<td><hr /></td>
</tr>
<tr>
<td> </td>
<td align="center"> </td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</fieldset></td>
</tr>
</table>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|