Viewing file: AddProject.php (19.92 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" );
/** Chart */
include ("../includes/charts.php");
/** Create Database Object */
$dbObj = new DBConn;
} # 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" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/utilities.js"></script>
<script language="JavaScript">
extArray = new Array(".gif", ".jpg", ".jpeg");
function LimitAttach(form, file) {
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) {
allowSubmit = true; break;
}
}
if (allowSubmit)
fileClick();
else
alert("JPG/JPEG or GIF file Only!");
}
function browse()
{
pc.Img1.src = pc.Img1.value;
}
</script>
<script language="javascript">
//========================
function checkEmail(form) {
var email = document.pc.Email.value;
if (!isEmail(email)) {
//alert("รูปแบบของ อีเมล์ ไม่ถูกต้อง");
return false;
}
else { return true; }
}
function isEmail(str) {
var supported = 0;
if (window.RegExp) {
var tempStr = "a";
var tempReg = new RegExp(tempStr);
if (tempReg.test(tempStr)) supported = 1;
}
if (!supported)
return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
return (!r1.test(str) && r2.test(str));
} // function
function isBlank(myObj) {
if(myObj.value=='') {
return true;
}
return false;
}
function verifySubmit() {
with(document.pc) {
if( isBlank(Name) ) { alert("กรุณากรอกข้อมูล ชื่อ"); Name.style.backgroundColor='#E8EFF6'; Name.focus(); return false; }
if( isBlank(Lastname) ) { alert("กรุณากรอกข้อมูล นามสกุล"); Lastname.style.backgroundColor='#E8EFF6'; Lastname.focus(); return false; }
if( !checkEmail(Email) ) { alert('รูปแบบของ อีเมล์ ไม่ถูกต้อง'); Email.style.backgroundColor='#E8EFF6'; Email.focus(); return false; }
document.pc.submit();
}
}
//-->
</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" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
<table width="769" border="0" cellspacing="0" cellpadding="0">
<form action="InsertProject.php" method="post" enctype="multipart/form-data" name="pc" id="pc">
<tr>
<td width="769" 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>» <span class="NOTE">เพิ่มข้อมูลโครงการ/กิจกรรมวิชาการ</span></strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="370" align="center" valign="top"><table width="93%" height="720" border="0" align="center" cellpadding="0" cellspacing="4" bgcolor="#FFFFFF" style="border:0px solid gray">
<tr>
<td height="21" colspan="2"> </td>
</tr>
<tr >
<td colspan="2" align="left" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Tahoma">ชื่อโครงการ</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Project_name" type="text" id="Project_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" size="90" />
<a href="javascript:;" onclick="MM_openBrWindow('PlanProject.php','Detail','scrollbars=yes,width=820,height=280')"><img src="../images/icons/download.png" alt="เลือกโครงการ" width="16" height="16" border="0" align="absmiddle" /></a>
<input name="ProjectId" type="hidden" id="ProjectId" />
</font></td>
</tr>
<tr>
<td width="45%" align="left"><font color="#003366" size="2" face="Tahoma">วันที่ดำเนินงาน</font> <font color="#000000" size="2" face="Tahoma">
<select name="mDate" id="mDate" class="select" onkeypress="return handleEnter(this, event)" >
<? getDay1to31();?>
</select>
เดือน
<select name="mMonth" id="mMonth2" class="select" onkeypress="return handleEnter(this, event)">
<? getThaiMonth();?>
</select>
ปี พ.ศ.
</font><font color="#0000FF" size="2" face="Tahoma">
<select name="mYear" id="mYear">
<?php
$curr_year = date("Y")+543;
$prev_year = $curr_year-4;
$next_year = $curr_year+3;
for( $i=$prev_year; $i<=$next_year; $i++ ) {
?>
<option value="<?=$i;?>" <?php if( $i==$curr_year ) echo 'selected'; elseif( $i==$Budget_Year ) echo 'selected'; ?>>
<?=$i;?>
</option>
<?php
} # for
?>
</select>
</font><font color="#000000" size="2" face="Tahoma"> </font> </td>
<td width="55%" align="left"><font color="#003366" size="2" face="Tahoma"> สิ้นสุดวันที่</font> <font color="#000000" size="2" face="Tahoma">
<select name="mDate1" id="mDate1" class="select" onkeypress="return handleEnter(this, event)" >
<? getDay1to31();?>
</select>
เดือน
<select name="mMonth1" id="mMonth4" class="select" onkeypress="return handleEnter(this, event)">
<? getThaiMonth();?>
</select>
ปี พ.ศ.
</font><font color="#0000FF" size="2" face="Tahoma">
<select name="mYear1" id="mYear1">
<?php
$curr_year = date("Y")+543;
$prev_year = $curr_year-4;
$next_year = $curr_year+3;
for( $i=$prev_year; $i<=$next_year; $i++ ) {
?>
<option value="<?=$i;?>" <?php if( $i==$curr_year ) echo 'selected'; elseif( $i==$Budget_Year ) echo 'selected'; ?>>
<?=$i;?>
</option>
<?php
} # for
?>
</select>
</font><font color="#000000" size="2" face="Tahoma"> </font>
</div></td>
</tr>
<tr >
<td align="left"><font color="#003366" size="2" face="Tahoma">วันที่รับสมัคร</font><font color="#000000" size="2" face="Tahoma">
<select name="mDate2" id="mDate2" class="select" onkeypress="return handleEnter(this, event)" >
<? getDay1to31();?>
</select>
เดือน
<select name="mMonth2" id="select2" class="select" onkeypress="return handleEnter(this, event)">
<? getThaiMonth();?>
</select>
ปี พ.ศ.
</font><font color="#0000FF" size="2" face="Tahoma">
<select name="mYear2" id="mYear2">
<?php
$curr_year = date("Y")+543;
$prev_year = $curr_year-4;
$next_year = $curr_year+3;
for( $i=$prev_year; $i<=$next_year; $i++ ) {
?>
<option value="<?=$i;?>" <?php if( $i==$curr_year ) echo 'selected'; elseif( $i==$Budget_Year ) echo 'selected'; ?>>
<?=$i;?>
</option>
<?php
} # for
?>
</select>
</font><font color="#000000" size="2" face="Tahoma"> </font></td>
<td align="left"><font color="#003366" size="2" face="Tahoma"> สิ้นสุดวันที่
<select name="mDate3" id="mDate3" class="select" onkeypress="return handleEnter(this, event)" >
<? getDay1to31();?>
</select>
เดือน
<select name="mMonth3" id="mMonth" class="select" onkeypress="return handleEnter(this, event)">
<? getThaiMonth();?>
</select>
ปี พ.ศ.
</font><font color="#0000FF" size="2" face="Tahoma">
<select name="mYear3" id="mYear3">
<?php
$curr_year = date("Y")+543;
$prev_year = $curr_year-4;
$next_year = $curr_year+3;
for( $i=$prev_year; $i<=$next_year; $i++ ) {
?>
<option value="<?=$i;?>" <?php if( $i==$curr_year ) echo 'selected'; elseif( $i==$Budget_Year ) echo 'selected'; ?>>
<?=$i;?>
</option>
<?php
} # for
?>
</select>
</font><font color="#003366" size="2" face="Tahoma"> </font></td>
</tr>
<tr >
<td align="left"><font color="#003366" size="2" face="Tahoma">หน่วยงานที่รับผิดชอบ<strong><font color="#003366" size="2" face="Tahoma">
<select name="Faculty_code1" id="Faculty_code1" class="input1">
<?php
$strSQL3 = "SELECT * FROM faculty_tb Where FacultyStatus='Y' Order By Faculty_code ASC ";
$result3 = mysql_query($strSQL3);
while( $rs3 = mysql_fetch_array($result3))
{
echo"<option value=\"$rs3[Faculty_code]\" ><b>$rs3[Faculty_name]</b></option>\n";
}
?>
</select>
</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Faculty_code" type="hidden" id="Faculty_code" />
</font></strong></font></td>
<td align="left"> </td>
</tr>
<tr >
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">สถานที่จัด</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Detail" type="text" id="Detail" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Detail'];?>" size="50" />
</font></td>
</tr>
<tr >
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">ปีการศึกษา</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Term" type="text" id="Term" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="7" maxlength="4" onkeypress="checkNumeric()" />
</font><font size="2" face="Tahoma">ปีงบประมาณ
</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Year_budget" type="text" id="Year_budget" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="7" maxlength="4" onkeypress="checkNumeric()" />
</font></td>
</tr>
<tr >
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">จำนวนเงินงบประมาณตามแผนดำเนินการ</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Budget_use" type="text" id="Budget_use" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="10" onkeypress="checkNumeric()" />
</font><font color="#000000"><font size="2" face="Tahoma">บาท</font></font></td>
</tr>
<tr>
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">จำนวนเงินที่ใช้จริงตามโครงการ</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Budget" type="text" id="Budget" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="10" onkeypress="checkNumeric()" />
</font><font color="#000000"> <font size="2" face="Tahoma"> บาท</font></font></td>
</tr>
<tr>
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">จำนวนผู้เข้าร่วมโครงการ</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Target_group" type="text" id="Target_group" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Target_group'];?>" size="10" onkeypress="checkNumeric()" />
</font> <font color="#000000"><font size="2" face="Tahoma">คน</font></font></td>
</tr>
<tr >
<td height="51" colspan="2" align="left"><p><font color="#003366" size="2" face="Tahoma">วัตถุประสงค์ของโครงการ <br /> </font>
<font color="#003366" size="2" face="Tahoma"> </font>
<textarea name="Objective" cols="60" rows="4" id="Objective" class="input1"></textarea>
</p></td>
</tr>
<tr>
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">รับเงินงบประมาณสนับสนุนจากแหล่งอื่น</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Fund_support" type="text" id="Fund_support" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Fund_support'];?>" size="50" />
</font></td>
</tr>
<tr >
<td height="23" colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">ค่าลงทะเบียน/คน</font><font size="2" face="Tahoma">
<label>
<input name="Res" type="radio" value="Y" />
</label>
</font><font color="#000000"> </font><font color="#003366" size="2" face="Tahoma">ลงทะเบียน</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Fee" type="text" id="Fee" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="10" onkeypress="checkNumeric()" />
</font><font color="#000000">
<font size="2" face="Tahoma">บาท
<label>
<input name="Res" type="radio" value="N"checked="checked" />
</label>
ไม่</font><font color="#003366" size="2" face="Tahoma">ลงทะเบียน</font></font></td>
</tr>
<tr >
<td colspan="2" align="left"><table width="565" border="0">
<tr>
<td width="69"><font color="#003366" size="2" face="Tahoma">ตอบสนอง</font></td>
<td width="486"><font size="2" face="Tahoma">
<input name="Response" type="radio" value="วิชาชีพ" />
วิชาชีพ
<input name="Response" type="radio" value="การเรียนการสอน" />
การเรียนการสอน </font></td>
</tr>
<tr>
<td> </td>
<td><font size="2" face="Tahoma">
<input name="Response" type="radio" />
อื่นฯ </font><font color="#0000FF" size="2" face="Tahoma">
<input name="Response" type="text" id="Response" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Response'];?>" size="40" />
</font></td>
</tr>
</table></td>
</tr>
<tr >
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">จำนวนชั่วโมงทั้งหมดของโครงการ</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Total_time_project" type="text" id="Total_time_project" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="10" onkeypress="checkNumeric()" />
</font><font color="#000000" size="2" face="Tahoma"> ชั่วโมง</font></td>
</tr>
<tr >
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">จำนวนชั่วโมงที่บุคลากรเป็นวิทยากร</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Total_time_insi" type="text" id="Total_time_insi" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="10" onkeypress="checkNumeric()" />
</font><font color="#000000" size="2" face="Tahoma"> ชั่วโมง</font></td>
</tr>
<tr >
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">จำนวนชั่วโมงที่เชิญวิทยากรภายนอก</font><font color="#0000FF" size="2" face="Tahoma">
<input name="Total_time_inso" type="text" id="Total_time_inso" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rss['Tel'];?>" size="10" onkeypress="checkNumeric()" />
</font><font color="#000000" size="2" face="Tahoma">ชั่วโมง</font></td>
</tr>
<tr>
<td colspan="2" align="left"><font color="#003366" size="2" face="Tahoma">ผลการดำเนินงานตามแผน</font>
<input type="radio" name="Result_oper" value="1" />
<font size="2" face="Tahoma"> เสร็จตามแผน
<input type="radio" name="Result_oper" value="2" />
ไม่เสร็จตามแผน
<input type="radio" name="Result_oper" value="3" />
ไม่ได้ทำ </font></td>
</tr>
<tr>
<td height="22" colspan="2" align="left"> </td>
</tr>
<tr>
<td align="right"><font color="#003366" size="2" face="Tahoma">โหลดโครงการ</font></td>
<td bordercolor="#006699"><table width="82%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%" height="34"><input name="Img1" type="file" id="Img1" size="20" />
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"><input type="submit" name="Submit" value=" บันทึกข้อมูล " />
<input name="Submit" type="reset" id="Submit" value=" รีเซ็ต " />
<input name="Button" type="button" id="Reset" value="ยกเลิก" class="CURSOR-HAND WIDTH60" onclick="location.href='ProjectList.php'" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </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);
?>
|