Your IP : 10.3.227.210


Current Path : /home/bolconlineco/public_html/coordinator/
Upload File :
Current File : /home/bolconlineco/public_html/coordinator/tutorInfo.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">
  
					
					
</div>
                      
                
                
                <div id="data">
<script type="text/javascript">
	$(function() {
		
		$("#tabs").tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
	});
	</script>
    <script type="text/javascript">
$(document).ready(function(){
	$(".ui-corner-top").corner("top 10px");
	$(".ui-corner-all").corner("10px");

})
</script>

<?php
 if(isset($_GET['Id']))
  {
	$id=$_GET['Id'];
	$query="select * from tutor where tutorId= '$id'";
	$result=mysql_query($query) or die(mysql_error());
	$fetch=mysql_fetch_array($result);
	extract($fetch);
  }

?>
<?php
 if(isset($_POST['course-submit']))
  {
	
	$id=$_POST['tutorId'];
	$course=$_POST['course'];
	

	 
	 foreach($course as $cour)
	  {
		  $query="delete from coursetutor where courseId='$cour' and tutorId='$id'";
		  $result=mysql_query($query) or die(mysql_error());
		  
		  
	  }
	  header("location:tutorInfo.php?Id=$id");
		  exit();
	 
	  
  }

?>
<!--
<script language="javascript">
$(document).ready(function () {
       var currentTabIndex = "0";

       $tab = $("#tabs").tabs({
            activate: function (e, ui) {               
                currentTabIndex = ui.newTab.index().toString();
                localStorage.setItem('tab-index', currentTabIndex);
            }
       });

       if (localStorage.getItem('tab-index') != null) {
           currentTabIndex = localStorage.getItem('tab-index');
           console.log(currentTabIndex);
           $tab.tabs('option', 'active', currentTabIndex);
        }   $('#btn-sub').on('click', function () {
            localStorage.setItem("tab-index", currentTabIndex);
            //window.location = "/Home/Index/" + currentTabIndex;
        });
    });
		</script>-->
      
<div style="-moz-border-radius: 10px 10px 10px 10px; width:900px" class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
			    <ul style="-moz-border-radius: 10px 10px 10px 10px;" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
      <li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">Tutor Details</a></li>

            <li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-3">Course Details</a></li>
            <li style="-moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px;" class="ui-corner-top ui-state-default"><a href="#ui-tabs-4">Note</a></li>
          
   </ul>
   <div style="" id="tabs-1" class="tabsContent ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"><ul class="thumbs">
      <table width="700" border="1">
  <tr>
    <td>Title</td>
    <td><?php echo $title; ?></td>
  </tr>
  <tr>
    <td>First Name</td>
    <td><?php echo $firstname;?></td>
  </tr>
  <tr>
    <td>Last Name</td>
    <td><?php echo $lastname; ?></td>
  </tr>
  <tr>
    <td>Email</td>
    <td><?php echo $email;?></td>
  </tr>
  <tr>
    <td>Phone</td>
    <td><?php echo $phone; ?></td>
  </tr>
  <tr>
    <td>Designation</td>
    <td><?php echo $designation; ?></td>
  </tr>
   <tr>
    <td>Qualification</td>
    <td><?php  echo $qualification; ?></td>
  </tr>
   <tr>
    <td>Status</td>
    <td>
     <?php if($tutorstatus==1){
		 echo "Active";
		 }else
		 {
			echo "InActive"; 
		 }
		 
		 ?>
    
    </td>
  </tr>
</table>

   </ul>
   </div>
    <div style="" id="ui-tabs-3" class="tabsContent ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"><ul class="thumbs">
   <form action="" method="post">
     <?php
	  
	  $query="select c.*,ct.* from course as c join coursetutor as ct on c.courseId=ct.courseId where ct.tutorId='$id'";
	  $result=mysql_query($query) or die(mysql_error());
	   //$query="select courseId from coursetutor where tutorId='$id'";
	  
	  /*$result=mysql_query($query) or die("error");
	  if(mysql_num_rows($result) > 0)
	   {
	     $fetches=mysql_fetch_array($result);
	   }
	   $q1="select * from course";
	   $result1=mysql_query($q1) or die(mysql_error());*/
	  if(mysql_num_rows($result))
	   {
		while($set=mysql_fetch_array($result))
		 {
			
				?>
 <p><input style="height:none; " type="checkbox" name="course[]" value="<?php echo $set['courseId']; ?>" checked="checked"  /><?php echo $set['courseName'];?></p>               
                
                <?php  
		
		 }
	   }
	    
	 
	 ?>
     <input type="hidden" name="tutorId" value="<?php echo $id; ?>" />
     <input type="submit" name="course-submit" value="Re-assign" class="add" />
     </form>
   </ul>
   </div>
   

                
                
                </div>
                </div>
                                                   
           </div> <!-- end content  -->
          
        </div><!-- end wrapper -->   


  <?php include('../includes/footer.php');?>