Viewing file: addPerson.php (12.27 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../../include/FunctionDB.php");
include("../../include/Function.php");
ConnectDB();
$sql ="SELECT * FROM bookmant_tb Where code='$code'";
$result = mysql_query($sql) or die("Cannot Select").mysql_error();
$rs = mysql_fetch_array($result);
//$sql = "Select * FROM quotastatusY Where studentId='$studentId'";
// $result = mysql_query($sql) or die(" Error").mysql_error();
// $rs1 = mysql_fetch_array($result);
//$row = mysql_num_rows($result);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<script language="javascript" src="js/calendarDateInput2.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function browse()
{
form1.Imag1.src = form1.Img1.value;
}
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
function chk(c){
if (c.checked){
document.all.Prob1.disabled=false;
document.all.Prob2.disabled=false;
document.all.Prob3.disabled=false;
document.all.Prob4.disabled=false;
}
else{
document.all.Problem.disabled=false;
}
}
function enableDropdown(){
var form = document.form1;
if(form.Teachbox1.checked){
form1.Teacher_code1.disabled = false;
}
else{
form1.Teacher_code1.disabled = true;
}
if(form.Teachbox2.checked){
form1.Teacher_code2.disabled = false;
}
else{
form1.Teacher_code2.disabled = true;
}
if(form.Teachbox3.checked){
form1.Teacher_code3.disabled = false;
}
else{
form1.Teacher_code3.disabled = true;
}
if(form.Teachbox4.checked){
form1.Teacher_code4.disabled = false;
}
else{
form1.Teacher_code4.disabled = true;
}
if(form.Teachbox5.checked){
form1.Teacher_code5.disabled = false;
}
else{
form1.Teacher_code5.disabled = true;
}
if(form.Teachbox6.checked){
form1.Teacher_code6.disabled = false;
}
else{
form1.Teacher_code6.disabled = true;
}
if(form.Teachbox7.checked){
form1.Teacher_code7.disabled = false;
}
else{
form1.Teacher_code7.disabled = true;
}
}
</script>
<style type="text/css">
<!--
.style5 {font-size: 14px}
-->
</style>
<table width="609" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="609"><fieldset>
<legend> ºÑ¹·Ö¡Ë¹Ñ§Ê×Í</legend>
<form id="form1" name="form1" method="post" action="InsertPerson.php">
<table width="604" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="604" scope="col"><table width="88%" height="289" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#eeeeee" style="border:0px solid gray">
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">àÅ¢·Õè·ÐàºÕ¹ÃѺ</font></div></td>
<td bgcolor="#FFFFFF"><font color="#996600" size="2" face="Tahoma"> <? echo $rs["No"]?></font><font color="#006633" size="2" face="Tahoma"> </font>
<label></label></td>
</tr>
<tr bgcolor="#EEEEEE">
<td width="31%" height="18" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">àÅ¢·Õè˹ѧÊ×ÍÃѺ</font></div></td>
<td width="68%" bgcolor="#FFFFFF"><font color="#996600" size="2" face="Tahoma"><? echo $rs["No_in"]?></a> </font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="18" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">àÃ×èͧ</font></div></td>
<td bgcolor="#FFFFFF"><font color="#996600" size="2" face="Tahoma"></a></font><font color="#003366" size="2" face="Tahoma"><? echo nl2br($rs[Status])?></font></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma"><font face="Tahoma">ª×èͼÙéÃѺ˹ѧÊ×Í</font></font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<label>
<input name="Teachbox1" type="checkbox" id="Teachbox1" onclick="enableDropdown()" />
</label>
<select name="Teacher_code1" id="Teacher_code1" class="input1" disabled="disabled"/>
<?php
$strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="25" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma"><font face="Tahoma">ª×èͼÙéÃѺ˹ѧÊ×Í</font></font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Teachbox2" type="checkbox" id="Teachbox2" value="checkbox" onclick="enableDropdown()"/>
<select name="Teacher_code2" id="Teacher_code2" class="input1" disabled="disabled" />
<?php
$strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="25" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma"><font face="Tahoma">ª×èͼÙéÃѺ˹ѧÊ×Í</font></font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Teachbox3" type="checkbox" id="Teachbox3" value="checkbox" onclick="enableDropdown()"/>
<select name="Teacher_code3" id="Teacher_code3" class="input1" disabled="disabled" />
<?php
$strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="25" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma"><font face="Tahoma">ª×èͼÙéÃѺ˹ѧÊ×Í</font></font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Teachbox4" type="checkbox" id="Teachbox4" value="checkbox" onclick="enableDropdown()"/>
<select name="Teacher_code4" id="Teacher_code4" class="input1" disabled="disabled" />
<?php
$strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="25" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma"><font face="Tahoma">ª×èͼÙéÃѺ˹ѧÊ×Í</font></font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Teachbox5" type="checkbox" id="Teachbox5" value="checkbox" onclick="enableDropdown()" />
<select name="Teacher_code5" id="Teacher_code5" class="input1" disabled="disabled" />
<?php
$strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="25" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma"><font face="Tahoma">ª×èͼÙéÃѺ˹ѧÊ×Í</font></font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Teachbox6" type="checkbox" id="Teachbox6" value="checkbox" onclick="enableDropdown()" />
<select name="Teacher_code6" id="Teacher_code6" class="input1" disabled="disabled" />
<?php
$strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="25" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma"><font face="Tahoma">ª×èͼÙéÃѺ˹ѧÊ×Í</font></font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<input name="Teachbox7" type="checkbox" id="Teachbox7" value="checkbox" onclick="enableDropdown()" />
<select name="Teacher_code7" id="Teacher_code7" class="input1" disabled="disabled" />
<?php
$strSQL2 = "SELECT * FROM personal_tb Where Permision='2' Order by Teacher_name ";
$result2 = mysql_query($strSQL2);
while( $rs2 = mysql_fetch_array($result2))
{
echo"<option value=\"$rs2[Teacher_code]\" ><b>$rs2[Teacher_name] $rs2[Teacher_lastname]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="21" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">µéͧ¡ÒÃá¨é§ºØ¤ÅÒ¡Ã·Ø¡æ ¤¹</font> </div></td>
<td bgcolor="#FFFFFF"><font size="2" face="Tahoma">
<input name="Statistic" type="radio" value="á¨é§" />
</font><font face="Tahoma"><span class="style5"> á¨é§
</span></font><font size="2" face="Tahoma">
<input name="Statistic" type="radio" value="äÁèá¨é§" />
</font><font face="Tahoma"><span class="style5">äÁèá¨é§ </span></font><font color="#996600" size="2" face="Tahoma"> <? echo $rs["Date_buy"]?>
<label></label>
</font></td>
</tr>
<tr bgcolor="#CCCCFF" >
<td height="25" colspan="2" bgcolor="#FFFFFF"><div align="center">
<input type="submit" name="Submit3" value=" ºÑ¹·Ö¡ " class="button" />
<span style="TEXT-ALIGN: center">
<input name="code" type="hidden" id="code" value="<? echo $rs["code"]?>" />
<input name="Year" type="hidden" id="Year" value="<? echo $rs["Year"]?>" />
<input name="No_in" type="hidden" id="No_in" value="<? echo $rs["No_in"]?>" />
</span> <span style="TEXT-ALIGN: center">
<input name="No" type="hidden" id="No" value="<? echo $rs["No"]?>" />
</span><span style="TEXT-ALIGN: center">
<input name="Faculty_code" type="hidden" id="Faculty_code" value="<? echo $rs["Faculty_code"]?>" />
</span><font color="#996600" size="2" face="Tahoma"><span style="TEXT-ALIGN: center">
<input name="Date_buy" type="hidden" id="Date_buy" value="<? echo $rs["Date_buy"]?>" />
</span></font>
<input type="reset" name="Submit" value="àÃÔèÁãËÁè" class="button" />
</div></td>
</tr>
</table></th>
</tr>
</table>
</form>
<div align="center"><span style="TEXT-ALIGN: center">
<input type="button" name="Submit" value=" »Ô´Ë¹éÒµèÒ§" onclick="javascript:parent.close();" class="button1" />
</span>
</div>
</fieldset></td>
</tr>
</table>
|