| Current Path : /home/bolconlineco/www/coordinator/ |
| Current File : //home/bolconlineco/www/coordinator/update_tutor.php |
<?php
ob_start();
session_start();
?>
<?php include('/includes/header.php'); ?>
<?php
if(!isset($_SESSION['coordinator']) || $_SESSION['coordinatorrole'] != 2)
{
header("location:../index.php");
exit();
}
?>
<div id="content">
<span class="left"> </span><h2> Coordinator Panel </h2><span class="right"></span>
<div id="frm">
<h3> Update Tutor</h3>
<?php
if(isset($_GET['tutorId']))
{
$tutorId=$_GET['tutorId'];
$result=get_tutor_by_id($tutorId);
$resultSet=fetch_rows($result);
extract($resultSet);
}
?>
<form id="ID" action="edittutor.php" method="post" >
<ul class="col" >
<li>
<label for="name"> First Name:</label>
<input class="validate[required]" type="text" id="fname" name="fname" value="<?php echo $firstname;?>" />
</li>
<li>
<label for="fname"> Father's Name:</label>
<input class="validate[required]" type="text" id="fathername" name="fathername" value="<?php echo $fathername;?>" />
</li>
<li>
<label for="ph"> Phone Number:</label>
<input class="validate[required,custom[phoneno]]" type="text" id="ph" name="phone" value="<?php echo $phone; ?>" />
</li>
<li>
<label for="des"> Designation:</label>
<input class="validate[required]" type="text" id="des" name="designation" value="<?php echo $designation;?>" title="Your Profession" />
</li>
<li>
<label for="des"> Address:</label>
<input class="validate[required]" type="text" id="des" name="address" value="<?php echo $address; ?>" />
</li>
</ul>
<ul class="col" >
<li>
<label for="lname"> Last Name:</label>
<input class="validate[required]" type="text" id="lname" value="<?php echo $lastname; ?>" name="lname" title="Last Name" />
</li>
<li>
<label for="cnic"> CNIC Number:</label>
<input class="validate[required,custom[cnic]]" type="text" id="cnic" value="<?php echo $CNIC; ?>" name="cnic" title="CNIC Number" />
</li>
<li>
<label for="email"> Email:</label>
<input class="validate[required,custom[email]]" type="text" id="email" name="email" value="<?php echo $email;?>" />
</li>
<li>
<label for="quali"> Qualification:</label>
<input class="validate[required]" type="text" id="quali" name="qualification" value="<?php echo $qualification; ?>" title="Qualification" />
</li>
<li>
<label for="quali"> Tutor Status:</label>
<select name="tutorstatus">
<option value="1">Active</option>
<option value="0">InActive</option>
</select>
</li>
<li>
<label for="quali"> Status:</label>
<select name="status">
<?php if($tutorstatus==1){?>
<option value="1">Active</option>
<option value="0">InActive</option>
<?php } else{?>
<option value="0">InActive</option>
<option value="1">Active</option>
<?php }?>
</select>
</li>
<li>
<div id="btn">
<input class="clear" type="reset" value="Cancel" onclick="window.location.href='viewtutor.php'" />
<input type="hidden" name="tutorid" value="<?php echo $tutorId; ?>" />
<input class="add" type="submit" name="update-tutor" value="Update" />
</div>
</li>
</ul>
</form>
</div>
<div id="data">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr id="title">
<th class="small">Name</th>
<th class="small">Father's Name</th>
<th class="small">Phone</th>
<th class="small">Email</th>
<th class="small">Qualification</th>
<th class="small">Action</th>
</tr><!-- end title -->
<?php
$result=mysql_query("select * from tutor");
while($row=fetch_rows($result))
{
extract($row);
?>
<tr class="values even">
<td class="small"><?php echo $firstname." ".$lastname;?></td>
<td class="small"><?php echo $fathername; ?></td>
<td class="small"><?php echo $phone; ?></td>
<td class="small"><?php echo $email; ?></td>
<td class="small"><?php echo $qualification; ?></td>
<td class="action">
<a href="update_tutor.php?tutorId=<?php echo $tutorId; ?>"><img src="../images/edit-icon.png" alt="Edit"/></a>
<a href="deletetutor.php?tutorId=<?php echo $tutorId;?>" onclick="return confirm('Are you Sure to delete ?')"> <img src="../images/delete-icon.png" alt="Delete" /></a>
</td>
</tr><!-- end values -->
<?php
}
?>
</table>
</div><!-- end data -->
</div> <!-- end content -->
</div><!-- end wrapper -->
<?php include('../includes/footer.php');?>