<?php session_start(); 
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='signin.php'>Sign in </a> First ";
}
elseif($_SESSION["usertype"]=="Parents")
{
 	echo "You are not Authorized This Page <a href='parents.php'>Back </a> ";
}
elseif($_SESSION["usertype"]=="Sub User")
{
 	echo "You are not Authorized This Page <a href='admission_form_raheem.php'>Back </a> ";
}
else
{
include 'dbc.php';
$id =$_REQUEST['id'];

$result = mysql_query("SELECT * FROM teacher WHERE id  = '$id'");
$test = mysql_fetch_array($result);
if (!$result) 
		{
		die("Error: Data not found..");
		}
				$tech_name=$test['tech_name'] ;
				$teacher_id= $test['teacher_id'] ;					
				$father_name=$test['father_name'] ;
				$nic_no=$test['nic_no'] ;
				
				
				$dob=$test['dob'] ;
				$adm_date=$test['adm_date'] ;
				$master_edu=$test['master_edu'] ;
				$bach_edu=$test['bach_edu'] ;
				$home_adress=$test['home_adress'] ;
				
				$phone_no=$test['phone_no'] ;
				$cell_no=$test['cell_no'] ;
				$monthly_salary=$test['monthly_salary'] ;
				$ap=$test['ap'] ;
				$fp=$test['fp'] ;
			
?>
<HTML>
<HEAD>
<TITLE>MIND TECH SOLUTION</TITLE>
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-base.css" />
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-topbar.css" />
<link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-sidebar.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<style>
<style type="text/css">
<!--
.style1 {font-weight: bold}
.style2 {color: #FFFFFF}
.style3 {font-size: 36px}
.style4 {
	font-family: Tahoma;
	font-size: 12px;
	font-weight: bold;
}
-->
</style>
<script type="text/javascript" src="ddlevelsfiles/ddlevelsmenu.js">

/***********************************************
* All Levels Navigational Menu- (c) Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
<script type="text/javascript">
function check_data()
{
if(document.getElementById("teacher_id").value=="")
{
alert("Field is Compulsary");
document.getElementById("teacher_id").focus();
}
else if(document.getElementById("tech_name").value=="")
{
alert("Field is Compulsary");
document.getElementById("tech_name").focus();
}
else if(document.getElementById("nic_no").value=="")
{
alert("Field is Compulsary");
document.getElementById("nic_no").focus();
}
else if(document.getElementById("adm_date").value=="")
{
alert("Field is Compulsary");
document.getElementById("adm_date").focus();
}
else if(document.getElementById("home_adress").value=="")
{
alert("Field is Compulsary");
document.getElementById("home_adress").focus();
}
else if(document.getElementById("cell_no").value=="")
{
alert("Field is Compulsary");
document.getElementById("cell_no").focus();
}
else if(document.getElementById("monthly_salary").value=="")
{
alert("Field is Compulsary");
document.getElementById("monthly_salary").focus();
}

else
{
document.getElementById("app_form").submit();
}
}
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (home final.psd) -->
<TABLE WIDTH=1000 BORDER=0 CELLPADDING=0 CELLSPACING=0 align=center>
  <TR>
    <TD COLSPAN=3 bgcolor="#2365ED"><div align="center"><img src="logo copy.jpg" width="134" height="130"></div></TD>
    <TD COLSPAN=9 bgcolor="#2365ED"><table width="561" border="0" align="left">
      <tr>
        <td width="555" height="123" align="center" valign="middle"><p align="center" class="style28"><span class="style37 style3"><strong><h1><font face="Palatino Linotype" color="#FFFFFF"><? echo "" . $_SESSION["userid"]; ?></font></h1></strong></span></p></td>
      </tr>
    </table></TD>
    <TD COLSPAN=2 bgcolor="#2365ED"><a href="http://www.facebook.com"></a></TD>
    <TD width="49" bgcolor="#2365ED"><a href="http://www.twitter.com"></a></TD>
    <TD width="56" bgcolor="#2365ED"><a href="signin.php">Signout</a><a href="http://www.youtube.com"></a></TD>
  </TR>
  <TR>
    <TD COLSPAN=16 bgcolor="#2365ED"><div id="ddtopmenubar" class="mattblackmenu">
<?php include("includes/menu.php") ?></TD>
  </TR>
  <TR>
    <TD COLSPAN=16 align=center></TD>
  </TR>
  <TR>
    <TD COLSPAN=16 bgcolor="#2365ED">&nbsp;</TD>
  </TR>
  <TR>
    <TD height="26" COLSPAN=16 bgcolor="#000045"><p align="center" class="style36 style2"><strong>Teacher Infromtion  Form </strong></p></TD>
  </TR>
  <TR>
    <TD height="310" colspan="16" valign="top" bgcolor="#FFFF66">
	
      <table width="607" border="0" align="center">
	  <form action="teacher_info_edit_process.php" method="post" name="app_form" id="app_form">
        <tr>
          <td width="127">&nbsp;</td>
          <td width="150">&nbsp;</td>
          <td>&nbsp;</td>
          <td><span class="style4">
            <input name="id" type="text" id="id" size="25" value="<?php echo $id ?>"/>
          </span></td>
        </tr>
        <tr>
          <td><span class="style4">Teacher Id </span></td>
          <td><span class="style4">
            <input name="teacher_id" type="text" id="teacher_id" value="<?php echo $teacher_id ?>" size="25">
          </span></td>
          <td><span class="style4">Teacher  Name</span></td>
          <td><span class="style4">
            <input name="tech_name" type="text" id="tech_name" value="<?php echo $tech_name ?>" size="25">
          </span></td>
        </tr>
        <tr>
          <td><span class="style4">Father Name</span></td>
          <td><span class="style4">
            <input name="father_name" type="text" id="father_name" value="<?php echo $father_name ?>" size="25">
          </span></td>
          <td><span class="style4">NIC # </span></td>
          <td><span class="style4">
            <input name="nic_no" type="text" id="nic_no" value="<?php echo $nic_no ?>" size="25">
          </span></td>
        </tr>
        <tr>
          <td><span class="style4">Date Of Joining </span></td>
          <td><span class="style4">
            <input name="adm_date" type="text" id="adm_date" value="<?php echo $adm_date ?>" size="25">
          </span></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><span class="style4">Date Of Birth</span></td>
          <td><span class="style4">
            <input name="dob" type="text" id="dob" value="<?php echo $dob ?>" size="25">
          </span></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><span class="style4">Master Education</span></td>
          <td><span class="style4">
            <input name="master_edu" type="text" id="master_edu" value="<?php echo $master_edu ?>" size="25">
          </span></td>
          <td><span class="style4">Bach Education</span></td>
          <td><span class="style4">
            <input name="bach_edu" type="text" id="bach_edu" value="<?php echo $bach_edu ?>" size="25">
          </span></td>
        </tr>
        <tr>
          <td><span class="style4">Home Adress</span></td>
          <td colspan="3"><span class="style4">
            <input name="home_adress" type="text" id="home_adress" value="<?php echo $home_adress ?>" size="77">
          </span></td>
          </tr>

        <tr>
          <td><span class="style4">Phone #</span></td>
          <td><span class="style4">
            <input name="phone_no" type="text" id="phone_no" value="<?php echo $phone_no ?>" size="25">
          </span></td>
          <td><span class="style4">Cell  #</span></td>
          <td><span class="style4">
            <input name="cell_no" type="text" id="cell_no" value="<?php echo $cell_no ?>" size="25">
          </span></td>
        </tr>

        <tr>
          <td><span class="style4">Acc No </span></td>
          <td><span class="style4">
            <input name="ap" type="text" id="ap" value="<?php echo $ap ?>" size="25">
          </span></td>
          <td><span class="style4">Bank Name</span></td>
          <td><span class="style4">
            <input name="fp" type="text" id="fp" value="<?php echo $fp ?>" size="25">
          </span></td>
        </tr>
        <tr>
          <td><span class="style4">Monthly Salary </span></td>
          <td><span class="style4">
            <input name="monthly_salary" type="text" id="monthly_salary" value="<?php echo $monthly_salary ?>" size="25">
          </span></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
		
        <tr>
          <td>&nbsp;</td>
          <td><div align="right">
            <input type="submit" name="Submit" value="Save" onClick="check_data()">
          </div></td>
          <td><input type="reset" name="Submit2" value="Refresh"></td>
          <td>&nbsp;</td>
        </tr>
      </table>
      </form>    </TD>
  </TR>
  <TR>
    <TD COLSPAN=16 bgcolor="#2365ED">&nbsp;</TD>
  </TR>
  
  <TR>
    <TD COLSPAN=16><table width="998" border="0" bgcolor="#000144">
      <tr>
        <td height="46" colspan="2" bgcolor="#010044">&nbsp;</td>
        <td width="580" rowspan="2" bgcolor="#010044">&nbsp;</td>
      </tr>
      <tr>
        <td height="52" bgcolor="#010044">&nbsp;</td>
        <td bgcolor="#010044">&nbsp;</td>
      </tr>
    </table></TD>
  </TR>
  <TR>
    <TD width="233" height="2"><IMG SRC="images/spacer.gif" WIDTH=233 HEIGHT=1 ALT=""></TD>
    <TD width="15"><IMG SRC="images/spacer.gif" WIDTH=15 HEIGHT=1 ALT=""></TD>
    <TD width="15"><IMG SRC="images/spacer.gif" WIDTH=15 HEIGHT=1 ALT=""></TD>
    <TD width="77"><IMG SRC="images/spacer.gif" WIDTH=77 HEIGHT=1 ALT=""></TD>
    <TD width="151"><IMG SRC="images/spacer.gif" WIDTH=151 HEIGHT=1 ALT=""></TD>
    <TD width="15"><IMG SRC="images/spacer.gif" WIDTH=15 HEIGHT=1 ALT=""></TD>
    <TD width="17"><IMG SRC="images/spacer.gif" WIDTH=17 HEIGHT=1 ALT=""></TD>
    <TD width="103"><IMG SRC="images/spacer.gif" WIDTH=103 HEIGHT=1 ALT=""></TD>
    <TD width="116"><IMG SRC="images/spacer.gif" WIDTH=116 HEIGHT=1 ALT=""></TD>
    <TD width="14"><IMG SRC="images/spacer.gif" WIDTH=14 HEIGHT=1 ALT=""></TD>
    <TD width="15"><IMG SRC="images/spacer.gif" WIDTH=15 HEIGHT=1 ALT=""></TD>
    <TD width="54"><IMG SRC="images/spacer.gif" WIDTH=54 HEIGHT=1 ALT=""></TD>
    <TD width="56"><IMG SRC="images/spacer.gif" WIDTH=56 HEIGHT=1 ALT=""></TD>
    <TD width="14"><IMG SRC="images/spacer.gif" WIDTH=14 HEIGHT=1 ALT=""></TD>
    <TD><IMG SRC="images/spacer.gif" WIDTH=49 HEIGHT=1 ALT=""></TD>
    <TD><IMG SRC="images/spacer.gif" WIDTH=56 HEIGHT=1 ALT=""></TD>
  </TR>
</TABLE>
<!-- End ImageReady Slices -->
</BODY>
</HTML>
<?php
}
?>