Viewing file: FrmeditPlan.php (10.48 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../include/FunctionDB.php");
include("../include/Function.php");
ConnectDB();
$Username = $valid_user;
$sql = "SELECT * FROM user_tb WHERE Username='$Username'";
$res = mysql_query($sql);
$rs1 = mysql_fetch_array($res);
$sql1 = " SELECT * FROM project_tb Where codeId='$codeId' ";
$result= mysql_query($sql1) or die("Select Has Error").mysql_error();
$rs = mysql_fetch_array($result);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link rel="stylesheet" href="../css/cart4.css" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function MM_reloadPage(init) { //reloads the window if Na v4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
}
var highlightcolor="lightyellow"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/
//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}
</script>
<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>
<table width="690" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="690"><fieldset>
<legend><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style1">หน้าหลัก </span></font></legend>
<label><div align="center">
<form id="form1" name="form1" method="post" action="EditStdPlanIn.php">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:0px solid gray"size="12">
<tr>
<td height="29" bgcolor="#FFFFFF"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font></td>
</tr>
<tr>
<td height="43" ><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E0E0E0">
<tr bgcolor="#EEEEEE">
<td width="26%" bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#000066" face="Tahoma">รายละเอียดของแผนดำเนินการ</font></div></td>
<td width="1%" bordercolor="#006699" bgcolor="#FFFFFF"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></td>
<td width="73%" bordercolor="#006699" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma">
<input name="Training_name" type="text" id="Training_name" value="<? echo $rs[Training_name]?>" size="70" />
</font> </td>
</tr>
<tr bordercolor="#99CCFF">
<td bgcolor="#FFFFFF"><div align="center" class="style15 style1"><font face="Tahoma, MS Sans Serif">หลักสูตร</font></div></td>
<td bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td>
<td bgcolor="#FFFFFF"><select name="programId" id="programId">
<?php
$strSQL = "SELECT * FROM Program Where programStatus ='Y' ";
$result1 = mysql_query($strSQL);
while( $rss = mysql_fetch_array($result1))
{
echo"<option value=\"$rss[programId]\" ><b>$rss[programName]</b></option>\n";
}
?>
</select>
<font color="#000000" size="2" face="Tahoma">ปี
<input name="Year" type="text" id="Year" value="<? echo $rs[Year]?>" size="1" maxlength="1" />
</font></td></tr>
<tr bgcolor="#EEEEEE">
<td bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">หมวดเงิน</font></div></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 bgcolor="#FFFFFF"><div align="center" class="style1"><font color="#003366" face="Tahoma">ประเภทหมวดค่าใช้จ่าย</font></div></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"><span class="style6"><font color="#000066" face="Tahoma">วัน/เดือน/ปี
(ที่</font><font face="Tahoma">ดำเนินการ</font><font color="#000066" face="Tahoma">)</font></span></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"><div align="center" class="style1"><font color="#003366" face="Tahoma">จำนวนเงินที่ใช้</font></div></td>
<td bordercolor="#006699" bgcolor="#FFFFFF"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></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="#ECD9C6">
<td height="32" colspan="3" bgcolor="#FFFFFF"><div align="center">
<input name="codeId" type="hidden" id="codeId" value="<? echo $rs[codeId]?>" />
<input name="Faculty_code" type="hidden" id="Faculty_code" value="<? echo $rs[Faculty_code]?>" />
<input name="Orderlist" type="hidden" id="Orderlist" value="<? echo $rs[Orderlist]?>" />
<input name="Submit" type="submit" id="Submit" value=" แก้ไขข้อมูล " />
<input type="button" name="close2" value="ปิดหน้าต่าง" onclick="window.close()" />
</div></td>
</tr>
</table></td>
</tr>
</table>
</form>
</div>
</label>
</fieldset><br></td>
</tr>
</table>
|