Viewing file: FrmEditProject.php (13.8 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user")&&session_is_registered("Priority") )
{
include("../include/FunctionDB.php");
include("admin_menu.php");
include("../include/Function.php");
ConnectDB();
$sql = "Select * From edu_service_tb Where Project_code='$Project_code' ";
$result = mysql_query($sql) or die("Error".mysql_error());
$rs = mysql_fetch_array($result);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<table width="835" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="835" ><br>
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_personal.php">หน้าหลัก</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="ProjectList.php?Faculty_code=<? echo $rs[Faculty_code] ?>">ข้อมูลการโครงการ</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">แก้ไข-โครงการ/กิจกรรมบริการวิชาการ</font></legend>
<label>
<form action="EditProject.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<p align="left"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font></p>
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" style="border:0px solid gray">
<tr bgcolor="#EEEEEE">
<td colspan="3"> </td>
</tr>
<tr bgcolor="#EEEEEE">
<td width="34%"><div align="center"><font color="#003366" size="2" face="Tahoma">ชื่อโครงการ</font></div></td>
<td width="0%" bordercolor="#006699"> </td>
<td width="66%" bordercolor="#006699"><input name="Project_name" type="text" class="input1" value="<? echo $rs[Project_name]?>" size="60" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">ระยะเวลา</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><div align="left"> <font color="#000000" size="2" face="Tahoma">วันที่
<select name="mDate" id="select" class="select" >
<?php
$DateBirth = $rs[Period];
$yearthai = explode("-",$DateBirth);
$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 ";
}
// getDay1to31();
?>
</select>
เดือน
<select name="mMonth" id="select4" class="select" >
<?php
$DateBirth = $rs[Period];
$yearthai = explode("-",$DateBirth);
$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>
ปี พ.ศ.
<input name="mYear" type="text" class="input1" id="mYear3" value="<? echo $mYear ?>" size="10" />
</font></div></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">วันที่ดำเนินการ</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#000000" size="2" face="Tahoma">วันที่
<select name="mDate2" id="select3" class="select" >
<?php
$Date_start = $rs[Date_start];
$yearthai = explode("-",$Date_start);
$mDate = intval($yearthai[2]);
$mMonth = intval($yearthai[1]);
$mYear2 = 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 ";
}
// getDay1to31();
?>
</select>
เดือน
<select name="mMonth2" id="select5" class="select" >
<?php
$Date_start = $rs[Date_start];
$yearthai = explode("-",$Date_start);
$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>
ปี พ.ศ.
<input name="mYear2" type="text" class="input1" id="mYear2" value="<? echo $mYear2 ?>" size="10" />
</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">ปีการศึกษา</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699" bgcolor="#EEEEEE"><input name="Term" type="text" id="Term" value="<? echo $rs[Term]?>" size="10" class="input1" />
<font size="2" face="Tahoma">ปี พ.ศ งบประมาณ
<input name="Year_budget" type="text" id="Year_budget" value="<? echo $rs[Year_budget]?>" size="10" class="input1" />
</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">งบประมาณประมาณการ</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><input name="Budget" type="text" class="input1" id="Budget" value="<? echo $rs[Budget]?>" size="10" />
<font color="#003366" size="2" face="Tahoma">บาท</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">เงินที่ใช้จริง</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><input name="Budget_use" type="text" class="input1" id="Budget_use" value="<? echo $rs[Budget_use]?>" size="10" />
<font color="#003366" size="2" face="Tahoma"> บาท</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">จำนวนผู้เข้าร่วมการ</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><input name="Target_group" type="text" class="input1" id="Target_group" value="<? echo $rs[Target_group]?>" size="10" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">วัตถุประสงค์</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><textarea name="Objective" cols="50" rows="5" id="Objective" class="input1"><? echo $rs[Objective]?></textarea></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">รับเงินสนับสนุนจากแหล่งอื่น</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><label>
<input name="Fund_support" type="text" class="input1" id="Fund_support" value="<? echo $rs[Fund_support]?>" size="50" />
</label></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">ค่าลงทะเบียน/คน</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font size="2" face="Tahoma">
<label>
<input name="Res" type="radio" <?php if (!(strcmp("$rs[Res]","Y"))) {echo "checked";} ?> value="Y" />
</label>
</font><font color="#000000"> </font><font color="#003366" size="2" face="Tahoma">ลงทะเบียน</font> <font color="#000000">
<input name="Fee" type="text" class="input1" id="Fee" value="<? echo $rs[Fee]?>" size="10" />
<font size="2" face="Tahoma">บาท
<label>
<input name="Res" type="radio" <?php if (!(strcmp("$rs[Res]","N"))) {echo "checked";} ?> value="N" />
</label>
ไม่</font><font color="#003366" size="2" face="Tahoma">ลงทะเบียน</font></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">ตอบสนอง</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><input name="Response" type="text" class="input1" id="Response" value="<? echo $rs[Response]?>" size="60" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">จำนวนชั่วโมงทั้งหมดของโครงการ</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#003366" size="2" face="Tahoma">
<input name="Total_time_project" type="text" class="input1" id="Total_time_project" value="<? echo $rs[Total_time_project]?>" size="8" />
ชั่วโมง</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">จำนวนชั่วโมงที่บุคลากรเป็นวิทยากร</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#003366" size="2" face="Tahoma">
<input name="Total_time_insi" type="text" class="input1" id="Total_time_insi" value="<? echo $rs[Total_time_insi]?>" size="8" />
ชั่วโมง</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">จำนวนชั่วโมงที่เชิญวิทยากรภายนอก</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#003366" size="2" face="Tahoma">
<input name="Total_time_inso" type="text" class="input1" id="Total_time_inso" value="<? echo $rs[Total_time_inso]?>" size="8" />
ชั่วโมง</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">สถานที่จัด</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><input name="Detail" type="text" class="input1" id="Detail" value="<? echo $rs[Detail]?>" size="50" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">ผลการดำเนินงานตามแผน</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699" bgcolor="#EEEEEE"><input type="radio" name="Result_oper" <?php if (!(strcmp("$rs[Result_oper]","1"))) {echo "checked";} ?> value="1" />
<font size="2" face="Tahoma"> เสร็จตามแผน
<input type="radio" name="Result_oper" <?php if (!(strcmp("$rs[Result_oper]","2"))) {echo "checked";} ?> value="2" />
ไม่เสร็จตามแผน
<input type="radio" name="Result_oper" <?php if (!(strcmp("$rs[Result_oper]","3"))) {echo "checked";} ?> value="3" />
ไม่ได้ทำ </font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">หน่วยงาน ที่จัด</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><strong><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<select name="Faculty_code" class="input1" id="Faculty_code">
<?php
$Faculty_code= $rs[Faculty_code];
$strSQL1 = "SELECT * FROM faculty_tb Where Faculty_code='$Faculty_code' ";
$result1 = mysql_query($strSQL1);
$strSQL2 = "SELECT * FROM faculty_tb Order By Faculty_name ";
$result2 = mysql_query($strSQL2);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[Faculty_code]\" ><b>$rs1[Faculty_name]</b></option>\n";
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Faculty_code]\" ><b>$rs2[Faculty_name]</b></option>\n";
}
}
CloseDB();
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center"><font color="#003366" size="2" face="Tahoma">โหลดโครงการ </font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><table width="82%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%" height="34"><div align="center">
<div align="left">
<input name="Img1" type="file" id="Img1" onchange="browse()>
width="20% />
</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#E0F9DF">
<td colspan="3"><div align="center">
<input type="hidden" name="Project_code" value="<? echo $rs[Project_code]?>" />
<input type="submit" name="Submit" value=" แก้ไข " />
</div></td>
</tr>
</table>
</form>
</fieldset>
<br>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br>
</font></td>
</tr>
</table>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
echo"Please Login ";
}
?>
|