
<?php
  include 'connection.php';
  //include 'navn.php';
  session_start();
$id=mysqli_real_escape_string($db,$_GET['id']);
//$query=mysqli_query($db,"SELECT * FROM users where user_id='$id'")or die(mysqli_error());
//$row=mysqli_fetch_array($query);
//$queryc=mysqli_query($db,"SELECT * FROM thesis where user_id='$id'")or die(mysqli_error());
//$querycp=mysqli_query($db,"SELECT * FROM course where user_id='$id'")or die(mysqli_error());
$stmt = $db->prepare("SELECT * FROM users where user_id= ?");
$stmt->bind_param("i",$id);
$stmt->execute();
$result = $stmt->get_result();
$stmt->close();
$row = $result->fetch_assoc();

  ?>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo $row['full_name'];?> Profile Page</title>
<link rel="stylesheet" href="./MNNIT Form_files/style.css">
<link href="./MNNIT Form_files/style(1).css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./MNNIT Form_files/ddsmoothmenu.css">
<link rel="stylesheet" type="text/css" href="./MNNIT Form_files/jquery.fancybox-1.3.4.css" media="screen">

</head>
<body style="background-image: url(&amp; quot;./images/bubble.png&amp; quot;); font-size: 16px;">
<script src="./MNNIT Form_files/add.js.download"></script>




<div style="background-position: center top; background-repeat: repeat-x; width: 100%; background-image: url(./pic/bubble.png);" id="wrap">
  

 <div style="width: 960px; margin: 0px auto;" id="inside"> 
  <br>
<h1><?php echo $row['full_name'];?></h1>
<hr>
<br>
<div id="image" style="height: 180px;">
<img src="<?php ECHO $imageURL = '../userprofile/uploads/'.$row["filename"];?>" alt="<?php echo $row['full_name'];?>" style="
    float: left;
    margin-right: 40px;
" width="150" height="190">
<p style="padding-top: 40px;"><?php if($row['desg']=="ascprof") echo "Associate Professor";elseif($row['desg']=="ascprofh") echo "Associate Professor & Head";elseif($row['desg']=="prof") echo "Professor";elseif($row['desg']=="profh") echo "Professor & Head"; else echo "Assistant Professor";?><br>
<?php 
if($row['dept']=="amd"){
 echo "Department of Applied Mechanics" ;
 }
 elseif($row['dept']=="biod"){
 echo "Department of Biotechnology" ;
 }
  elseif($row['dept']=="ched"){
 echo "Department of Chemical Engineering" ;
 }
 elseif($row['dept']=="ced"){
 echo "Department of Civil Engineering" ;
 }
 elseif($row['dept']=="eed"){
 echo "Department of Electrical Engineering" ;
 }
  elseif($row['dept']=="eced"){
 echo "Department of Electronics & Communication Engineering" ;
 }
 elseif($row['dept']=="med"){
 echo "Department of Mechanical Engineering" ;
 }
 elseif($row['dept']=="phy"){
 echo "Department of Physics" ;
 }
 elseif
	 ($row['dept']=="csed"){
 echo "Department of Computer Science & Engineering";
 }
 elseif
	 ($row['dept']=="chem"){
 echo "Department of Chemistry";
 }
 elseif
	 ($row['dept']=="math"){
 echo "Department of Mathematics";
 }
  elseif
	 ($row['dept']=="hum"){
 echo "Department of Humanities and Social Sciences";
 }
 elseif
	 ($row['dept']=="sms"){
 echo "School of Management Studies";
 }
  elseif
	 ($row['dept']=="gis"){
 echo "GIS Cell";
 }
 elseif
	 ($row['dept']=="iii"){
 echo "III Cell";
 }
 else 
	 {echo "Bad Login";
?>
                     <script type="text/javascript">
            alert("User does not register/exist");
            window.location = "http://www.mnnit.ac.in/";
        </script>
        <?php
 }
 ?> <br>
Motilal Nehru National Institute of Technology Allahabad, Prayagraj, India-211004<br>

E-mail:   <?php echo $row['username'];?>[at]mnnit[dot]ac[dot]in<br>
Telephone: <?php if(!empty($row['pho'])) echo $row['pho'].'(O)'.' ';if(!empty($row['phr'])) echo $row['phr'].'(R)'.' ';if(!empty($row['phm']))echo $row['phm'].'(M)'; ?><!--+91 532 227-1361(O), +91 532 227-1755 (R)--><br>



</p></div>

<!--<div class="navigation" style="margin-top: 20px;">
                                  <div id="smoothmenu1" class="ddsmoothmenu">
                                  	  <ul>
                                  	      <li class="first"><a  href="preview.php">Basic Information</a></li>
                                          <li><a  href="previewr.php">Responsibilities</a></li>
                 
								<li><a  href="previewp.php">Research Publications</a></li>
								<li><a  href="previewa.php">Other Academic Achievements</a></li>
                                          <li><a class="selected" href="previewt.php">Thesis Supervised</a></li>
                                          
                                          
		                              </ul>				
                                  </div>

</div>-->
<?php
include 'smoothmenut.php';
?>




<div id="basicinfo" style="padding-top: 5px;">

<br>
 <h2>Thesis Supervised</h2>
<hr>
<br>

 <table style="table-layout: fixed;" border="1" bordercolor="grey" "cellpadding = "0" cellspacing = "0">
 <tr>
    <th  >S.No</th>
    <th >Research Topic</th>
    <th >Name of Student</th>
    <th >Completion/Registration Year</th>
  </tr>

								 
<?php 

$t="phd";
//$queryt=mysqli_query($db,"SELECT * FROM thesis where user_id='$id' and type='$t'")or die(mysqli_error());
$stmtt = $db->prepare("SELECT * FROM thesis where user_id= ? and type=?");
$stmtt->bind_param("is",$id,$t);
$stmtt->execute();
$resultt = $stmtt->get_result();
$num_results = mysqli_num_rows($resultt);
 if(($num_results)>0){
  ?> 
  <td colspan="4"><b>Ph.D. Completed:</b></td> <?php
 ?><?php
for ($i=0;$i<$num_results;$i++) 
{   
	$rowt=$resultt->fetch_assoc();
	
		?><!--<dd><?php echo $rowt['topic'];?></dd>-->
		<tr><td ><?php echo $i+1;?></td><td ><?php echo $rowt['topic']; ?></td><td ><?php echo $rowt['nos'];?></td><td ><?php echo$rowt['year'];?></td></tr>
		<?php	
}
 }



$t="phdo";
//$t="phd";
//$queryt=mysqli_query($db,"SELECT * FROM thesis where user_id='$id' and type='$t'")or die(mysqli_error());
 //$num_results = mysqli_num_rows($queryt);
$stmtt = $db->prepare("SELECT * FROM thesis where user_id= ? and type=?");
$stmtt->bind_param("is",$id,$t);
$stmtt->execute();
$resultt = $stmtt->get_result();
$num_results = mysqli_num_rows($resultt);
  if(($num_results)>0){
	  ?><td colspan="4"><b>Ph.D. Ongoing</b></td> <?php
	  for ($i=0;$i<$num_results;$i++) 
{   
	$rowt=$resultt->fetch_assoc();
	
		?><!--<dd><?php echo $rowt['topic'];?></dd>-->
		<tr><td ><?php echo $i+1;?></td><td ><?php echo $rowt['topic']; ?></td><td ><?php echo $rowt['nos'];?></td><td ><?php echo$rowt['year'];?></td></tr>
		<?php	
}
  }
  $t="mtech";
//$t="phd";
//$queryt=mysqli_query($db,"SELECT * FROM thesis where user_id='$id' and type='$t'")or die(mysqli_error());
 //$num_results = mysqli_num_rows($queryt);
$stmtt = $db->prepare("SELECT * FROM thesis where user_id= ? and type=?");
$stmtt->bind_param("is",$id,$t);
$stmtt->execute();
$resultt = $stmtt->get_result();
$num_results = mysqli_num_rows($resultt);
  if(($num_results)>0){
	  ?><td colspan="4"><b>M.Tech Students</b></td> <?php
	  for ($i=0;$i<$num_results;$i++) 
{   
	$rowt=$resultt->fetch_assoc();
	
		?><!--<dd><?php echo $rowt['topic'];?></dd>-->
		<tr><td ><?php echo $i+1;?></td><td ><?php echo $rowt['topic']; ?></td><td ><?php echo $rowt['nos'];?></td><td ><?php echo$rowt['year'];?></td></tr>
		<?php	
}
  }
  $t="msc";
//$t="phd";
//$queryt=mysqli_query($db,"SELECT * FROM thesis where user_id='$id' and type='$t'")or die(mysqli_error());
 //$num_results = mysqli_num_rows($queryt);
$stmtt = $db->prepare("SELECT * FROM thesis where user_id= ? and type=?");
$stmtt->bind_param("is",$id,$t);
$stmtt->execute();
$resultt = $stmtt->get_result();
$num_results = mysqli_num_rows($resultt);
  if(($num_results)>0){
	  ?><td colspan="4"><b>M.Sc. Students</b></td> <?php
	  for ($i=0;$i<$num_results;$i++) 
{   
	$rowt=$resultt->fetch_assoc();
	
		?><!--<dd><?php echo $rowt['topic'];?></dd>-->
		<tr><td ><?php echo $i+1;?></td><td ><?php echo $rowt['topic']; ?></td><td ><?php echo $rowt['nos'];?></td><td ><?php echo$rowt['year'];?></td></tr>
		<?php	
}
  }
   $t="btech";
//$t="phd";
//$queryt=mysqli_query($db,"SELECT * FROM thesis where user_id='$id' and type='$t'")or die(mysqli_error());
//$num_results = mysqli_num_rows($queryt);
$stmtt = $db->prepare("SELECT * FROM thesis where user_id= ? and type=?");
$stmtt->bind_param("is",$id,$t);
$stmtt->execute();
$resultt = $stmtt->get_result();
$stmtt->close();
$num_results = mysqli_num_rows($resultt);
  if(($num_results)>0){
	  ?><td colspan="4"><b>B.Tech Students</b></td> <?php
	  for ($i=0;$i<$num_results;$i++) 
{   
	$rowt=$resultt->fetch_assoc();
	
		?><!--<dd><?php echo $rowt['topic'];?></dd>-->
		<tr><td ><?php echo $i+1;?></td><td ><?php echo $rowt['topic']; ?></td><td ><?php echo $rowt['nos'];?></td><td ><?php echo$rowt['year'];?></td></tr>
		<?php	
}

  }
  ?></table><?php
  $db->close();
?>
	
	





	
	</div>
 </div>
 
</div>

<br>
<br><br><br>
<div id="bottom_seciton" style="height: 30px;">
		<div class="clear"></div>     
    </div>








<iframe frameborder="0" scrolling="no" style="background-color: transparent; border: 0px; display: none;" src="./MNNIT Form_files/saved_resource.html"></iframe><div id="GOOGLE_INPUT_CHEXT_FLAG" input="" input_stat="{&quot;tlang&quot;:true,&quot;tsbc&quot;:true,&quot;pun&quot;:true,&quot;mk&quot;:true,&quot;ss&quot;:true}" style="display: none;"></div></body></html>
