Viewing file: FrmAddProjectPlaning.php (22.14 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" );
/** Create Database Object */
$dbObj = new DBConn;
$Username = $valid_user;
/** Config Table for This Page */
$myTable = "project_type_tb";
$myTable2 = "faculty_tb";
$myTable3 = "project_mission";
//===
$query = " SELECT * FROM $myTable WHERE ProjectId='$ProjectId' and Faculty_code='$Faculty_code' and Budget_Year='$Budget_Year' ";
$result = $dbObj->execQuery($query);
$rs = $dbObj->fetchArray($result);
$query = " SELECT * FROM project_plan WHERE proId='$proId' and Budget_Year='$Budget_Year' ";
$result3 = $dbObj->execQuery($query);
$rs3 = $dbObj->fetchArray($result3);
} # 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" />
<meta http-equiv="pragma" content="no-cache" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script type="text/javascript" src="../js/ajaxScript.js"></script>
<script type="text/javascript" src="../js/nicEdit/nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<script language="javascript">
function checkData() {
var formObj = document.myForm;
if( (formObj.Orderlist.value == "" ) && (formObj.Project_plan.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.Orderlist.style.backgroundColor='#F1F9FC'; formObj.Orderlist.focus(); return false; }
else if(formObj.Orderlist.value == "" ) { alert("กรุณากรอก รหัสแผน"); formObj.Orderlist.style.backgroundColor='#F1F9FC'; formObj.Orderlist.focus(); return false;}
else if(formObj.Project_plan.value == "" ) { alert("กรุณากรอก รายละเอียดแผนงาน/โครงการ (ย่อย)"); formObj.Project_plan.style.backgroundColor='#F1F9FC'; formObj.Project_plan.focus(); return false;}
else return true ;
}
</script>
<title>ข้อมูลแผนดำเนินงานและรายงาน : ข้อมูลแผนดำเนินการ รายปีงบประมาณ - เพิ่มข้อมูลแผน/โครงการรดำเนินงาน (ย่อย)</title>
</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="InsertProjectSub.php?Faculty_code=<?=$Faculty_code;?>&Budget_Year=<?=$Budget_Year ;?>" 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="ProjectAcadmic.php?Budget_Year=<?=$Budget_Year ; ?>&Faculty_code=<?=$Faculty_code ;?>">แผนปฏิบัติการรายหน่วยงาน</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="350" align="center" valign="top"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="3" bgcolor="#F8F8F8" style="border:1px solid #F0F0F0">
<tr>
<td colspan="3" height="5" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td width="17%" height="25" align="right" bgcolor="#FFFFFF">รหัสหน่วยงาน</td>
<td width="1%" bgcolor="#FFFFFF">:</td>
<td width="82%" bgcolor="#FFFFFF"><select name="Faculty_code" id="Faculty_code" onchange="getOrderListID()">
<?php
$strSQL = " SELECT * FROM $myTable2 Where FacultyStatus ='Y' and Faculty_code='$Faculty_code' ";
$result1 = $dbObj->execQuery($strSQL);
while( $rs1 = $dbObj->fetchArray($result1) ) {
?>
<option value="<?=$rs1['Faculty_code'];?>" <?=(isset($_REQUEST['Faculty_code']) && $_REQUEST['Faculty_code'] == $rs1['Faculty_code'])?"selected":"";?>><?=$rs1['Faculty_name'];?></option>
<?php
} # while
?>
</select></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">แผนปฏิบัติตามพัธกิจ</a></td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><select name="subId" id="subId">
<option value=""></option>
<?php
$sql4= " SELECT * FROM project_submission ps, project_mission pm Where pm.Budget_Year='$Budget_Year' and pm.missId=ps.missId ";
$result4 = mysql_query($sql4);
while( $rs4 = mysql_fetch_array($result4) ) {
?>
<option value="<?=$rs4['subId'];?>" <?php if( $rs4['subId']==$rs['subId'] ) echo 'selected';?>>
<?=$rs4['sub_Orderlist']; ?>
::
<?=$rs4['submission_plan'];?>
</option>
<?php
} # while
mysql_free_result($result4);
?>
</select></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF"><span class="TEXT-RED10"><sup>*</sup></span> ปีงบประมาณ</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><input name="Budget_Year" type="text" id="Budget_Year" value="<?php echo $rs['Budget_Year']; ?>" size="4" maxlength="4" readonly="readonly" /></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF"><span class="TEXT-RED10"><sup>*</sup></span> ปีการศึกษา</td>
<td bgcolor="#FFFFFF">:</td>
<td bgcolor="#FFFFFF"><input name="AcademicYear" type="text" id="AcademicYear" value="<?php echo $rs['AcademicYear']; ?>" size="4" maxlength="4" /></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">*ข้อกิจกรรม</td>
<td bgcolor="#FFFFFF">:</td>
<td valign="baseline" bgcolor="#FFFFFF">
<span id="order"><input name="Orderlist" type="text" id="Orderlist" value="<?php echo $rs['Orderlist']; ?>" size="8">
</span>หลักที่ 1-2 คือ ปีงบประมาณ , 3-4 คือ รหัสหน่วยงาน , 5-6 คือ รหัสโครงการ, 7-8 คือลำดับข้อ</td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#FFFFFF" style="padding-top:3px;"><input name="plId" type="radio"<?php if ( !strcmp("$rs[plId]","1") ) { echo "checked"; } ?> value="1"/>
โครงการ/<input name="plId" type="radio"<?php if ( !strcmp("$rs[plId]","2") ) { echo "checked"; } ?> value="2" />
กิจกรรม <?=$rs3['Project_plan'];?></td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#FFFFFF" style="padding-top:3px;"> รายละเอียดแผนงานกิจกรรม : </td>
</tr>
<tr>
<td align="right" valign="top" bgcolor="#FFFFFF" style="padding-top:3px;"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF" style="padding-top:5px;"><textarea name="Project_plan" cols="80" rows="4" class="input" id="Project_plan" ><?=$rs['Project_plan'] ;?></textarea>
</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" style="padding-top:10px;"> </td>
<td align="center" bgcolor="#FFFFFF"> </td>
<td height="25" align="left" bgcolor="#FFFFFF" > </td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">วันที่เริ่มต้น</td>
<td align="left" bgcolor="#FFFFFF">:</td>
<td height="25" align="left" bgcolor="#FFFFFF"></a>
<select name="mDate" id="mDate" class="select" >
<?php
$Date = $rs[Date_start];
$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 ";
}
// getDay1to31();
?>
</select>
เดือน
<select name="mMonth" id="mMonth" class="select" >
<?php
$Date = $rs[Date_start];
$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>
ปี พ.ศ.
<input name="mYear" type="text" id="mYear" value="<? echo $mYear ; ?>" size="4" maxlength="4" />
</font></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">วันที่สิ้นสุด</td>
<td align="left" bgcolor="#FFFFFF">:</td>
<td height="25" align="left" bgcolor="#FFFFFF"></a>
<select name="mDate1" id="mDate1" class="select" >
<?php
$Date = $rs[Date_finish];
$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 ";
}
// getDay1to31();
?>
</select>
เดือน
<select name="mMonth1" id="mMonth1" class="select" >
<?php
$Date = $rs[Date_finish];
$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>
ปี พ.ศ.
<input name="mYear1" type="text" id="mYear1" value="<? echo $mYear ; ?>" size="4" maxlength="4" />
</font></td>
</tr>
<tr>
<td height="25" colspan="3" align="left" bgcolor="#FFFFFF" style="padding-top:13px"> <a>จำนวนเงินงบประมาณตั้งตามไตรมาส </a>
</tr>
<tr>
<td align="right" valign="top" bgcolor="#FFFFFF" style="padding-top:13px"> </td>
<td align="center" bgcolor="#FFFFFF"> </td>
<td height="25" align="left" valign="top" bgcolor="#FFFFFF" style="padding-top:8px"><table width="91%" border="0" cellpadding="1" cellspacing="2" bgcolor="#F8F8F8">
<tr bgcolor="#F8F8F8">
<td width="13%" align="right" bgcolor="#FFFFFF">มกราคม </td>
<td width="31%" align="left" bgcolor="#FFFFFF"><input name="January" type="text" id="January" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['January'];?>" size="10" maxlength="10" />
ไตรมาส ๒</td>
<td width="11%" align="right" bgcolor="#FFFFFF">กรฏาคม</td>
<td width="45%" align="left" bgcolor="#FFFFFF"><input name="July" type="text" id="July" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['July'];?>" size="10" maxlength="10" />
ไตรมาส ๔</td>
</tr>
<tr bgcolor="#F8F8F8">
<td align="right" bgcolor="#FFFFFF">กุมภาพันธ์ </td>
<td align="left" bgcolor="#FFFFFF"><input name="February" type="text" id="February" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['February'];?>" size="10" maxlength="10" />
ไตรมาส ๒</td>
<td align="right" bgcolor="#FFFFFF">สิงหาคม</td>
<td align="left" bgcolor="#FFFFFF"><input name="Augus" type="text" id="Augus" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['Augus'];?>" size="10" maxlength="10" />
ไตรมาส ๔</td>
</tr>
<tr bgcolor="#F8F8F8">
<td align="right" bgcolor="#FFFFFF">มีนาคม</td>
<td align="left" bgcolor="#FFFFFF"><input name="March" type="text" id="March" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['March'];?>" size="10" maxlength="10" />
ไตรมาส ๒</td>
<td align="right" bgcolor="#FFFFFF">กันยายน</td>
<td align="left" bgcolor="#FFFFFF"><input name="September" type="text" id="September" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['September'];?>" size="10" maxlength="10" />
ไตรมาส ๔</td>
</tr>
<tr bgcolor="#F8F8F8">
<td align="right" bgcolor="#FFFFFF">เมษายน</td>
<td align="left" bgcolor="#FFFFFF"><input name="April" type="text" id="April" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['April'];?>" size="10" maxlength="10" />
ไตรมาส ๓</td>
<td align="right" bgcolor="#FFFFFF">ตุลาคม</td>
<td align="left" bgcolor="#FFFFFF"><input name="October" type="text" id="October" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['October'];?>" size="10" maxlength="10" />
ไตรมาส ๑</td>
</tr>
<tr bgcolor="#F8F8F8">
<td align="right" bgcolor="#FFFFFF">พฤษภาคม</td>
<td align="left" bgcolor="#FFFFFF"><input name="May" type="text" id="May" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['May'];?>" size="10" maxlength="10" />
ไตรมาส ๓</td>
<td align="right" bgcolor="#FFFFFF">พฤศจิกายน</td>
<td align="left" bgcolor="#FFFFFF"><input name="November" type="text" id="November" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['November'];?>" size="10" maxlength="10" />
ไตรมาส ๑</td>
</tr>
<tr bgcolor="#F8F8F8">
<td align="right" bgcolor="#FFFFFF">มิถุนายน</td>
<td align="left" bgcolor="#FFFFFF"><input name="June" type="text" id="June" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['June'];?>" size="10" maxlength="10" />
ไตรมาส ๓</td>
<td align="right" bgcolor="#FFFFFF">ธันวาคม</td>
<td align="left" bgcolor="#FFFFFF"><input name="December" type="text" id="December" style="text-align:center" onkeypress="return checkNumeric();" value="<?=$rs['December'];?>" size="10" maxlength="10" />
ไตรมาส ๑</td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"> </td>
<td align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="left" bgcolor="#FFFFFF">หมายเหตุ * ห้ามใส่ , ในช่องกรอกเงิน</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">หมวดเงิน</td>
<td align="left" bgcolor="#FFFFFF">:</td>
<td height="25" align="left" bgcolor="#FFFFFF"><select name="MoneyS_C" id="MoneyS_C">
<option value=""></option>
<?php
$sql = " SELECT * FROM money_source_tb ORDER BY MoneyS_C ";
$result2 = mysql_query($sql);
while( $rs2 = mysql_fetch_array($result2) ) {
?>
<option value="<?=$rs2['MoneyS_C'];?>" <?php if( $rs2['MoneyS_C']==$rs['MoneyS_C'] ) echo 'selected';?>>
<?=$rs2['MoneyS_M'];?>
</option>
<?php
} # while
mysql_free_result($result1);
?>
</select></td>
</tr>
<tr>
<td align="center">ประเภทหมวดค่าใช้จ่าย</td>
<td align="left">:</td>
<td height="25" align="left"><select name="MoneyId" id="MoneyId">
<option value=""></option>
<?php
$sql = " SELECT * FROM money_tb ORDER BY MoneyId ";
$result3 = mysql_query($sql);
while( $rs3 = mysql_fetch_array($result3) ) {
?>
<option value="<?=$rs3['MoneyId'];?>" <?php if( $rs3['MoneyId']==$rs['MoneyId'] ) echo 'selected';?>>
<?=$rs3['MoneyName'];?>
</option>
<?php
} # while
mysql_free_result($result1);
$dbObj->RegDBConn();
?>
</select></td>
</tr>
<tr>
<td height="16" align="right" bgcolor="#FFFFFF">บูรณาการกับรายวิชา</td>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="left" bgcolor="#FFFFFF"><?php
$strSQL33 = " SELECT * FROM Course WHERE courseId='$rs[courseId]' ";
$result33 = mysql_query($strSQL33);
$rs33 = mysql_fetch_array($result33);
?>
<input name="courseCode" type="text" class="input1" style="text-align:center" value="<?=$rs33['courseCode'];?>" size="7" readonly="readonly" />
<input name="courseName" type="text" class="input1" value="<?=$rs33['courseName'];?>" size="48" readonly="readonly" />
<input name="courseUnit" type="text" class="input1" style="text-align:center" value="<?=$rs33['courseUnit'];?>" size="7" readonly="readonly" />
<a href="javascript:;" onclick="NewWindow('ShowTechCose.php','courseInClassTable','860','350','yes')"><img src="../images/icons/search.gif" width="15" height="19" border="0" align="absmiddle" /></a><span class="TEXT-RED10"><sup>*</sup><span class="TEXT-ORANGE9"><-- คลิ๊กที่นี่
<input name="courseId" type="hidden" value="<?=$rs['courseId'];?>" />
<input type="hidden" name="conditionId" />
</a></span></span></td>
</tr>
<tr>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="left" bgcolor="#FFFFFF"><input name="Flag" type="checkbox" id="Flag" value="Y" <?php if ( !strcmp("$rs[Flag]","Y") ) { echo "checked"; } ?> />
เลือกเพื่อกำหนดเงื่อนไขการขออนุมัติไปราชการตามคำสั่ง</td>
</tr>
<tr>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="left" bgcolor="#FFFFFF"><input name="Flag1" type="checkbox" id="Flag1" value="Y" <?php if ( !strcmp("$rs[Flag1]","Y") ) { echo "checked"; } ?> />
เลือกเพื่อกำหนดเงื่อนไขโครงการบริการวิชาการ</td>
</tr>
<tr>
<td height="29" align="center" bgcolor="#FFFFFF"> </td>
<td height="29" align="center" bgcolor="#FFFFFF"> </td>
<td height="29" align="center" bgcolor="#FFFFFF"><input name="ProjectId" type="hidden" id="ProjectId" value="<?=$rs['ProjectId'] ;?>" />
<input name="Submit" type="submit" class="WIDTH60 CURSOR-HAND" value="บันทึก" />
</span>
<input name="Reset" type="reset" class="WIDTH60 CURSOR-HAND" value="รีเซ็ต" />
</td>
</tr>
<tr>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
<td height="16" align="center" bgcolor="#FFFFFF"> </td>
</tr>
</table></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);
?>
|