<?php 
 include 'connection.php';
  //include 'navn.php';
 // session_start();
  //$login=$_GET['login'];
$id=mysqli_real_escape_string($db,$_GET['login']);

$stmt = $db->prepare("SELECT * FROM users where username= ?");
$stmt->bind_param("s",$id);
$stmt->execute();
$result = $stmt->get_result();
$row = $result->fetch_assoc();
//$query=mysqli_query($db,"SELECT * FROM users where username='$id'")or die(mysqli_error());
//$row=mysqli_fetch_array($query);
$id=$row['user_id'];
$stmtc=$db->prepare("SELECT * FROM course where user_id=?");
$stmtc->bind_param("i",$id);
$stmtc->execute();
$resultc = $stmtc->get_result();
$stmtcp=$db->prepare("SELECT * FROM course where user_id=?");
$stmtcp->bind_param("i",$id);
$stmtcp->execute();
$resultcp = $stmtcp->get_result();
$stmt->close();
 $stmtc->close();
 $stmtcp->close();
 
//$queryc=mysqli_query($db,"SELECT * FROM course where user_id='$id'")or die(mysqli_error());
//$querycp=mysqli_query($db,"SELECT * FROM course where user_id='$id'")or die(mysqli_error());


  ?>
<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 class="selected" 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 href="previewt.php">Thesis Supervised</a></li>
                                          
                                          
		                              </ul>				
                                  </div>

</div>-->
<?php
include 'smoothmenu.php';
?>

<div id="basicinfo" style="padding-top: 60px;">
<?php 
$num_results = mysqli_num_rows($resultc);
if($num_results>0)
{
?>
<br>
								  <h2>Teaching</h2>
<hr>
<br>
<dl>

<dt><b>Current Courses:</b></dt>
<?php
for ($i=0;$i<$num_results;$i++) 
{
	$rowc = $resultc->fetch_assoc();
	if($rowc['type']=="Present"){
		?><dd><?php echo $rowc['course'];?></dd><?php
	}
	
}
}
?>
<?php 


$num_results = mysqli_num_rows($resultcp);
if($num_results>0)
{
	?><dt><b>Past Courses:</b></dt><?php
for ($i=0;$i<$num_results;$i++) 
{
	$rowcp=$resultcp->fetch_assoc();
	if($rowcp['type']=="Past"){
		
	?><dd><?php echo $rowcp['course'];?></dd><?php
	}
}
}
?>
	</dl>

</div>
<div id="basicinfo" style="padding-top: 5px;">
<?php 
//$queryeu=mysqli_query($db,"SELECT * FROM quali where user_id='$id' and type='ug' ")or die(mysqli_error());
$stmtu=$db->prepare("SELECT * FROM quali where user_id=? and type=?");
$typeu="ug";
$stmtu->bind_param("is",$id,$typeu);
$stmtu->execute();
$resultu = $stmtu->get_result();

 $num_results = mysqli_num_rows($resultu);
 if($num_results>0)
 {
 ?>
<br>
								  <h2>Education</h2>
<hr>
<br>
<dl>
<?php

for ($i=0;$i<$num_results;$i++) 
{
	$roweu=$resultu->fetch_assoc();
	
		?><dt><b>Undergraduate:</b></dt><dd><?php echo $roweu['quali'];?></dd><?php
	/*
	elseif($roweu['type']=="pg"){
		?><dt><b>Postgraduate:</b></dt><dd><?php echo $roweu['quali'];?></dd><?php
	}
	elseif($roweu['type']=="phd"){
		?><dt><b>Doctoral:</b></dt><dd><?php echo $roweu['quali'];?></dd><?php
	}*/
	
}
 }
?>

	</dl>
	<dl>

<?php 

//$queryeu=mysqli_query($db,"SELECT * FROM quali where user_id='$id' and type='pg' ")or die(mysqli_error());
$stmtu=$db->prepare("SELECT * FROM quali where user_id=? and type=?");
$typeu="pg";
$stmtu->bind_param("is",$id,$typeu);
$stmtu->execute();
$resultu = $stmtu->get_result();

 $num_results = mysqli_num_rows($resultu);
if($num_results>0){
for ($i=0;$i<$num_results;$i++) 
{
	$roweu=$resultu->fetch_assoc();
	
		?><dt><b>Postgraduate:</b></dt><dd><?php echo $roweu['quali'];?></dd><?php
	
	
}}

?>

	</dl>
<dl>

<?php 
//$queryeu=mysqli_query($db,"SELECT * FROM quali where user_id='$id' and type='phd' ")or die(mysqli_error());
$stmtu=$db->prepare("SELECT * FROM quali where user_id=? and type=?");
$typeu="phd";
$stmtu->bind_param("is",$id,$typeu);
$stmtu->execute();
$resultu = $stmtu->get_result();
$stmtu->close();

 $num_results = mysqli_num_rows($resultu);
 
 if($num_results>0){
for ($i=0;$i<$num_results;$i++) 
{
	$roweu=$resultu->fetch_assoc();
	
		?><dt><b>Doctoral:</b></dt><dd><?php echo $roweu['quali'];?></dd><?php
	
	
}
 }
?>

	</dl>
</div>
<div id="basicinfo" style="padding-top: 5px;">
<?php 
//$queryaoi=mysqli_query($db,"SELECT * FROM aoi where user_id='$id'")or die(mysqli_error());
 //$num_results = mysqli_num_rows($queryaoi);
 $stmtaoi=$db->prepare("SELECT * FROM aoi where user_id=?");
$stmtaoi->bind_param("i",$id);
$stmtaoi->execute();
$resultaoi = $stmtaoi->get_result();
$stmtaoi->close();
 $num_results = mysqli_num_rows($resultaoi);
 if($num_results>0)
 {
 ?>
<br>
								  <h2>Areas of Research</h2>
<hr>
<br>
<dl><?php


for ($i=0;$i<$num_results;$i++) 
{
	$rowaoi=$resultaoi->fetch_assoc();
	
		?><dd><?php echo $rowaoi['aoi'];?></dd><?php
	
	
}
 }
?>

	</dl>
	

</div>
<div id="basicinfo" style="padding-top: 5px;">
<?php
//$querypm=mysqli_query($db,"SELECT * FROM pm where user_id='$id'")or die(mysqli_error());
 //$num_results = mysqli_num_rows($querypm);
 $stmtpm=$db->prepare("SELECT * FROM pm where user_id=?");
$stmtpm->bind_param("i",$id);
$stmtpm->execute();
$resultpm = $stmtpm->get_result();

 $num_results = mysqli_num_rows($resultpm);
 if($num_results>0){
?>
<br>
								  <h2>Professional Membership</h2>
<hr>
<br>
<dl><?php

 

for ($i=0;$i<$num_results;$i++) 
{
	$rowpm=$resultpm->fetch_assoc();
	
		?><dd><?php echo $rowpm['pm'];?></dd><?php
	
	
}
 }
?>

	</dl>
	

</div>
<div id="basicinfo" style="padding-top: 5px;">
<?php
//$querypm=mysqli_query($db,"SELECT * FROM rid where user_id='$id'")or die(mysqli_error());
 //$num_results = mysqli_num_rows($querypm);
$stmtpm=$db->prepare("SELECT * FROM rid where user_id=?");
$stmtpm->bind_param("i",$id);
$stmtpm->execute();
$resultpm = $stmtpm->get_result();
$stmtpm->close();
$num_results = mysqli_num_rows($resultpm);
 if($num_results>0){
?>
<br>
								  <h2>Research ID's</h2>
<hr>
<br>
<dl><?php

 

for ($i=0;$i<$num_results;$i++) 
{
	$rowpm=$resultpm->fetch_assoc();
	
		?><dd><b><?php if ($rowpm['type']=="VID"){
		echo $ty="Vidawan ID";
		$a="https://mnnit.irins.org/profile/";
		?>:-</b><a href="<?php echo $a.$rowpm['ridd'];?>" target="_blank"><?php echo $rowpm['ridd'];?></a></dd><?php
		}
		elseif($rowpm['type']=="GC"){
			echo $ty="Google Scholar ID";
			$a="https://scholar.google.co.in/citations?user=";
		?>:-</b><a href="<?php echo $a.$rowpm['ridd'];?>" target="_blank"><?php echo $rowpm['ridd'];?></a></dd><?php
		}
		elseif($rowpm['type']=="SID"){
			echo $ty="Scopus Scholar ID";
			$a="https://www.scopus.com/authid/detail.uri?authorId=";
		?>:-</b><a href="<?php echo $a.$rowpm['ridd'];?>" target="_blank"><?php echo $rowpm['ridd'];?></a></dd><?php
		}
		elseif($rowpm['type']=="ORCID"){
			echo $ty="ORCID ID";
			$a="https://orcid.org/";
		?>:-</b><a href="<?php echo $a.$rowpm['ridd'];?>" target="_blank"><?php echo $rowpm['ridd'];?></a></dd><?php
		}
		elseif($rowpm['type']=="RID"){
			echo $ty="Researcher ID";
			$a="http://www.researcherid.com/rid/";
		?>:-</b><a href="<?php echo $a.$rowpm['ridd'];?>" target="_blank"><?php echo $rowpm['ridd'];?></a></dd><?php
		}
			
	
	
}
 }
 $db->close();
 
 
?>

	</dl>
	

</div>
 </div>
 
</div>

<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>
