Viewing file: FrmEditPlaning.php (19.81 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php session_start();
if (session_is_registered("valid_user")&&session_is_registered("Priority")&&session_is_registered("password") ) { include("../include/FunctionDB.php"); include("../include/Function.php"); include("admin_menu.php"); ConnectDB(); $Username = $valid_user; $sql = "SELECT * FROM personal_tb WHERE Username='$Username'"; $res = mysql_query($sql); $rss = mysql_fetch_array($res); $sql = "Select * From project_type_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"> <style type="text/css"> <!-- .style14 {color: #000000} .style15 {font-size: 14px} .style17 {font-family: Tahoma; font-size: 12px; } .style18 {color: #003366} .style19 {font-family: Tahoma; font-size: 12px; color: #003366; } .style20 { color: #FF0000; font-size: 16px; } .style21 {font-size: 16px} --> </style> <table width="807" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="807"><br> <fieldset> <legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_teacher.php " >หน้าหลัก</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="PlaningByYear.php?Teacher_code=<? echo $rss[Teacher_code] ?>&Budget_Year=<?php echo $rs[Budget_Year] ?>&Faculty_code=<?php echo $rs[Faculty_code] ?> ">ข้อมูลแผนดำเนินงานรายปี</a></font></legend> <label><div align="center"> <form id="form1" name="form1" method="post" action="EditPlaning.php"> <table width="86%" border="0" align="center" cellpadding="0" cellspacing="0" style=" border:1px solid gray"size="12"> <tr> <td height="29" background="../Image/barIns2.jpg" bgcolor="#D1E1F0"><div align="center"><font size="2" face="Tahoma">ขณะนี้ อ.<font size="2" face="Tahoma"><font color="#993333"><strong><? echo $rss['Teacher_name'] ?></strong></font></font><font color="#993333"><strong> <? echo $rss['Teacher_lastname'] ?> </strong></font><span class="style14">รหัสประจำตัว</span> <font color="#993333"><strong><? echo $rss['Teacher_id'] ?></strong></font> กำลังใช้งานระบบ</font></div></td> </tr> <tr> <td height="43" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E0E0E0"> <tr bgcolor="#ECD9C6"> <td height="31" colspan="3"><div align="center" class="style17"><font face="Tahoma"><span class="style20">แก้ไข</span></font><span class="style21"><font color="#000000" face="Tahoma">ข้อมูลตามแผนดำเนินการ</font><font color="#000000" face="Tahoma"></font><font color="#000000" face="Tahoma"> </font></span></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 size="2" face="MS Sans Serif, Tahoma, sans-serif"> </select> <select name="Faculty_name" class="input1" id="Faculty_name"> <?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></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="Orderlist" type="text" id="Orderlist" value="<? echo $rs[Orderlist]?>" size="6" /></td> </tr> <tr bgcolor="#EEEEEE"> <td><div align="center"><font color="#000066" size="2" face="Tahoma">ชื่อหัวข้อแผนดำเนินการ</font></div></td> <td bordercolor="#006699"> </td> <td bordercolor="#006699"><input name="Project_plan" type="text" id="Project_plan" value="<? echo $rs[Project_plan]?>" 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"><input name="Orderlist_2" type="text" id="Orderlist_2" value="<? echo $rs[Orderlist_2]?>" size="6" /></td> </tr> <tr bgcolor="#EEEEEE"> <td width="25%"><div align="center"><font color="#000066" size="2" face="Tahoma">รายละเอียดของแผนดำเนินการ</font></div></td> <td width="1%" bordercolor="#006699"> </td> <td width="74%" bordercolor="#006699"><input name="Project_name" type="text" id="Project_name" 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"><select name="Percent_ans" id="Percent_ans"> <option value="งปม"<?php if($rs['Percent_ans']=="งปม"){ echo "selected" ; } ?>>เงินงบประมาณ</option> <option value="งบศ"<?php if($rs['Percent_ans']=="งบศ"){ echo "selected" ; } ?>>เงินบำรุงการศึกษา</option> <option value="งบส"<?php if($rs['Percent_ans']=="งบส"){ echo "selected" ; } ?>>เงินบำรุงสถานบริการ</option> <option value="งลท"<?php if($rs['Percent_ans']=="งลท"){ echo "selected" ; } ?>>เงินลงทะเบียน</option> <option value="งสบช"<?php if($rs['Percent_ans']=="งสบช"){ echo "selected" ; } ?>>เงินบประมาณ สบช</option> <option value="งสวส"<?php if($rs['Percent_ans']=="งสวส"){ echo "selected" ; } ?>>เงินงบประมาณ สวส</option> </select></td> </tr> <tr bgcolor="#EEEEEE"> <td bgcolor="#EEEEEE"><div align="center"><font color="#003366" size="2" face="Tahoma">วันที่เริ่มดำเนินการ</font></div></td> <td> </td> <td><div align="left"> <font color="#000000" size="2" face="Tahoma">่ <select name="mDate1" id="select4" class="select" > <?php $Date_start = $rs[Date_start ]; $yearthai = explode("-",$Date_start ); $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="mMonth1" id="select5" class="select" > <?php $Date_start = $rs[Date_start ]; $yearthai = explode("-",$Date_start ); $mDate= intval($yearthai[2]); $Month = intval($yearthai[1]); $mYear2= 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" id="mYear" size="4" class="input1" value="<? echo $mYear?>"> </font><font size="2" face="Tahoma"> วันสิ้นสุด<font color="#000000">-</font></font><font color="#000000" size="2" face="Tahoma"> <select name="mDate2" id="select4" class="select" > <?php $Date_finish = $rs[Date_finish]; $yearthai = explode("-",$Date_finish ); $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="mMonth2" id="select5" class="select" > <?php $Date_finish = $rs[Date_finish ]; $yearthai = explode("-",$Date_finish); $mDate= intval($yearthai[2]); $Month = intval($yearthai[1]); $mYear2= 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" id="mYear" size="4" class="input1" value="<? echo $mYear?>"> </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="#003366" size="2" face="Tahoma"> <input name="Budget_Year" type="text" id="Budget_Year" value="<? echo $rs[Budget_Year]?>" size="5" /> </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="Term" type="text" id="Term" value="<? echo $rs[Term]?>" size="5" /> </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="Period" type="text" id="Period" value="<? echo $rs[Period]?>" size="30" /> </font></td> </tr> <tr bgcolor="#EEEEEE"> <td height="140"><div align="center"><span class="style15"><font color="#003366" face="Tahoma">งบประมาณแต่ละเดือน</font></span></div></td> <td bordercolor="#006699"> </td> <td bordercolor="#006699"><table width="489" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <th width="99" scope="col"><div align="center" class="style19"> <div align="left"><font size="2" face="Tahoma">มกราคม</font></div> </div></th> <th width="121" scope="col"><div align="left" class="style17"> <input name="January" type="text" id="January" value="<? echo $rs[January]?>" size="6" /> บาท</div></th> <th width="110" scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">กรฏาคม</font></div> </div></th> <th width="100" scope="col"><div align="left" class="style17"> <input name="July" type="text" id="July" value="<? echo $rs[July]?>" size="6" /> บาท</div></th> <th width="37" scope="col"> </th> </tr> <tr> <th scope="col"><div align="center" class="style18"> <div align="left"><span class="style17"><font size="2" face="Tahoma">กุมภาพันธ</font></span><font size="2" face="Tahoma">์</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="February" type="text" id="February" value="<? echo $rs[February]?>" size="6" /> บาท </div></th> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">สิงหาคม</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="Augus" type="text" id="Augus" value="<? echo $rs[Augus]?>" size="6" /> บาท </div></th> <td> </td> </tr> <tr> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">มีนาคม</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="March" type="text" id="March" value="<? echo $rs[March]?>" size="6" /> บาท </div></th> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">กันยายน</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="September" type="text" id="September" value="<? echo $rs[September]?>" size="6" /> บาท </div></th> <td> </td> </tr> <tr> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">เมษายน</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="April" type="text" id="April" value="<? echo $rs[April]?>" size="6" /> บาท </div></th> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">ตุลาคม</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="October" type="text" id="October" value="<? echo $rs[October]?>" size="6" /> บาท </div></th> <td> </td> </tr> <tr> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">พฤษภาคม</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="May" type="text" id="May" value="<? echo $rs[May]?>" size="6" /> บาท </div></th> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">พฤศจิกายน</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="November" type="text" id="November" value="<? echo $rs[November]?>" size="6" /> บาท </div></th> <td> </td> </tr> <tr> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">มิถุนายน</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="June" type="text" id="June" value="<? echo $rs[June]?>" size="6" /> บาท </div></th> <th scope="col"><div align="center" class="style18"> <div align="left"><font size="2" face="Tahoma">ธันวาคม</font></div> </div></th> <th scope="col"><div align="left" class="style17"> <input name="December" type="text" id="December" value="<? echo $rs[December]?>" size="6" /> บาท </div></th> <td> </td> </tr> </table></td> </tr> <tr bgcolor="#ECD9C6"> <td colspan="3"><div align="center"> <input name="PTeacher_code" type="hidden" id="PTeacher_code" value="<? echo $rs[Teacher_code]?>" /> <input name="Project_code" type="hidden" id="Project_code" value="<? echo $rs[Project_code]?>" /> <input type="submit" name="Submit3" value="แก้ไขข้อมูล" /> </div></td> </tr> </table></td> </tr> </table> </form> </div> </label> </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 "; } ?>
|