Viewing file: AddPlaningIn.php (19.48 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);
$rs1 = mysql_fetch_array($res);
$sql1 = " SELECT * FROM project_type_tb Where Project_code='$Project_code' ";
$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" src="../calendar/ew.js"></script>
<script language="JavaScript" src="../calendar/popcalendar.js"></script>
<style type="text/css">
<!--
.style1 {font-size: 14px}
.style2 {
font-size: 16px;
font-weight: bold;
}
-->
</style>
<table width="807" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="807"><br>
<fieldset>
<legend><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style1"><a href="menu_teacher.php " >หน้าหลัก</a><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="PlaningByYear.php?Teacher_code=<? echo $rs[Teacher_code] ?>&Budget_Year=<?php echo $rs[Budget_Year] ?>&Faculty_code=<?php echo $rs[Faculty_code] ?> ">ข้อมูลแผนดำเนินงานรายปี</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="EditPlaningByYear.php?Teacher_code=<? echo $rs[Teacher_code] ?>&Faculty_code=<? echo $rs[Faculty_code] ?>">แก้ไขข้อมูลแผนดำเนินการรายปี</a><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" />เพิ่มข้อมูลแผนดำเนินการ</span></font></legend>
<label><div align="center">
<form id="form1" name="form1" method="post" action="InsertPlaningIn.php">
<table width="91%" 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" class="style1"><font face="Tahoma">ขณะนี้ อ.<font color="#993333"><strong><? echo $rs1['Teacher_name'] ?> <? echo $rs1['Teacher_lastname'] ?> </strong></font><span class="style14">รหัสประจำตัว</span> <font color="#993333"><strong><? echo $rs1['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="style2"><font color="#000000" face="Tahoma">เพิ่มหัวข้อรายละเอียดของแผนดำเนินการ</font> </div></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center" class="style1"><font color="#003366" face="Tahoma">รหัสหน่วยงาน</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#0033CC" size="2" face="Tahoma">
<?php
$Faculty_code = $rs["Faculty_code"];
$sql = "Select * From faculty_tb Where Faculty_code='$Faculty_code' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rss = mysql_fetch_array($result1);
echo "$rss[Faculty_code] - $rss[Faculty_name]";
?>
</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center" class="style1"><font color="#003366" face="Tahoma">รหัสแผน</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Orderlist];?></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center" class="style1"><font color="#000066" face="Tahoma">ชื่อแผนงานโครงการ</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Project_plan];?></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center" class="style1"><font color="#003366" face="Tahoma">วัตถุประสงค</font>์</div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Orderlist_2];?></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td width="26%"><div align="center" class="style1"><font color="#000066" face="Tahoma">รายละเอียดของแผนดำเนินการ</font></div></td>
<td width="1%" bordercolor="#006699"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></td>
<td width="73%" bordercolor="#006699"><font color="#003366" size="2" face="Tahoma">
<input name="Project_name" type="text" id="Project_name" size="70" />
</font> </td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22"><div align="center" class="style1"><font color="#003366" face="Tahoma">ชื่อผู้ดำเนินการ</font></div></td>
<td bordercolor="#006699"> </td>
<td align="center" bordercolor="#006699"><div align="left"><strong><font color="#003366" size="2" face="Tahoma">
<select name="Teacher_code" id="Teacher_code">
<?php
$Teacher_code =$rs1 [Teacher_code];
$strSQL2 = "SELECT * FROM personal_tb Where Teacher_code='$Teacher_code' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[First_name] $rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font> </strong></div></td>
</tr>
<tr bordercolor="#99CCFF">
<td bgcolor="#EEEEEE"><div align="center" class="style15 style1"><font face="Tahoma, MS Sans Serif">หลักสูตร</font></div></td>
<td bgcolor="#EEEEEE"><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td>
<td bgcolor="#EEEEEE"><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" size="2" maxlength="1" />
</font></td></tr>
<tr bgcolor="#EEEEEE">
<td><div align="center" class="style1"><font color="#003366" face="Tahoma">หมวดเงิน</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Percent_ans];?></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td bgcolor="#EEEEEE"><div align="center" class="style1"><font color="#003366" face="Tahoma">วันที่เริ่มดำเนินการ</font></div></td>
<td> </td>
<td><div align="left"> <font size="2" face="Tahoma">วันเริ่มต้น </font> <font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Date_start];?></font><font size="2" face="Tahoma"> วันสิ้นสุด </font><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Date_finish];?></font></div></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center" class="style1"><font color="#003366" face="Tahoma">ปีงบประมาณ พ.ศ.</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#003366" size="2" face="Tahoma"> </font><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Budget_Year];?></font><font color="#003366" size="2" face="Tahoma"> </font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td><div align="center" class="style1"><font color="#003366" face="Tahoma">กลุ่มเป้าหมาย จำนวน</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><font color="#0033CC" size="2" face="Tahoma"><? echo $rs[Period];?></font><font color="#003366" size="2" face="Tahoma"> </font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="127"><div align="center" class="style1"><font color="#003366" face="Tahoma">งบประมาณแต่ละเดือน</font></div></td>
<td bordercolor="#006699"> </td>
<td bordercolor="#006699"><table width="489" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<th width="99" class="style1" scope="col"><div align="center" class="style16 style1 ">
<div align="left" class="style1">มกราคม</div>
</div></th>
<th width="121" scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[January]?></font><font face="Tahoma"> <span class="style1">บาท</span></font></div></th>
<th width="110" scope="col"><div align="center" class="style15 style1">
<div align="left" class="style1"><font face="Tahoma">กรฏาคม</font></div>
</div></th>
<th width="100" scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[July]?></font><font face="Tahoma"> บาท</font></div></th>
<th width="37" scope="col"> </th>
</tr>
<tr>
<th class="style1" scope="col"><div align="center" class="style15 style1 ">
<div align="left"><span class="style14">กุมภาพันธ</span>์</div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[February]?></font><font face="Tahoma"> บาท </font></div></th>
<th scope="col"><div align="center" class="style15 style1">
<div align="left" class="style1"><font face="Tahoma">สิงหาคม</font></div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[Augus]?></font><font face="Tahoma"> บาท </font></div></th>
<td> </td>
</tr>
<tr>
<th class="style1" scope="col"><div align="center" class="style15 style1 ">
<div align="left">มีนาคม</div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[March]?></font><font face="Tahoma"> บาท </font></div></th>
<th scope="col"><div align="center" class="style15 style1">
<div align="left" class="style1"><font face="Tahoma">กันยายน</font></div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[September]?></font><font face="Tahoma"> บาท </font></div></th>
<td> </td>
</tr>
<tr>
<th class="style1" scope="col"><div align="center" class="style15 style1 ">
<div align="left">เมษายน</div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[April]?></font><font face="Tahoma"> บาท </font></div></th>
<th scope="col"><div align="center" class="style15 style1">
<div align="left" class="style1"><font face="Tahoma">ตุลาคม</font></div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[October]?></font><font face="Tahoma"> บาท </font></div></th>
<td> </td>
</tr>
<tr>
<th class="style1" scope="col"><div align="center" class="style15 style1 ">
<div align="left">พฤษภาคม</div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[May]?></font><font face="Tahoma"> บาท </font></div></th>
<th scope="col"><div align="center" class="style15 style1">
<div align="left" class="style1"><font face="Tahoma">พฤศจิกายน</font></div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[November]?></font><font face="Tahoma"> บาท </font></div></th>
<td> </td>
</tr>
<tr>
<th height="20" class="style1" scope="col"><div align="center" class="style15 style1 ">
<div align="left">มิถุนายน</div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[June]?></font><font face="Tahoma" class="style1"> บาท </font></div></th>
<th scope="col"><div align="center" class="style15 style1">
<div align="left" class="style1"><font face="Tahoma">ธันวาคม</font></div>
</div></th>
<th scope="col"><div align="left" class="style14 style1"> <font color="#0033CC" face="Tahoma"><? echo $rs[December]?></font><font face="Tahoma"> บาท </font></div></th>
<td> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="20"><div align="center" class="style1"><font color="#003366" face="Tahoma">ยอดรวม</font></div></td>
<td bordercolor="#006699"> </td>
<td align="center" bordercolor="#006699"><strong> <font color="#0033CC" face="Tahoma" class="style17"><span class="style18"><font color="#0033CC" face="Tahoma"><? echo $rs[Budget_use]?></font></span> </font></strong><font color="#0033CC" face="Tahoma" class="style17"><span class="style1">บาท</span></font> </td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#99CC99" bgcolor="#E1E1E1"><div align="center" class="style1"><font color="#000066" face="Tahoma">วัน/เดือน/ปี
(ที่</font><font face="Tahoma">ดำเนินการ</font><font color="#000066" face="Tahoma">)</font></div></td>
<td bordercolor="#CCCCCC" bgcolor="#E1E1E1"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></td>
<td bordercolor="#CCCCCC" bgcolor="#E1E1E1"><input name="Start_Date" type="text" id="Start_Date" size="8" />
<?php include("../calendar/phpmkrfn.php") ?>
<strong>
<input name="image" type="image" onclick="popUpCalendar(this, this.form.Start_Date,'yyyy-mm-dd');return false;" src="../images/mysql_calendar.gif" alt="Pick a Date" align="middle" width="16" height="16" />
</strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22"><div align="center" class="style1"><font color="#003366" face="Tahoma">จำนวนเงินที่ใช้</font></div></td>
<td bordercolor="#006699"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></td>
<td align="center" bordercolor="#006699"><div align="left"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Budget_use" type="text" id="Budget_use" size="10" />
</font></strong><font color="#003366" face="Tahoma"> <span class="style1">บาท </span></font> </div></td>
</tr>
<tr bgcolor="#ECD9C6">
<td colspan="3"><div align="center">
<input name="Project_code" type="hidden" id="Project_code" value="<? echo $rs[Project_code]?>" />
<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="Project_plan2" type="hidden" id="Project_plan2" value="<? echo $rs[Project_plan]?>" />
<input name="Budget_Year" type="hidden" id="Budget_Year" value="<? echo $rs[Budget_Year]?>" />
<input type="submit" name="Submit3" value=" เพิ่ม " />
<input type="reset" name="Submit22" 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 ";
}
?>
|