Viewing file: FrmEditStdPlan.php (11.91 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;
$Username = $valid_user;
/** Config Table for This Page */
$myTable = "project_tb";
$myTable2 = "faculty_tb";
//=== salary_repot_tb
$query = " SELECT * FROM $myTable WHERE codeId='$codeId' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
} # 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" />
<script language="javascript" src="../js/utilities.js"></script>
<title>ข้อมูลแผนดำเนินงานและรายงาน : ข้อมูลแผนดำเนินการ รายปีงบประมาณ - เพิ่มข้อมูลแผน/โครงการรดำเนินงาน (ย่อย)</title>
<style type="text/css">
<!--
.style1 { font-size: 14px;
font-family: Tahoma;
}
.style5 {font-size: 14px; color: #FF0000; font-family: Tahoma;}
.style5 {font-size: 14px; color: #FF0000; font-family: Tahoma;}
.style6 {font-size: 14px; font-family: Tahoma; }
-->
</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" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset><table width="780" border="0" cellspacing="0" cellpadding="0">
<form id="myForm" name="myForm" method="post" action="EditStdPlanIn.php" onSubmit="return checkData();">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="30" background="../images/background/bg-head-topic-w780.gif" class="PADDING-LEFT-10"><strong><a href="index.php">หน้าหลัก</a></strong> <strong>» <a href="showPlaning.php?ProjectId=<? echo $rs['ProjectId']?>&Project_code=<? echo $rs['Project_code']?>&Faculty_code=<? echo $rs['Faculty_code']?>&Budget_Year=<? echo $rs['Budget_Year']?>">แสดงการแก้ไขกิจกรรม/โครงการ</a> » <a href="DetailRepPlaning.php?ProjectId=<?php echo $rs['ProjectId']; ?>&Orderlist=<?php echo $rs['Orderlist']; ?>&Project_code=<?php echo $rs['Project_code']; ?>&Faculty_code=<?=$rs['Faculty_code'];?>&Budget_Year=<?php echo $rs['Budget_Year'] ?>">รายงานการใช้เงินตามข้อย่อยแผน</a> » <span class="NOTE">แก้ไขข้อมูลการใช้เงินตามกิจกรรม/โครงการ</span></strong></td>
</tr>
<tr>
<td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" class="PADDING-TOP-10 PADDING-BOTTOM-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></td>
<td width="50%" align="right" valign="bottom" class="PADDING-TOP-10 PADDING-BOTTOM-5"><span class="TEXT-ORANGE9"> </span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="173" align="center" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
<tr>
<td height="29" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td height="43" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#E0E0E0">
<tr bgcolor="#EEEEEE">
<td width="23%" bgcolor="#FFFFFF">รายละเอียดของแผนดำเนินการ</a></td>
<td width="1%" bordercolor="#006699" bgcolor="#FFFFFF"><strong>*</strong></a></td>
<td width="76%" bordercolor="#006699" bgcolor="#FFFFFF"><p><font color="#0000FF" size="2" face="Tahoma">
<input name="Training_name" type="text" id="Training_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=htmlspecialchars_decode( $rs['Training_name'] ) ;?>" size="80" />
</font> </p></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="28" bgcolor="#FFFFFF">ผู้รับผิดชอบ</a></td>
<td bordercolor="#006699" bgcolor="#FFFFFF"> </td>
<td bordercolor="#006699" bgcolor="#FFFFFF"><span style="padding-top:15px;">
<select name="Teacher_code" id="Teacher_code">
<option value=""></option>
<?php
$sql1 = " SELECT * FROM personal_tb WHERE StatusId='1' AND ( Teacher_type='1' OR Teacher_type='2' OR Teacher_type='4' OR Teacher_type='5' OR Teacher_type='6' ) ORDER BY Teacher_name ASC ";
$result1 = mysql_query($sql1);
while( $rs1 = mysql_fetch_array($result1) ) {
?>
<option value="<?=$rs1['Teacher_code'];?>" <?php if( $rs1['Teacher_code']==$rs['Teacher_code'] ) echo 'selected';?>>
<?=$rs1['First_name'];?>
<?=$rs1['Teacher_name'];?>
<?=$rs1['Teacher_lastname'];?>
</option>
<?php
} # while
mysql_free_result($result1);
?>
</select>
</span></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF">หมวดเงิน</a></td>
<td bordercolor="#006699" bgcolor="#FFFFFF"> </td>
<td bordercolor="#006699" bgcolor="#FFFFFF"><select name="MoneyS_C" id="MoneyS_C">
<?php
$MoneyS_C = $rs[MoneyS_C];
$strSQL1 = "SELECT * FROM money_source_tb Where MoneyS_C='$MoneyS_C' ";
$result1 = mysql_query($strSQL1);
$strSQL2 = "SELECT * FROM money_source_tb Order By MoneyS_C ";
$result2 = mysql_query($strSQL2);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[MoneyS_C]\" ><b>$rs1[MoneyS_M]</b></option>\n";
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[MoneyS_C]\" ><b>$rs2[MoneyS_M]</b></option>\n";
}
}
?>
</select></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF">ประเภทหมวดค่าใช้จ่าย</a></td>
<td bordercolor="#006699" bgcolor="#FFFFFF"> </td>
<td bordercolor="#006699" bgcolor="#FFFFFF"><select name="MoneyId" id="MoneyId">
<?php
$MoneyId = $rs[MoneyId];
$strSQL2 = "SELECT * FROM money_tb Where MoneyId='$MoneyId' ";
$result2= mysql_query($strSQL2);
$strSQL3 = "SELECT * FROM money_tb Order By MoneyId ";
$result3= mysql_query($strSQL3);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[MoneyId]\" ><b>$rs2[MoneyName]</b></option>\n";
while( $rs3= mysql_fetch_array($result3))
{
echo"<option value=\"$rs3[MoneyId]\" ><b>$rs3[MoneyName]</b></option>\n";
}
}
//CloseDB();
?>
</select></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#99CC99" bgcolor="#FFFFFF">วัน/เดือน/ปี
(ที่</a>ดำเนินการ</a>)</a></td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">วันที่<font color="#000000" size="2" face="Tahoma">
<select name="mDate" class="select" id="mDate" >
<?php
$Date = $rs[Date];
$yearthai = explode("-",$Date);
$mDate = intval($yearthai[2]);
$mMonth = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
for($i=0;$i<=31;$i++)
{
if( $i == 0)
echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
else
echo"\n\t<option value=\"$i\">$i</option>\n ";
}
?>
</select>
</font>-<font color="#000000" size="2" face="Tahoma">
<select name="mMonth" class="select" id="mMonth" >
<?php
$Date= $rs[Date];
$yearthai = explode("-",$Date);
$mDate= intval($yearthai[2]);
$Month = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
$mMonth = $Month;
$CMonth = TxtThaiMonth($Month);
for($i=-1;$i<=11;$i++)
{
$a = $i+1;
if( $a == 0)
echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
else
echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
}
// getThaiMonth();
?>
</select>
</font><font color="#000000" face="Tahoma">-</font><font color="#000000" size="2" face="Tahoma">
<input name="mYear" type="text" class="style6" id="mYear" value="<? echo $mYear ?>" size="3" maxlength="4" />
</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF">จำนวนเงินที่ใช้</a></td>
<td bordercolor="#006699" bgcolor="#FFFFFF"><strong>*</strong></a></td>
<td align="center" bordercolor="#006699" bgcolor="#FFFFFF"><div align="left"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Budget_use" type="text" id="Budget_use" value="<? echo $rs['Budget_use']?>" size="10" />
</font></strong><font color="#003366" face="Tahoma"> <span class="style1">บาท </span></font> <span class="style5">*ไม่ต้องพิมพ์เครื่องหมาย comma (,)</span></div></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF">จำนวนเงินที่ใช้</a>จริง</td>
<td bordercolor="#006699" bgcolor="#FFFFFF"><strong>*</strong></a></td>
<td align="left" bordercolor="#006699" bgcolor="#FFFFFF"><a><? echo $rs['Spending_use']?></a> บาท </span></font></div></td>
</tr>
<tr bgcolor="#ECD9C6">
<td height="32" colspan="3" align="center" bgcolor="#FFFFFF"><input name="codeId" type="hidden" id="codeId" value="<?=$codeId;?>" />
<input name="Submit" type="submit" id="Submit" value=" แก้ไขข้อมูล " disabled="disabled" />
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr></form>
</table>
</fieldset></td>
</tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|