Viewing file: DetailFormA.php (16.75 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( "../include/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "formaoffice";
$myTable3 = "project_tb";
$myTable4 = "training_tb";
/** Table --> personal_tb */
$query = " SELECT * FROM personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId WHERE Teacher_code='$Teacher_code' ";
$result = $dbObj->execQuery($query);
$rss = $dbObj->fetchArray($result);
$Teacher_code = $rss['Teacher_code'];
/** Table --> tech_plan_tb */
$query1 = " SELECT * FROM $myTable2 WHERE codeId='$codeId' ";
$result1 = $dbObj->execQuery($query1);
$rs1 = $dbObj->fetchArray($result1);
/** Table --> techplan_method_tb */
$query2 = " SELECT * FROM $myTable3 WHERE codeId='$codeId' ";
$result2 = $dbObj->execQuery($query2);
$rs2 = $dbObj->fetchArray($result2);
/** Table --> tech_spec_tb */
$query3 = " SELECT * FROM $myTable4 WHERE Training_code='$Training_code' ";
$result3 = $dbObj->execQuery($query3);
$rs3 = $dbObj->fetchArray($result3);
} # else
?>
<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>
<style type="text/css">
<!--
.style1 {
font-size: 14px;
font-family: Tahoma;
}
.style2 {
font-size: 14px;
font-weight: bold;
font-family: Tahoma;
}
.style5 {font-size: 14px; font-family: Tahoma; color: #FF0000; }
.style7 {font-size: 14px}
.style11 {font-size: 14px; color: #000000; }
.style12 {color: #000000}
.style21 {font-size: 14px}
-->
</style>
<title>บันทึกการขอไปราชการ</title><table width="727" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="727">
<table width="698" align="center" cellpadding="0" cellspacing="0">
<tr height="31">
<td colspan="2" rowspan="2" class="PATRON11"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style21"><img src="../picture/krud.jpg" width="87" height="86" border="0" align="absmiddle" /></span></font></td>
<td height="31" colspan="3" class="PATRON11"> บันทึกข้อความ</td>
<td height="31" align="center" class="PATRON11">MIS1001</td>
</tr>
<tr height="31">
<td height="31" align="center" class="PATRON11"> </td>
<td height="31" align="center" class="PATRON11"> </td>
<td height="31" align="center" class="PATRON11"> </td>
<td height="31" align="center" class="PATRON11"> </td>
</tr>
<tr height="29">
<td height="29" colspan="6" l="l">ส่วนราชการ </a>
<?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 height="29" colspan="2" align="left">ที่ </a>
<input type="text" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rs1['maNo'];?>" size="15" />
</font></td>
<td width="151" height="29" align="left"> </td>
<td height="29" align="left"> </td>
<td height="29" colspan="2" align="left">วันที่
</a>
<input name="Date" type="text" id="Date" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="10" value=" <?php
$sday = $rs1[Date];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo"$day"." "."$m"." "."$year";
?>" />
</font></td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="left">เรื่อง <font color="#0000FF" size="2" face="Tahoma">
<input name="Detail" type="text" id="Detail" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="ขออนุมัติเดินทางไปราชการ" size="20" />
</font></td>
<td width="35"></td>
<td width="220"></td>
<td width="105"></td>
</tr>
<tr height="29">
<td height="29" colspan="5" align="left">เรียน ผู้อำนวยการ </a>
<?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>
<td></td>
</tr>
<tr height="29">
<td width="128" height="24"></td>
<td colspan="5" align="left">ข้าพเจ้า</a>
<input name="Name" type="text" id="Name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30" value="<? echo $rss[prefixName]?> <? echo $rss[Teacher_name]?> <? echo $rss[Teacher_lastname]?> " />
</a> ตำแหน่ง</a>
<input name="Name4" type="text" id="Name4" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30" 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] ";?>
" />
</a></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">สังกัด</a>
<input name="Name2" type="text" id="Name2" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="30" 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] "; ?>" />
</a>
<input name="Name3" type="text" id="Name3" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="40" value="<?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><span class="style1">สถาบันพระบรมราชชนก</span></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">ขออนุมัติเดินทางไปราชการ เรื่อง </a><? echo $rs1['Training_name'];?>
</a></td>
</tr>
<tr height="29">
<td height="26" colspan="6" align="left">ณ สถานที่ <? echo $rs3['CNEU'];?></a></td>
</tr>
<tr height="29">
<td height="26" colspan="6" align="left">เดินทางโดย </a>
<input type="radio" name="Travel" <?php if (!(strcmp("$rs1[Travel]","1"))){echo "checked";} ?> value="1" />
</a>โดยรถยนต์ของทางราชการ
<input type="radio" name="Travel" <?php if (!(strcmp("$rs1[Travel]","2"))){echo "checked";} ?> value="2" />
</a> รถยนต์ปรับอากาศ </a>
<input type="radio" name="Travel" <?php if (!(strcmp("$rs1[Travel]","3"))){echo "checked";} ?> value="3" />
</a>รถไฟ </a>
<input type="radio" name="Travel" <?php if (!(strcmp("$rs1[Travel]","4"))){echo "checked";} ?> value="4" />
</a>เครื่องบิน </a>
<input type="radio" name="Travel" <?php if (!(strcmp("$rs1[Travel]","5"))){echo "checked";} ?> value="5" />
</a>รถยนต์ส่วนตัว </a> </a></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left"><label>อ้างตามหนังสือราชการเลขที่</label>
</a>
<?php
// $ProjectId = $rs1["ProjectId"];
// $sql = "Select * From project_tb Where ProjectId='$ProjectId' ";
// $result2 = mysql_query($sql) or die("Error".mysql_error());
// $rs2 = mysql_fetch_array($result2);
//echo "$rs2[Orderlist]";
?>
</a>
<input name="No_in" type="text" id="No_in" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rs1[No_in];?>" size="35" />
<input name="Status" type="text" id="Status" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rs1[Status];?>" size="40" />
</a></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">กำหนดวันเดินทางในวันที่ </a>
<input name="Date_start" type="text" id="Date_start" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="10" value=" <?php
$sday = $rs1[Date_start];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo"$day"." "."$m"." "."$year";
?>" />
</a> และ จะกลับวันที่ </a>
<input name="Date_finish" type="text" id="Date_finish" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="10" value=" <?php
$sday = $rs1[Date_finish];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo"$day"." "."$m"." "."$year";
?>" />
</a>มีกำหนด</a>
<input name="Day" type="text" id="Day" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs1['Day'];?>" size="2" />
</a>วัน โดยขอเบิกค่าใช้จ่ายใน</td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">การเดินทางไปราชการและในระหว่างเดินทางไปราชการข้าพเจ้าขอมอบหมายในหน้าที่ </a>
<input name="assignMent" type="text" id="assignMent" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?php echo $rs1[assignMent];?>" size="30" />
</a></td>
</tr>
<tr height="29">
<td height="35" colspan="6" align="left"> ให้ </a>
<input name="assignmentName" type="text" id="assignmentName" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="25"value="<?php echo $rs1[assignmentName];?> " />
</a> เป็นผู้ปฏิบัติงานแทน </td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left"> จึงเรียนมาเพื่อโปรดอนุมัติด้วย จะเป็นพระคุณ</td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="left"> </td>
<td></td>
<td></td>
<td></td>
</tr>
<tr height="31">
<td height="31" colspan="2" align="left"> </td>
<td> </td>
<td colspan="2" align="center">ลงชื่อ ....................................</td>
<td></td>
</tr>
<tr height="29">
<td height="29"> </td>
<td width="57"> </td>
<td> </td>
<td colspan="2" align="center">(</a> <? echo $rss[prefixName]?> <? echo $rss[Teacher_name]?> <? echo $rss[Teacher_lastname]?></a> ) </td>
<td></td>
</tr>
<tr height="29">
<td height="23" colspan="3" align="left"> </td>
<td colspan="2" align="center">ตำแหน่ง
<input name="Name6" type="text" id="Name6" 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] ";?>
" />
</a></td>
<td></td>
</tr>
<tr height="29">
<td height="16" colspan="2" align="left"> </td>
<td align="left"> </td>
<td colspan="3" align="left"> </td>
</tr>
<tr height="29">
<td height="18" colspan="3" align="center">ลงชื่อ..................................หัวหน้าภาค/ฝ่าย.</td>
<td colspan="3" align="left"> </td>
</tr>
<tr height="29">
<td height="18" colspan="3" align="center">(</a>
<?php
//$Teacher_code = $rss["TeacherId"];
$sql = "Select * From personal_tb LEFT JOIN prefix ON personal_tb.First_name = prefix.prefixId Where Faculty_code ='$Faculty_code' and TeacherId='1' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[prefixName]$rs2[Teacher_name] $rs2[Teacher_lastname]";
?>
</a>) </td>
<td colspan="2">ความเห็นและคำสั่งผู้อำนวยการ</td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="center">ตำแหน่ง</a>
<input name="Name5" type="text" id="Name5" 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] ";?>
" />
</a></td>
<td align="left"> </td>
<td align="left"><input name="Flag2" type="checkbox" id="Flag2" <?php if ( !strcmp($rs1["Flag2"],"อนุมัติ") ) { echo "checked"; } ?> value="1" disabled="disabled" />
อนมัติ
<input name="Flag2" type="checkbox" id="Flag2" <?php if ( !strcmp($rs1["Flag2"],"ไม่อนุมัติ") ) { echo "checked"; } ?> value="2" disabled="disabled" />
ไม่อนุมัติ</td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left"> </td>
<td align="left"> </td>
<td colspan="2" align="center">ลงชื่อ ....................................</td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="28" colspan="2" align="left"> </td>
<td align="left"> </td>
<td colspan="2" align="left"> </td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left"> </td>
<td align="left"> </td>
<td colspan="2" align="left"> </td>
<td align="left"> </td>
</tr>
</table>
</td>
</tr>
</table>
|