Viewing file: AddReUtilization.php (16.15 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( "../includes/Function.php" );
/** Create Database Object */
$dbObj = new DBConn;
//=== SESSION
$Username = $valid_user;
/** Config Table for This Page */
$myTable1 = "personal_tb";
$myTable2 = "research_tb";
$myTable3 =" researchtype_tb";
$myTable4 ="researchpublic_tb";
$myTable2PK = "Research_code";
/** Table --> personal_tb */
$query0 = " SELECT * FROM $myTable1 WHERE Username='$Username' ";
$result0 = $dbObj->execQuery($query0);
$rss = $dbObj->fetchArray($result0);
$Teacher_code = $rss['Teacher_code'];
} # 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" src="../js/calendarDateInput2.js"></script>
<title>ข้อมูลงานวิจัย - ผลงานการวิจัย</title>
</head>
<script language="javascript">
function checkData() {
var formObj = document.myForm;
if( (formObj.Research_name.value == "" ) && (formObj.Research_name.value == "" ) ) { alert("กรุณากรอกข้อมูลให้ครบด้วยค่ะ" ); formObj.Research_name.style.backgroundColor='#F1F9FC'; formObj.Research_name.focus(); return false; }
else if(formObj.Research_name.value == "" ) { alert("กรุณากรอก ชื่อผลงาน"); formObj.Research_name.style.backgroundColor='#F1F9FC'; formObj.Research_name.focus(); return false;}
// if(formObj.importance.value == "" ) { alert("กรุณากรอก ความสำคัญและที่มาของปัญหา"); formObj.importance.style.backgroundColor='#F1F9FC'; formObj.importance.focus(); return false;}
else return true;
}
</script>
<script language="JavaScript" type="text/JavaScript">
function browse()
{
myForm.Filetex.src = myForm.Filetex.value;
}
</script>
<body topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0">
<?php
include("../templates/incHeader.php");
?>
<table width="1004" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="206" align="left" valign="top" style="padding:10px 0px 0px 5px"><?php include("./_incMainMenu.php");?></td>
<td width="798" height="440" align="center" valign="top" style="padding:10px 0px 5px 10px"><fieldset>
<form action="InsertReUtilization.php" method="post" enctype="multipart/form-data" name="myForm" id="myForm" onSubmit="return checkData();">
<table width="772" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="772" 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><strong>» <a href="Menu_edu.php">จัดการข้อมูลผลงาน</a> » <a href="EditReUtilization.php">แก้ไขข้อมูล</a> »</strong> <span class="NOTE">บันทึกข้อมูลองค์ความรู้และบทความวิจัย</span></strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><table width="766" border="0" cellpadding="1" cellspacing="1" bgcolor="#E5E5E5" class="BORDER-GREY-LIGHT">
<tr >
<td height="18" colspan="3" align="center"> </td>
</tr>
<tr bordercolor="#CCCCCC" bgcolor="#ECF5FF">
<td height="100%" align="right" nowrap="nowrap" bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style14"><font color="#000066" face="Tahoma">หน่วยงาน</font></td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style14">:</td>
<td nowrap="nowrap" bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="style14">
<?php
$sql = "Select * From college Where collegeStatus ='1' ";
$result2 = mysql_query($sql) or die("Error".mysql_error());
$rss4 = mysql_fetch_array($result2);
echo"<option value=\"$rss4[collegeCode]\" >$rss4[collegeName]</option>\n";
// echo "$rss4[collegeName] ";
?>
<input name="collegeCode" type="hidden" id="collegeCode" value="<? echo $rss4[collegeCode]?>" />
</font></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ประเภทผลงาน</td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"><label>
<input type="radio" name="ReTyId" id="radio" value="13" onclick="document.getElementById('levelType').style.display='none'; document.getElementById('levelType').style.display=''" <?=($_REQUEST["qflag"]==1)?"checked":"";?> />
องค์ความรู้จากงานวิจัย
<input type="radio" name="ReTyId" id="radio" value="12" onclick="document.getElementById('levelType').style.display='none'; document.getElementById('leaveStart').style.display='';" <?=($_REQUEST["qflag"]==2)?"checked":"";?> />
บทความวิจัย </label></td>
</tr>
<tr bgcolor="#eeeeee" id="levelType" style="display:<?=($_REQUEST["qflag"]==1)?"":"none";?>">
<td height="20" align="right" bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><input type="radio" name="km" value="1" />
องค์ความรู้จากงานวิจัย <br />
<input type="radio" name="km" value="2" />
องค์ความรู้จาก KM </td>
</tr>
<tr>
<td width="16%" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ชื่อผลงาน <span class="TEXT-RED10">*</span></td>
<td width="1%" bgcolor="#FFFFFF">:</td>
<td width="83%" align="left" bgcolor="#FFFFFF"><font color="#0000FF" size="2" face="Tahoma">
<input name="Research_name" type="text" id="Research_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$_GET['Research_name'];?>" size="95" />
</font></td>
</tr>
<tr>
<td height="22" colspan="3" align="left" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">อ้างจากงานวิจัยเรื่อง :
<input name="Project_plan" type="text" id="Project_plan" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs['Project_plan'];?>" size="90" readonly="readonly" />
<a href="javascript:;" onclick="MM_openBrWindow('ShowResearch.php','Detail','scrollbars=yes,width=700,height=280')"><img src="../picture/search_ico.gif" alt="เลือกโครงการ" width="16" height="16" border="0" align="absmiddle" /></a>
<input name="ReId" type="hidden" id="ReId" value="<?=$rs['ReId'];?>" /></td>
</tr>
<tr>
<td height="22" colspan="3" align="left" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">บูรณาการกับรายวิชา:
<?php
/*
$dbObj->RegDBConn();
$strSQL33 = " SELECT * FROM Course WHERE courseId='$rs[courseId]' ";
$result33 = mysql_query($strSQL33);
$rs33 = mysql_fetch_array($result33);
$dbObj->DBConn();
*/
?>
<input name="courseCode" type="text" class="input1" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs33['courseCode'];?>" size="7" readonly="readonly" />
<input name="courseName" type="text" class="input1" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?=$rs33['courseName'];?>" size="48" readonly="readonly" />
<input name="courseUnit" type="text" class="input1" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" 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" />
</span></span></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"><label>
<input name="outreacId" type="checkbox" id="outreacId"<?php if (!strcmp("$rs4[outreacId]","Y") ) {echo "checked";} ?> value="Y" />
</label>
บูรณาการกับโครงการบริการวิชาการ</td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">บทคัดย่อ</td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"><p></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"><textarea name="abbStract" cols="80" rows="6" id="abbStract"><?=htmlspecialchars_decode( $rss2['abbStract']) ;?>
</textarea><script>QBPATH='../editor'; VISUAL=1; SECURE=0;</script>
<script src='../editor/quickB.js'></script>
<script src='../editor/tabedit.js'></script></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"><span class="TEXT-DARK-BLUE10">อัพโหลดไฟล์เอกสาร :
<input name="Filetex" type="file" id="Filetex" size="25" />
<i>เอกสาร Abstract</i></span></td>
</tr>
<tr>
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ปีงบประมาณ</td>
<td bgcolor="#FFFFFF">:</td>
<td align="left" bgcolor="#FFFFFF"><select name="fiscal_year_finish" id="fiscal_year_finish">
<?php
$curr_year = date("Y")+543;
$prev_year = $curr_year-10;
$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></td>
</tr>
<tr>
<td height="24" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">ปีปฏิทิน</td>
<td bgcolor="#FFFFFF">:</td>
<td align="left" bgcolor="#FFFFFF"><select name="Year_prop" id="Year_prop">
<?php
$curr_year = date("Y")+543;
$prev_year = $curr_year-10;
$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></td>
</tr>
<tr>
<td height="24" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">วันที่เริ่มทำ</td>
<td bgcolor="#FFFFFF">:</td>
<td align="left" bgcolor="#FFFFFF"><script>DateInput('mDate', true,'DD/MM/YYYY','<?=(isset($rss1["Year_start"]))?ymdT2dmyE($rss1["Year_start"]):date("d/m/Y");?>');</script></td>
</tr>
<tr>
<td height="24" align="right" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10">วันที่แล้วเสร็จ</td>
<td bgcolor="#FFFFFF">:</td>
<td align="left" bgcolor="#FFFFFF"><script>DateInput('mDate2', true,'DD/MM/YYYY','<?=(isset($rss1["Year_finish"]))?ymdT2dmyE($rss1["Year_finish"]):date("d/m/Y");?>');</script></td>
</tr>
<tr>
<td align="right" valign="top" bgcolor="#FFFFFF" class="TEXT-DARK-BLUE10"> </td>
<td bgcolor="#FFFFFF"> </td>
<td align="left" bgcolor="#FFFFFF"> </td>
</tr>
<tr >
<td height="25" bgcolor="#FFFFFF"> </td>
<td height="25" bgcolor="#FFFFFF"> </td>
<td height="25" align="center" bgcolor="#FFFFFF">
<input type="hidden" name="Teacher_code" value="<?php echo $rss['Teacher_code']; ?>" />
<input type="hidden" name="r_type" value="1" id="r_type" />
<input name="Submit" type="Submit" class="WIDTH60 CURSOR-HAND" id="Submit" value="บันทึก" />
<input name="Reset" type="reset" class="WIDTH60 CURSOR-HAND" id="Reset" value="รีเซ็ต" />
<input name="Button" type="button" id="Reset" value="ยกเลิก" class="CURSOR-HAND WIDTH60" onclick="location.href='ResearchByYear.php?Teacher_code<?=$Teacher_code;?>'" /></td>
</tr>
<tr >
<td height="18" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</fieldset></td>
</tr>
</table>
<?php include("../templates/incFooter.php"); ?>
</body>
</html>
<?php
/** Free Resource */
$dbObj->freeresult($result0);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?>
|