Your IP : 10.1.73.149


Current Path : /home/bolconlineco/public_html/aaaaaa/student/
Upload File :
Current File : /home/bolconlineco/public_html/aaaaaa/student/student.php

<?php 
  ob_start();
  session_start();
  ?>
<?php include('header.php'); ?>
<?php
if(!isset($_SESSION['studentname']) || $_SESSION['studentrole'] != 4)
 {
	header("location:../index.php");
	exit(); 
 }
 $id=$rr['rollno'];
?> 

<div id="content">
             	
	<div id="frm">
  
				
					
</div>

            <?php
			 if(isset($_GET['e']))
			  {
				?>
                <span class="errors">This Email is already registerd</span>
                <?php  
				  echo "<script>setTimeout(\"location.href = 'studentInfo.php?Id=$id';\",2500);</script>";
	   
                  
			  }
			
			?>
            
        
               <script>
    
$("document").ready(function(){
	$("#nte tr:odd").addClass('high');
	
	});
</script>       
                
                
                <div id="data" style="width:900px">
<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>
<script language="javascript">

$(document).ready(function () {
       var currentTabIndex = "0";

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

       if (sessionStorage.getItem('tab-index') != null) {
           currentTabIndex = sessionStorage.getItem('tab-index');
           console.log(currentTabIndex);
           $tab.tabs('option', 'active', currentTabIndex);
        }
        $('#btn-sub').on('click', function () {
            sessionStorage.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">Personal 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-9">Employment 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-8">Fee 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>
            
          
   </ul><div style="" id="tabs-1" class="tabsContent ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"><ul class="thumbs">

   <?php
     if(isset($_POST['registrationdate']))
	  {
		 $newRegist=sql_strip($_POST['registdate']);
		  $old=sql_strip($_POST['oldregist']);
		  $query="update student set registrationdate='$newRegist' where registrationdate='$old' and rollno='$id'";
		  $result=mysql_query($query) or die(mysql_error());
		  header("location:studentInfo.php?Id=$id");
		  exit();
	  }
	
	  if(isset($_POST['postcodeupdate']))
	   {
		   $postcodes=sql_strip($_POST['postcodes']);
		   $oldrepostcode=sql_strip($_POST['oldrepostcode']);
		   $query="update student set postcode='$postcodes' where postcode='$oldrepostcode' and rollno='$id'";
		   $result=mysql_query($query) or die(mysql_error());
		   header("location:studentInfo.php?Id=$id");
		   exit();
	   }
	   if(isset($_POST['updatefname']))
	    {
		  	$firstname=$_POST['firstname'];
			$oldfname=$_POST['oldfname'];
			$query="update student set fname='$firstname' where fname='$oldfname' and rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		   if(isset($_POST['updatelname']))
	    {
		  	$lastname=$_POST['lastname'];
			$oldlname=$_POST['oldlname'];
			$query="update student set lname='$lastname' where lname='$oldlname' and rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		
		   if(isset($_POST['updatedob']))
	    {
		  	//$newdob=date('Y-m-d',strtotime($_POST['newdob']));
			 $month=$_POST['month'];
			 $day=$_POST['day'];
			 $year=$_POST['year'];
			 $newdob=$year.'-'.$month.'-'.$day;
			$query="update student set dob='$newdob' where rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		   if(isset($_POST['updateaddress1']))
	    {
		  	$newaddress1=$_POST['newaddress1'];
			$oldaddress1=$_POST['oldaddress1'];
			$query="update student set address='$newaddress1' where address='$oldaddress1' and rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		   if(isset($_POST['updatecity']))
	    {
		  	$newcity=$_POST['newcity'];
			$oldcity=$_POST['oldcity'];
			$query="update student set city='$newcity' where city='$oldcity' and rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		   if(isset($_POST['updatecountry']))
	    {
		  	$newcountry=$_POST['newcountry'];
			//$oldlname=$_POST['oldlname'];
			$query="update student set country='$newcountry' where rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		   if(isset($_POST['updatephone']))
	    {
		  	$phone=$_POST['phone'];
			$query="update student set phone='$phone' where rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		   if(isset($_POST['updatemobile']))
	    {
		  	$mobile=$_POST['mobile'];
			$query="update student set mobile='$mobile' where rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		   if(isset($_POST['updatest']))
	    {
		  	$studstatus=$_POST['studstatus'];
			
			$query="update student set studentstatus='$studstatus' where rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
		}
		  if(isset($_POST['updateemail']))
	    {
			/*
		  	$newemail=$_POST['newemail'];
			$oldemail=$_POST['oldemail'];
			$query="update student set email='$newemail' where rollno='$id'";
		    $result=mysql_query($query) or die(mysql_error());
			$qq="update admin set username='$newemail' where username='$oldemail'";
			$rr=mysql_query($qq) or die(mysql_error());
		    header("location:studentInfo.php?Id=$id");
		    exit();
			*/
			
		  	$email=$_POST['newemail'];
			$oldemail=$_POST['oldemail'];
			if($email==$oldemail)
			 {
				 echo "<script>window.location.href='studentInfo.php?Id=$id'</script>";
			 }else
			 {
			$sql="select * from programe_co where email='$email'";
			$rresult=mysql_query($sql) or die(mysql_error());
			$sql1="select tutorId from tutor where email='$email'";
		    $rr=mysql_query($sql1) or die(mysql_error());
			$sql="select SId from student where email='$email'";
			$result=mysql_query($sql) or die(mysql_error());
			if(mysql_num_rows($rresult) > 0 )
			 {
				echo "<script>window.location.href='studentInfo.php?e&Id=$id'</script>"; 
			 }else if(mysql_num_rows($rr) > 0 )
			  {
				echo "<script>window.location.href='studentInfo.php?e&Id=$id'</script>";  
			  }else if(mysql_num_rows($result) > 0 )
			   {
				  echo "<script>window.location.href='studentInfo.php?e&Id=$id'</script>"; 
			   }else
				   {
					$oldemail=$_POST['oldemail'];
					$query="update student set email='$email' where rollno='$id'";
					$result=mysql_query($query) or die(mysql_error());
					$qq="update admin set username='$email' where username='$oldemail'";
					$rr=mysql_query($qq) or die(mysql_error());
					//header("location:studentInfo.php?Id=$id");
					//exit();
					
					/*echo "<script>window.location.href='studentInfo.php?Id=$id&ok'</script>";*/
					 echo "<script>window.location.href='../index.php'</script>";
					
			   }
			 }
		}
		if(isset($_POST['updatetitle']))
		 {
			 $title=$_POST['title'];
			 $query="update student set jobtitle='$title' where rollno='$id'";
			 $result=mysql_query($query) or die(mysql_error());
			 header("location:studentInfo.php?Id=$id");
			 exit();
		 }
		 
		 if(isset($_POST['updatecomp']))
		  {
			  $companyname=$_POST['companyname'];
			  $query="update student set companyname='$companyname' where rollno='$id'";
			  $result=mysql_query($query) or die(mysql_error());
			 header("location:studentInfo.php?Id=$id");
			 exit();
			  
		  }
		  if(isset($_POST['upadd1']))
		   {
			   $addline1=$_POST['addline1'];
			   $query="update student set addressline1='$addline1' where rollno='$id'";
			   $result=mysql_query($query) or die(mysql_error());
			   header("location:studentInfo.php?Id=$id");
			   exit();
		   }
		
		  if(isset($_POST['updateaddressline2']))
		   {
			  $addressline2=$_POST['addressline2'];
			  $query="update student set addressline2='$addressline2' where rollno='$id'";
			  $result=mysql_query($query) or die(mysql_error());
			 header("location:studentInfo.php?Id=$id"); 
			 exit();
		   }
		  if(isset($_POST['updateaddressline3']))
		  {
			  $addressline3=$_POST['addressline3'];
			  $query="update student set addressline3='$addressline3' where rollno='$id'";
			  $result=mysql_query($query) or die(mysql_error());
			 header("location:studentInfo.php?Id=$id");
			 exit();
			  
		  }
		  if(isset($_POST['updatee-City']))
		  {
			  $ecity=$_POST['ecity'];
			  $query="update student set ecity='$ecity' where rollno='$id'";
			  $result=mysql_query($query) or die(mysql_error());
			 header("location:studentInfo.php?Id=$id");
			 exit();
			  
		  }
		  if(isset($_POST['epostcode']))
		  {
			  $ecode=$_POST['ecode'];
			  $query="update student set epostcode='$ecode' where rollno='$id'";
			  $result=mysql_query($query) or die(mysql_error());
			 header("location:studentInfo.php?Id=$id");
			 exit();
			  
		  }
		  if(isset($_POST['updatemecountry']))
		  {
			  $ecountry=$_POST['ecountry'];
			  $query="update student set ecountry='$ecountry' where rollno='$id'";
			  $result=mysql_query($query) or die(mysql_error());
			 header("location:studentInfo.php?Id=$id");
			 exit();
			  
		  }
   ?>
      <table width="650" border="0" id="personnaldetails" class="tablestyle">
  <tr>
    <td id="col">Registration Date:</td>
    <td id="col2"><?php 
	/*
	  if(isset($_POST['submit-1']))
	   {
	      	$rr=$_POST['regist'];
		?>
        <form action="" method="post">
        <input type="text" name="registdate" value="<?php echo $rr; ?>" class="inp" />
        <input type="hidden" name="oldregist" value="<?php echo $rr; ?>" />
        <input type="submit" name="registrationdate" value="Update" class="add" />
        </form>
        <?php
		
        }else{
			*/
			 echo date('d/m/Y',strtotime($registrationdate));
			 /*
		}
		?>
          </td>
    <td>
    <?php if(!isset($_POST['submit-1']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="regist" value="<?php echo $registrationdate; ?>" />
     <input type="submit" name="submit-1" class="add inp" value="Edit" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }*/
	?>
    </td>
    <td>
    <?php /* if(isset($_POST['submit-1'])){
		$rr=$_POST['regist'];
		?>
        <form action="" method="post">
        <input type="text" name="registdate" value="<?php echo $rr; ?>" />
        <input type="hidden" name="oldregist" value="<?php echo $rr; ?>" />
        <input type="submit" name="registrationdate" value="Update" class="add" />
        </form>
        <?php
		}*/?>
   </td>
  </tr>
  <tr>
    <td id="col">StudentID:</td>
    <td id="col2"><?php echo $rollno;?></td>
  </tr>
  <tr>
    <td id="col">Course:</td>
    <td id="col2"><?php echo $resultSEt['courseName'];?></td>
  </tr>
  <tr>
    <td id="col">First Name:</td>
    <td id="col2"><?php 
	/*
	  if(isset($_POST['submit-3']))
	   {
	      	$firstname=$_POST['firstname'];
		?>
        <form action="" method="post">
        <input type="text" name="firstname" value="<?php echo $firstname; ?>" />
        <input type="hidden" name="oldfname" value="<?php echo $firstname; ?>" />
        <input type="submit" name="updatefname" value="Update" class="add" />
        </form>
        <?php
		
        }else{*/
			 echo $fname;
			 /*
		}
		?></td>
    <td><?php if(!isset($_POST['submit-3']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="firstname" value="<?php echo $fname; ?>" />
     <input type="submit" name="submit-3" class="add" value="Edit" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }*/
	?></td>
  </tr>
  <tr>
    <td id="col">Last Name:</td>
    <td id="col2"><?php 
	/*
	  if(isset($_POST['submit-4']))
	   {
	      	$lname=$_POST['lname'];
		?>
        <form action="" method="post">
        <input type="text" name="lastname" value="<?php echo $lname; ?>" />
        <input type="hidden" name="oldlname" value="<?php echo $lname; ?>" />
        <input type="submit" name="updatelname" value="Update" class="add" />
        </form>
        <?php
		
        }else{*/
			 echo $lname;
			 /*
		}
		?></td>
    <td><?php if(!isset($_POST['submit-4']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="lname" value="<?php echo $lname; ?>" />
     <input type="submit" name="submit-4" class="add" value="Edit" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }*/
	?></td>
  </tr>
  <tr>
    <td id="col">Date OF Birth:</td>
    <td id="col2"><?php 
	  if(isset($_POST['submit-5']))
	   {
	      	$dateob=$_POST['dateob'];
			$full=explode('-',$dateob);
		?>
        <form action="" method="post">
        <select name="day">
           <option value="<?php echo $full[2]; ?>"><?php echo $full[2];?></option>
                <?php
								 for( $d=01; $d<=31; $d++)
								  {
									  ?>
                                      <option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
                                      <?php
								  }
								
								?>
           </select>
          <select name="month">
           <option value="<?php echo $full[1];?>"><?php echo $full[1];?></option>
          <?php
								 for( $d=01; $d<=12; $d++)
								  {
									  ?>
                                      <option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
                                      <?php
								  }
								
								?>
           
                            
           </select>
            <select name="year">
           <option value="<?php echo $full[0]; ?>"><?php echo $full[0];?></option>
            <?php
								  for($d=date("Y"); $d>=1960; $d--)
								   {
									   if($full[0]==$d)
									    {
										}else{
									   ?>
                                      <option value="<?php echo str_pad($d,2,'0',STR_PAD_LEFT);?>"><?php echo str_pad($d,2,'0',STR_PAD_LEFT);?></option>
                                       <?php
								   }
								   }
								?>
           </select>
       
        <input type="submit" name="updatedob" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo date('d/m/Y',strtotime($dob));
		}
		?></td>
    <td><?php if(!isset($_POST['submit-5']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="dateob" value="<?php echo $dob; ?>" />
     <input type="submit" name="submit-5" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col">Email: </td>
    <td id="col2"><?php 
	  if(isset($_POST['submit-email']))
	   {
	      	$email=$_POST['email'];
		?>
        <form action="" method="post">
        <input type="text" name="newemail" value="<?php echo $email; ?>" />
        <input type="hidden" name="oldemail" value="<?php echo $email; ?>" />
        <input type="submit" name="updateemail" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $email;
		}
		?></td>
    <td><?php if(!isset($_POST['submit-email']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="email" value="<?php echo $email; ?>" />
     <input type="submit" name="submit-email" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col">Address line1:</td>
    <td id="col2"><?php 
	  if(isset($_POST['submit-6']))
	   {
	      	$address1=$_POST['address1'];
		?>
        <form action="" method="post">
        <input type="text" name="newaddress1" value="<?php echo $address1; ?>" />
        <input type="hidden" name="oldaddress1" value="<?php echo $address1; ?>" />
        <input type="submit" name="updateaddress1" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $address;
		}
		?></td>
    <td><?php if(!isset($_POST['submit-6']))
	     {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="address1" value="<?php echo $address; ?>" />
     <input type="submit" name="submit-6" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
   <tr>
    <td id="col">City:</td>
    <td id="col2"><?php 
	  if(isset($_POST['submit-7']))
	   {
	      	$city=$_POST['city'];
		?>
        <form action="" method="post">
        <input type="text" name="newcity" value="<?php echo $city; ?>" />
        <input type="hidden" name="oldcity" value="<?php echo $city; ?>" />
        <input type="submit" name="updatecity" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $city;
		}
		?></td>
    <td><?php if(!isset($_POST['submit-7']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="city" value="<?php echo $city; ?>" />
     <input type="submit" name="submit-7" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
   <tr>
    <td id="col">PostCode:</td>
    <td id="col2">
	<?php 
	  if(isset($_POST['PoCode']))
	   {
		   
	      	$postcode=$_POST['postcode'];
		?>
        <form action="" method="post">
        <input type="text" name="postcodes" value="<?php echo $postcode; ?>" />
        <input type="hidden" name="oldrepostcode" value="<?php echo $postcode; ?>" />
        <input type="submit" name="postcodeupdate" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        
		}
		else{
			 echo $postcode;
		}
		?>
	
	</td>
     <td>
    <?php if(!isset($_POST['PoCode']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="postcode" value="<?php echo $postcode; ?>" />
     <input type="submit" name="PoCode" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?>
    </td>
  </tr>
   <tr>
    <td id="col">Country:</td>
    <td id="col2"><?php 
	  if(isset($_POST['submit-8']))
	   {
	      	$country=$_POST['country'];
		?>
        <form action="" method="post">
        <select name="newcountry">
      <option value="<?php echo $country; ?>"><?php echo $country; ?></option>
    <?php
     $q="SELECT * FROM country where name !='$country' order by name";
	 $r=mysql_query($q) or die(mysql_error());
	 while($cont=mysql_fetch_array($r))
	  {
	    ?>
        <option value="<?php echo $cont['name']; ?>"><?php echo $cont['name']; ?></option>
        <?php  
	  }
	?>
    </select>
        
        <input type="submit" name="updatecountry" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $country;
		}
		?></td>
    <td><?php if(!isset($_POST['submit-8']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="country" value="<?php echo $country; ?>" />
     <input type="submit" name="submit-8" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col">Phone:</td>
    <td id="col2"><?php 
	  if(isset($_POST['submit-9']))
	   {
	      	$phone=$_POST['phone'];
		?>
        <form action="" method="post">
        <input type="text" name="phone" value="<?php echo $phone; ?>" />
       
        <input type="submit" name="updatephone" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $phone;
		}
		?></td>
    <td><?php if(!isset($_POST['submit-9']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="phone" value="<?php echo $phone; ?>" />
     <input type="submit" name="submit-9" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col">Mobile:</td>
    <td id="col2"><?php 
	  if(isset($_POST['submit-10']))
	   {
	      	$mobile=$_POST['mobile'];
		?>
        <form action="" method="post">
        <input type="text" name="mobile" value="<?php echo $mobile; ?>" />
        
        <input type="submit" name="updatemobile" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $mobile;
		}
		?></td>
    <td><?php if(!isset($_POST['submit-10']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
    <input type="hidden" name="mobile" value="<?php echo $mobile; ?>" />
     <input type="submit" name="submit-10" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
   <tr>
    <td id="col">Status:</td>
    <td id="col2">
    <?php 
	  if(isset($_POST['submit-status']))
	   {
	      	$st=$_POST['st'];
		?>
        <form action="" method="post">
        <select name="studstatus">
         <?php
          if($st==1)
		   {
			   ?>
               <option value="1">Active</option>
               <option value="2">InActive</option>
               <option value="3">Suspended</option>
               <option value="4">Cancel</option>
               <?php
		   }else if($st==2)
		    {
				?>
                <option value="2">InActive</option>
                <option value="1">Active</option>
                
                <option value="3">Suspended</option>
                <option value="4">Cancel</option>
                <?php
			}else if ($st==3)
			 {
				?>
                <option value="3">Suspended</option>
                <option value="2">InActive</option>
                <option value="1">Active</option>
                
                
                <option value="4">Cancel</option>
                <?php 
			 }else if($st==4)
			  {
				?>
                <option value="4">Cancel</option>
                <option value="3">Suspended</option>
                <option value="2">InActive</option>
                <option value="1">Active</option>
                
                
                
                <?php  
			  }
		 ?>
        </select>
       
        <input type="submit" name="updatest" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			if($studentstatus==1)
	  {
		echo "Active";  
	  }
	  else if($studentstatus==2)
	   {
		 echo "InActive";   
	   }else if($studentstatus==3)
	    {
		  echo "Suspended";	
		}else if($studentstatus==4)
		 {
			echo "cancel"; 
		 }
		}
		?></td>
    <td><?php if(!isset($_POST['submit-status']))
	 {
		 ?>
    <form action="" method="post">
    <div id="btn">
     <input type="hidden" name="st" value="<?php echo $studentstatus; ?>" />
     <input type="submit" name="submit-status" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?>
	
	<?php 
	/*
	 if($studentstatus==1)
	  {
		echo "Active";  
	  }
	  else if($studentstatus==2)
	   {
		 echo "InActive";   
	   }else if($studentstatus==3)
	    {
		  echo "Suspended";	
		}else if($studentstatus==4)
		 {
			echo "Completed"; 
		 }*/
	?></td>
  </tr>
</table>

            </ul>
           
            </div>
            
            <div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-9"><ul class="thumbs">
               <table width="600" border="0" id="personnaldetails" class="tablestyle">
  <tr>
    <td id="col1">Job Title:</td>
    <td id="col2"><?php 
	  if(isset($_POST['updatejobtitle']))
	   {
	      	$jobtitle=$_POST['jobtitle'];
		?>
        <form action="" method="post">
        <input type="text" name="title" value="<?php echo $jobtitle; ?>" />
        
        <input type="submit" name="updatetitle" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $jobtitle;
		}
		?></td>
    <td><?php if(!isset($_POST['updatejobtitle']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
    <input type="hidden" name="jobtitle" value="<?php echo $jobtitle; ?>" />
     <input type="submit" name="updatejobtitle" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col1" style="width:100px;">Company Name:</td>
    <td id="col2" style="width:300px;"><?php 
	  if(isset($_POST['updatecompany']))
	   {
	      	$companyname=$_POST['companyname'];
		?>
        <form action="" method="post">
        <input type="text" name="companyname" value="<?php echo $companyname; ?>" />
        
        <input type="submit" name="updatecomp" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $companyname;
		}
		?></td>
    <td style="width:50px;"><?php if(!isset($_POST['updatecompany']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
    <input type="hidden" name="companyname" value="<?php echo $companyname; ?>" />
     <input type="submit" name="updatecompany" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col1">Address line1:</td>
    <td id="col2"><?php 
	  if(isset($_POST['updateadd1']))
	   {
	      	
		?>
        <form action="" method="post">
        <input type="text" name="addline1" value="<?php echo $addressline1; ?>" />
        
        <input type="submit" name="upadd1" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $addressline1;
		}
		?></td>
    <td><?php if(!isset($_POST['updateadd1']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
    
     <input type="submit" name="updateadd1" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col1">Address line2:</td>
    <td id="col2"><?php 
	  if(isset($_POST['addressline-2']))
	   {
	      	$lname=$_POST['lname'];
		?>
        <form action="" method="post">
        <input type="text" name="addressline2" value="<?php echo $addressline2; ?>" />
        <input type="submit" name="updateaddressline2" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $addressline2;
		}
		?></td>
    <td><?php if(!isset($_POST['addressline-2']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
    <input type="hidden" name="lname" value="<?php echo $lname; ?>" />
     <input type="submit" name="addressline-2" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col1">Address line3:</td>
    <td id="col2"><?php 
	  if(isset($_POST['addressline-3']))
	   {
	      	$lname=$_POST['lname'];
		?>
        <form action="" method="post">
        <input type="text" name="addressline3" value="<?php echo $addressline3; ?>" />
        
        <input type="submit" name="updateaddressline3" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $addressline3;
		}
		?></td>
    <td><?php if(!isset($_POST['addressline-3']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
    <input type="hidden" name="lname" value="<?php echo $lname; ?>" />
     <input type="submit" name="addressline-3" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col1">City:</td>
    <td id="col2"><?php 
	  if(isset($_POST['e-city']))
	   {
	      	
		?>
        <form action="" method="post">
        <input type="text" name="ecity" value="<?php echo $ecity; ?>" />
        
        <input type="submit" name="updatee-City" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $ecity;
		}
		?></td>
    <td><?php if(!isset($_POST['e-city']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
   
     <input type="submit" name="e-city" class="edit" value="" />
     
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col1">Post Code: </td>
    <td id="col2"><?php 
	  if(isset($_POST['e-postcode']))
	   {
	      
		?>
        <form action="" method="post">
        <input type="text" name="ecode" value="<?php echo $epostcode; ?>" />
       
        <input type="submit" name="epostcode" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $epostcode;
		}
		?></td>
    <td><?php if(!isset($_POST['e-postcode']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
    <input type="hidden" name="lname" value="<?php echo $lname; ?>" />
     <input type="submit" name="e-postcode" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
  <tr>
    <td id="col1">Country:</td>
    <td id="col2"><?php 
	  if(isset($_POST['updateECountry']))
	   {
	      	//$lname=$_POST['lname'];
		?>
        <form action="" method="post">
        <select name="ecountry">
      <option value="<?php echo $ecountry; ?>"><?php echo $ecountry; ?></option>
    <?php
     $q="SELECT * FROM country where name !='$ecountry' order by name";
	 $r=mysql_query($q) or die(mysql_error());
	 while($cont=mysql_fetch_array($r))
	  {
	    ?>
        <option value="<?php echo $cont['name']; ?>"><?php echo $cont['name']; ?></option>
        <?php  
	  }
	?>
        </select>
        
        <input type="submit" name="updatemecountry" value="" class="update" />
        <input type="submit" name="submm" class="cancel" value="" onclick="document.href='studentInfo.php'" />
        </form>
        <?php
		
        }else{
			 echo $ecountry;
		}
		?></td>
    <td><?php if(!isset($_POST['updateECountry']))
	 {
		 ?>
    <form action="studentInfo.php?Id=<?php echo $id;?>#ui-tabs-9" method="post">
    <div id="btn">
    <input type="hidden" name="ecountry" value="<?php echo $ecountry; ?>" />
     <input type="submit" name="updateECountry" class="edit" value="" />
    </div>
    </form>
    <?php
	 }else{
		?>
       
        <?php
	 }
	?></td>
  </tr>
   
</table>
			</ul>
			</div>
            
            <div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-8"><ul class="thumbs" style="height:300">
            <?php
            $qi="select * from studentfee where rollno='$id'";
			  $stud9098=mysql_query($qi) or die(mysql_error());
			  
			  $studentfee23=mysql_fetch_array($stud9098);
			  
			  $myString = wordwrap($studentfee23['fee'], 130, "<br />", true);
			  ?>
              
              
		<p><?php echo $myString; ?></p>
            </ul>
            </div>	
              <div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-3"><ul class="thumbs">
              <p><strong><span id="stassignhead">Course Name:</span></strong><span id="studenassignment"><?php echo $resultSEt['courseName']; ?></span></p>
              <p><strong><span id="stassignhead">Total Topics:</span></strong><span id="studenassignment"><?php echo $resultSEt['coursetopic'];?></span></p>
                <?php
				
				$query="select * from topic where courseId=".$resultSEt['courseId'];
				$result=mysql_query($query) or die(mysql_error());
				if(mysql_num_rows($result) > 0)
				 {
				  
				
				?>
                     
                       <table width="800" border="0" class="tablestyle">
                       <thead id="stassignhead">
                       <tr style="background-color:#000; line-height:25px;color:#fff;"><th width="350" style="text-align:left;">Title</th><th width="40" style="text-align:left">Authorization</th><th width="40" style="text-align:left">Feedback</th></tr>
                       </thead>
                       <tbody id="studenassignment">
                       <?php
					    while($rSet=mysql_fetch_array($result))
				         { 
					   ?>
  <tr>
    <td><?php echo $rSet['topicName']; ?></td>
    <?php
	$topicId=$rSet['topicId'];
	$qq="select * from studentassignment where courseid=".$resultSEt['courseId']." and topicId=".$rSet['topicId']." and rollno='$id'";
	$rr=mysql_query($qq) or die(mysql_error());
	$row=mysql_fetch_array($rr);
	$topic=$row['AssignmentName'];
	?>
    <td><?php if($row['AssignmentStatus']==1){
		 echo "<span class=\"as\">With Student</span>";
		}else if($row['AssignmentStatus']==2){
			echo "<span class=\"tut\">With Tutor</span>";
			}else if($row['AssignmentStatus']==3){
				echo "<span class=\"assign\">Completed</span>";
				}else{echo "<span class=\"notassign\">Not Assigned<span>";}?></td>
 
    <td><?php 
	$qeuer="select * from studenresult where assignmentId='$topic' and rollno='$id'";
	$res=mysql_query($qeuer) or die("error");
	$fe=mysql_fetch_array($res);
	if($row['AssignmentStatus']==1)
	 {
		//echo "With student";
		echo "----------"; 
	 }else if($row['AssignmentStatus']==2)
	  {
		//echo "With Tutor";  
		echo "----------";
	  }else if($row['AssignmentStatus']==3)
	   {
		   ?>
         <!-- <a href="../studentresult/<?php //echo $fe['fullname'];?>">View Result &nbsp;&nbsp;&nbsp; <img src="../images/success.gif" /> </a>-->
          <a href="download.php?res=<?php echo $fe['fullname'];?>">View Result&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
           <?php
	   }else
	   {
		   ?>
		<span>----------</span> 
	   <?php
       }
	?></td>
  </tr>
  <?php
						 }
  ?>
  </tbody>
</table>
<?php
						 }else{
							echo "No Topic exists"; 
						 }
?>
<?php

  if(isset($_GET['rr']))
   {
	 
$file="../studentresult/".$_GET['rr']; //file location
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Content-Length: ' . filesize($file));
readfile($file);

   }
?>
                       
                       </ul>
                       
            
				
            </div>	
            										
                
           
            </div>														
                
                
                
                </div>
                </div>
                                                   
           </div> <!-- end content  -->
          
        </div><!-- end wrapper -->   


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