Viewing file: FrmEditResProject.php (6.07 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user"))
{
$Username = $valid_user;
include("../../../include/FunctionDB.php");
include("../../../include/Function.php");
ConnectDB();
$sql ="SELECT * FROM personal_tb WHERE Username='$Username'";
$result = mysql_query($sql) or die("Cannot Select").mysql_error();
$rs = mysql_fetch_array($result);
$sql2 = "SELECT * FROM res_project_tb WHERE Resp_code='$Resp_code' ";
$result2 = mysql_query($sql2) or die("Error".mysql_error());
$rss = mysql_fetch_array($result2);
?>
<html>
<head>
<title>Form insert Research</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="../../../css/style1.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td colspan="4" bgcolor="#0066CC"><img src="../../../Image/Ponallogo.jpg" width="550" height="71"></td>
</tr>
<tr>
<td width="25%" background="../../../Image/bart1.jpg" class="table">
<div align="center"><strong><font size="2" face="Tahoma"><a href="../../menu_teacher.php" class="d">กลับหน้าหลัก</a></font></strong></div></td>
<td width="25%" background="../../../Image/bart1.jpg" class="table">
<div align="center"><strong><font size="2" face="Tahoma"><a href="AddResProject.php" class="d">เพิ่ม</a></font></strong></div></td>
<td width="25%" background="../../../Image/bart1.jpg" class="table">
<div align="center"><strong><font size="2" face="Tahoma"><a href="Edit_Res_List.php" class="d">ลบ
หรือ แก้ไข</a></font></strong></div></td>
<td width="25%" background="../../../Image/bart1.jpg" class="table">
<div align="center"><strong><font size="2" face="Tahoma"><a href="../../../logout.php" class="d">Logout</a></font></strong></div></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><font color="#003366" size="2" face="Tahoma"><strong>ขณะนี้
คูณ</strong></font> <font color="#993333" size="2" face="Tahoma"><strong><?php echo $rs[Teacher_name]?>
<?php echo $rs[Teacher_lastname]?></strong></font><strong><font color="#003366" size="2" face="Tahoma">
กำลังใช้งานระบบ</font></strong></div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr bgcolor="#D1EFE6">
<td colspan="3">
<div align="center"><font color="#000000" size="4" face="Tahoma"><strong><font color="#FF0000">แก้ไข</font>
ข้อมูลความรับผิดชอบในโครงการ</strong></font></div></td>
</tr>
<form name="form1" method="POST" action="Edit.php">
<tr bgcolor="#EEEEEE">
<td width="22%" height="20" bgcolor="#EEEEEE"> <div align="center"><font size="2" face="Tahoma">ชื่อ-นามสกุล</font></div></td>
<td width="2%"> </td>
<td width="76%"> <font color="#006633"> <font size="2" face="Tahoma"><strong> <? echo $rs[Teacher_name] ;?>
<? echo $rs[Teacher_lastname] ;?> </strong></font></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#EEEEEE"> <div align="center"><font size="2" face="Tahoma">เรื่อง</font></div></td>
<td><div align="center"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></div></td>
<td> <input name="Project_name" type="text" class="input1" id="Project_name" value="<? echo $rss[Project_name]?>" size="50"></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">ปี
พ.ศ.</font></div></td>
<td> </td>
<td><input name="Year_res" type="text" id="Year_res" value="<? echo $rss[Year_res]?>" size="5" class="input1"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="2" bgcolor="#EEEEEE"> <div align="center"><font size="2" face="Tahoma">ประเภท</font></div></td>
<td height="20" bgcolor="#EEEEEE"> </td>
<td bgcolor="#EEEEEE"><font size="2" face="Tahoma">
<input type="radio" name="Duty" <?php if (!(strcmp("$rss[Duty]","ประธาน"))) {echo "checked";} ?> value="ประธาน">
ประธาน
<input type="radio" name="Duty" <?php if (!(strcmp("$rss[Duty]","รองประธาน"))) {echo "checked";} ?> value="รองประธาน">
รองประธาน
<input type="radio" name="Duty" <?php if (!(strcmp("$rss[Duty]","เลขานุุการ"))) {echo "checked";} ?> value="เลขานุุการ">
เลขานุุการ
<input type="radio" name="Duty" <?php if (!(strcmp("$rss[Duty]","วิทยากร"))) {echo "checked";} ?> value="วิทยากร">
วิทยากร </font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#EEEEEE"> </td>
<td bgcolor="#EEEEEE"><font size="2" face="Tahoma">
<input type="radio" name="Duty" <?php if (!(strcmp("$rss[Duty]","อื่นฯ"))) {echo "checked";} ?> value="อื่นฯ">
อื่นฯ
<input name="Duty_else" type="text" id="Duty_else" value="<? echo $rss[Duty_else]?>" size="30" class="input1">
</font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td bgcolor="#EEEEEE"><div align="center"><font size="2" face="Tahoma">การประยุกต์นำไปใช้งาน</font></div></td>
<td> </td>
<td><textarea name="Apply" cols="60" rows="5" id="Apply" class="input1"><? echo $rss[Apply]?></textarea></td>
</tr>
<tr bgcolor="#D1EFE6">
<td colspan="3">
<div align="center">
<input type="hidden" name="Resp_code" value="<? echo $rss[Resp_code]?>">
<input type="submit" name="Submit" value=" บันทึก " class="button">
</div></td>
</tr>
</form>
</table>
<p> </p></body>
</html>
<? CloseDB() ?>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../../Login.php\">\n";
echo"Please Login ";
}
?>
|