0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.220.130.220


Current Path : /proc/thread-self/root/var/www/html/orms-gug/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/orms-gug/src/preview_det.php

<?php
function loadPreviewDetails($aobj_context)
{
	//session_start();
	$userid = $_SESSION['userid'];

		
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$appno = trim($aobj_context->mobj_data["appno"]);
	$postname = trim($aobj_context->mobj_data["postname"]);
	$post_subject = trim($aobj_context->mobj_data["post_subject"]); 
	
	$ug = 0;
	$mphil = 0;
	$phd = 0;
	$pg = 0;
	$jre = 0;
	$net = 0;
	$slet = 0;


	$query = "select p.*,group_concat(distinct fspoken,'->',fspoken) as lang from perdetl p inner join languagedetl l  on l.fuserid = p.fuserid
			  where p.fuserid = '{$userid}' group by p.fuserid";
	$results  = $aobj_context->mobj_db->GetRow($query);	
	
	$query2 = "select * from qualdetl where fuserid = '{$userid}' and fappno = '{$appno}'";
	$results2  = $aobj_context->mobj_db->GetAll($query2);
	
	
	$query3 = "select sum(fselfscore) as cat2 from tleact where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'cat2' order by fenttype";
	$results3  = $aobj_context->mobj_db->GetRow($query3);
	$cat2 = $results3['cat2'];
	
	$query3 = "select sum(fpoints) as lecture from rclecture where fuserid = '{$userid}' and fappno = '{$appno}' order by fenttype";
	$results3  = $aobj_context->mobj_db->GetRow($query3);
	$lecture = $results3['lecture'];
	
	$query3 = "select sum(fpoints) as projct from rcprojct where fuserid = '{$userid}' and fappno = '{$appno}' order by fenttype";
	$results3  = $aobj_context->mobj_db->GetRow($query3);
	$projct = $results3['projct'];
	
	$query3 = "select sum(fpoints) as guid from rechguid where fuserid = '{$userid}' and fappno = '{$appno}' order by fenttype";
	$results3  = $aobj_context->mobj_db->GetRow($query3);
	$guid = $results3['guid'];
	
	$query4 = "select fslno, sum(fpoints) as expfpoints, sum(fexp) as fexp  from expdetl where fuserid = '{$userid}' 
			   and fappno = '{$appno}' and fstatus = 'Permanent' group by fappno order by fenttype";
	$results4  = $aobj_context->mobj_db->GetRow($query4);
	$expfpoints = $results4['expfpoints'];
	$fexp = $results4['fexp'];
	$fslno = $results4['fslno'];

	$i = 5;
	for($j=8;$j<60;$j++)
	{
		
		if($fexp >= $j)
			$fexppoints	= $i;
		else
			break;
		$i++;	
	}
	
	if($fexppoints > 10)
		$fexppoints = 10;
	
	$sql = "update expdetl set fpoints = '{$fexppoints}' where fslno = '{$fslno}' and fappno = '{$appno}'";
	$results20  = $aobj_context->mobj_db->Execute($sql);
		
		
	$query5 = "select sum(fpoints) as researchexpfpoints from researchexp where fuserid = '{$userid}' and fappno = '{$appno}' order by fenttype";
	$results5  = $aobj_context->mobj_db->GetRow($query5);
	$rchpoints = $results5['researchexpfpoints'];
	
	$query = "SELECT SUM(fpoints) as phd FROM phddetl where fuserid = '{$userid}' and fappno = '{$appno}'";
	$results  = $aobj_context->mobj_db->GetRow($query);
	$phd = $results['phd'];
	
	$query = "SELECT SUM(fpoints) as ug FROM qualdetl where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'bachelor'";
	$results  = $aobj_context->mobj_db->GetRow($query);
	$ug = $results['ug'];
	
	$query = "SELECT SUM(fpoints) as pg FROM qualdetl where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'masters'";
	$results  = $aobj_context->mobj_db->GetRow($query);
	$pg = $results['pg']+0;
	
	
	$query = "select p.*,GROUP_CONCAT(DISTINCT flanguage,'->',fwrite,'->',fread,'->',fspoken) AS lang,c.fcatcode as fcatcode
	from perdetl p inner join languagedetl l  on l.fuserid = p.fuserid
	inner join mascat c on p.fcatcode = c.fcatid
	where p.fuserid = '{$userid}' 
	group by p.fuserid";
	$results = $aobj_context->mobj_db->GetRow($query);	

	$table = '<table class="table table-bordered" border-color:"black"; style="width:99%;" id="">';
	$table.='<tr>'; 								
	$table.='<td style="font-weight: bold;text-align:center;">Summary of points earned for Educational Qualifications and Academic Performance Indicator(API) Score as per the GOK guidelines</td>';
	$table.='</tr></table><br>';
	
	$slet = $results['fsletpoints'];
	$net  = $results['fnetpoints'];
	$jre  = $results['fjrpoints'];
	$pdf  = $results['FPDFPOINTS'];

	if($postname == 'ASSISTANT PROFESSOR')	
	{
		//Research Papers Published (III(A))
		$rc3A101 = 0;
		$queryx  = "select sum(fpoints) as lpoints from researchexp where fuserid = '$userid' and fappno = '$appno' and fpublication in ('1009','1065')";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3A101 = $resultx['lpoints']+0;

		$rc3A102 = 0;
		$queryx  = "select sum(fpoints) as lpoints from researchexp where fuserid = '$userid' and fappno = '$appno' and fpublication in ('1010','1066')";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3A102 = $resultx['lpoints']+0;

		//Publications Other than Research articles  (III(B))
		$rc3B101 = 0;
		$queryx  = "select sum(fpoints) as lpoints from researchexp where fuserid = '$userid' and fappno = '$appno' and fpublication in ('1023','1079')";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3B101 = $resultx['lpoints']+0;

		$rc3B102 = 0;
		$queryx  = "select sum(fpoints) as lpoints from researchexp where fuserid = '$userid' and fappno = '$appno' and fpublication in ('1025','1080')";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3B102 = $resultx['lpoints']+0;

		$rc3B103 = 0;
		$queryx  = "select sum(fpoints) as lpoints from researchexp where fuserid = '$userid' and fappno = '$appno' and fpublication in ('1024','1081')";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3B103 = $resultx['lpoints']+0;

		$rc3B104 = 0;
		$queryx  = "select sum(fpoints) as lpoints from researchexp where fuserid = '$userid' and fappno = '$appno' and fpublication in ('1026','1082')";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3B104 = $resultx['lpoints']+0;

		$rc3B105 = 0;
		$queryx  = "select sum(fpoints) as lpoints from researchexp where fuserid = '$userid' and fappno = '$appno' and fpublication in ('1200','1204')";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3B105 = $resultx['lpoints']+0;

		//Sponsored Projects (III(C) (i))
		$rc3C101 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rcspon' and famount='1-3LAKH'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C101 = $resultx['lpoints']+0;

		$rc3C102 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rcspon' and famount='3-5LAKH'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C102 = $resultx['lpoints']+0;

		$rc3C103 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rcspon' and famount='>5LAKH'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C103 = $resultx['lpoints']+0;

		//Consultancy Projects (III(C)(ii)
		$rc3C201 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rccons' and famount='>=2LAKH'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C201 = $resultx['lpoints']+0;

		//Projects Outcome/Outputs (III(C)iii
		$rc3C301 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rcpout' 
					and ffaculty='Major Policy Document Prepared for International bodies like WHO / UNO / UNESCO / UNICEF ect. central / state / Govt. / Local Bodies'
					and flevel='International Bodies'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C301 = $resultx['lpoints']+0;

		$rc3C302 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rcpout' 
					and ffaculty='Major Policy Document Prepared for International bodies like WHO / UNO / UNESCO / UNICEF ect. central / state / Govt. / Local Bodies'
					and flevel='Central Government'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C302 = $resultx['lpoints']+0;

		$rc3C303 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rcpout' 
					and ffaculty='Major Policy Document Prepared for International bodies like WHO / UNO / UNESCO / UNICEF ect. central / state / Govt. / Local Bodies'
					and flevel='State Govt.'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C303 = $resultx['lpoints']+0;

		$rc3C304 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rcprojct where fuserid = '$userid' and fappno = '$appno' and fenttype='rcpout' 
					and ffaculty='Major Policy Document Prepared for International bodies like WHO / UNO / UNESCO / UNICEF ect. central / state / Govt. / Local Bodies'
					and flevel='Local Bodies'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3C304 = $resultx['lpoints']+0;

		// Research Guidance (III(D)) MPhil (III(D))(i)
		$rc3D101 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rechguid where fuserid = '$userid' and fappno = '$appno' and fenttype='rcgm'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3D101 = $resultx['lpoints']+0;
		
		// Research Guidance (III(D)) PhD (III(D))(ii)
		$rc3D201 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rechguid where fuserid = '$userid' and fappno = '$appno' and fenttype='rcgp'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3D201 = $resultx['lpoints']+0;

		//Fellowships/Awards (III(E)(i))
		$rc3E101 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rechguid where fuserid = '$userid' and fappno = '$appno' and fenttype='rcfs' and flevel='1201'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3E101 = $resultx['lpoints']+0;

		$rc3E102 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rechguid where fuserid = '$userid' and fappno = '$appno' and fenttype='rcfs' and flevel='1058'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3E102 = $resultx['lpoints']+0;

		$rc3E103 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rechguid where fuserid = '$userid' and fappno = '$appno' and fenttype='rcfs' and flevel='1059'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3E103 = $resultx['lpoints']+0;

		//Invited Lectures/ Papers  (III (E) (ii))
		$rc3E201 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rclecture where fuserid = '$userid' and fappno = '$appno' and fenttype='rcil' and flevel='1062'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3E201 = $resultx['lpoints']+0;

		$rc3E202 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rclecture where fuserid = '$userid' and fappno = '$appno' and fenttype='rcil' and flevel='1063'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3E202 = $resultx['lpoints']+0;

		$rc3E203 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rclecture where fuserid = '$userid' and fappno = '$appno' and fenttype='rcil' and flevel='1064'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3E203 = $resultx['lpoints']+0;

		$rc3F101 = 0;
		$queryx  = "select sum(fpoints) as lpoints from rclecture where fuserid = '$userid' and fappno = '$appno' and fenttype='rcde'";
		$resultx = $aobj_context->mobj_db->GetRow($queryx);
		$rc3F101 = $resultx['lpoints']+0;

		if($pg > 35) {$pg = 35;}
		$totap = $pg;
		$totap = number_format((float)$totap,2,'.','');		

		if($rc3A101 > 25) {$rc3A101 = 25;}		
		if($rc3A102 > 10) {$rc3A102 = 10;}		

		if($rc3B101 > 30) {$rc3B101 = 30;}		
		if($rc3B102 > 20) {$rc3B102 = 20;}		
		if($rc3B103 > 15) {$rc3B103 = 15;}		
		if($rc3B104 > 10) {$rc3B104 = 10;}		
		if($rc3B105 >  5) {$rc3B105 =  5;}		

		if($rc3C101 > 20) {$rc3C101 = 20;}		
		if($rc3C102 > 15) {$rc3C102 = 15;}		
		if($rc3C103 > 10) {$rc3C103 = 10;}		
		
		if($rc3C201 > 10) {$rc3C201 = 10;}		

		if($rc3C301 > 30) {$rc3C301 = 30;}				
		if($rc3C302 > 20) {$rc3C302 = 20;}		
		if($rc3C303 > 10) {$rc3C303 = 10;}		
		if($rc3C304 >  5) {$rc3C304 =  5;}		

		if($rc3D101 >  5) {$rc3D101 =  5;}		

		if($rc3D301 > 15) {$rc3D201 = 15;}		

		if($rc3E101 > 15) {$rc3E101 = 15;}				
		if($rc3E102 > 10) {$rc3E102 = 10;}				
		if($rc3E103 >  5) {$rc3E103 =  5;}				

		if($rc3E201 >  7) {$rc3E201 =  7;}				
		if($rc3E202 >  3) {$rc3E202 =  3;}				
		if($rc3E203 >  3) {$rc3E203 =  3;}				

		if($rc3F101 > 10) {$rc3F101 = 10;}				

		$totrc = 0;
		$totrc = $rc3A101 + $rc3A102 + $rc3B101 + $rc3B102 + $rc3B103 + $rc3B104 + $rc3B105 + 
				 $rc3C101 + $rc3C102 + $rc3C103 +
				 $rc3C201 +
				 $rc3C301 + $rc3C302 + $rc3C303 + $rc3C304 +
				 $rc3D101 +
				 $rc3D201 +
				 $rc3E101 + $rc3E102 +
				 $rc3E103 +
				 $rc3E201 + $rc3E202 + $rc3E203 +
				 $rc3F101;

		if($totrc > 308) {$totrc = 308;}

		$totrp = $totrc * 15 / 308;
		$totrp = number_format((float)$totrp,2,'.','');

		$total = $totap + $totrp;
		$total = number_format((float)$total,2,'.','');
		
		$table.= '<table class="table table-bordered" border-color:"black"; style="width:99%;" id="postdettable">';
		$table.='<tr>'; 								
		$table.='<td style="font-weight:bold;text-align:center;background-color:lightblue;font-size:120%;" colspan=3>SUMMARY OF POINTS</td>';
		$table.='</tr>';
		
		$table.='<tr>'; 								
		$table.='<td style="width:60%;font-weight: bold;text-align:center;">Criteria</td>';
		$table.='<td style="width:20%;font-weight: bold;text-align:center;">Maximum Points</td>';
		$table.='<td style="width:20%;font-weight: bold;text-align:center;">Points Obtained</td>';
		$table.='</tr>'; 								
		
		$table.='<tr>'; 								
		$table.="<td>A - Academic Qualifications</td>";		
		$table.="<td style='text-align:center;'>35</td>";
		$table.="<td style='text-align:center;'>{$totap}</td>"; 
		$table.="</tr>";
		
		$table.='<tr>'; 								
		$table.="<td>B - Research Performance</td>";		
		$table.="<td style='text-align:center;'>15</td>";
		$table.="<td style='text-align:center;'>$totrp</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Total (A+B)</td>";		
		$table.="<td style='text-align:center;'>50</td>";
		$table.="<td style='text-align:center;'>{$total}</td>"; 
		$table.="</tr>";		
		$table.="</table><br>";

		$table.= '<table class="table table-bordered" border-color:"black"; style="width:99%;" id="postdettable">';
		$table.='<tr>'; 								
		$table.='<td colspan=9 style="font-weight: bold;text-align:center;">Research Performance List</td>';
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.='<td style="width:60%;font-weight: bold;text-align:center;">Criteria</td>';
		$table.='<td style="width:20%;font-weight: bold;text-align:center;">Maximum Points</td>';
		$table.='<td style="width:20%;font-weight: bold;text-align:center;">Points Obtained</td>';
		$table.='</tr>'; 								

		$table.='<tr>'; 								
		$table.="<td>Research Papers Published (III(A)) - Refereed Journals as notified by the UGC</td>";		
		$table.="<td style='text-align:center;'>25</td>";
		$table.="<td style='text-align:center;'>{$rc3A101}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Research Papers Published (III(A)) - Other Reputed Journals as notified by the UGC</td>";		
		$table.="<td style='text-align:center;'>10</td>";
		$table.="<td style='text-align:center;'>{$rc3A102}</td>"; 
		$table.="</tr>";
		
		$table.='<tr>'; 								
		$table.="<td>Publications Other than Research articles  (III(B)) - Text/Reference Books published by International Publishers with ISBN/ISSN number as approved by the University and posted on its Website.</td>";		
		$table.="<td style='text-align:center;'>30</td>";
		$table.="<td style='text-align:center;'>{$rc3B101}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Publications Other than Research articles  (III(B)) - Subject Books published by National level publishers with ISBN/ISSN number or State/Central Govt. Publications as approved by the University and posted on its Website.</td>";		
		$table.="<td style='text-align:center;'>20</td>";
		$table.="<td style='text-align:center;'>{$rc3B102}</td>"; 
		$table.="</tr>";
		
		$table.='<tr>'; 								
		$table.="<td>Publications Other than Research articles  (III(B)) - Subject books published by local level publishers with ISBN/ISSN number or State/Central Govt. Publications as approved by the University and posted on its Website.</td>";		
		$table.="<td style='text-align:center;'>15</td>";
		$table.="<td style='text-align:center;'>{$rc3B103}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Publications Other than Research articles  (III(B)) - Chapters in Books published by National and International level publishers with ISBN/ISSN Number as approved by the University and posted on its Website. (International)</td>";		
		$table.="<td style='text-align:center;'>10</td>";
		$table.="<td style='text-align:center;'>{$rc3B104}</td>"; 
		$table.="</tr>";
		
		$table.='<tr>'; 								
		$table.="<td style='font-family:italic;'>Publications Other than Research articles  (III(B)) - Chapters in Books published by National and International level publishers with ISBN/ISSN Number as approved by the University and posted on its Website. (National)</td>";		
		$table.="<td style='text-align:center;'>5</td>";
		$table.="<td style='text-align:center;'>{$rc3B105}</td>"; 
		$table.="</tr>";


		$table.='<tr>'; 								
		$table.="<td>Sponsored Projects (III(C) (i) - Major Projects with grants above Rs. 5 lakhs</td>";		
		$table.="<td style='text-align:center;'>20</td>";
		$table.="<td style='text-align:center;'>{$rc3C101}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Sponsored Projects (III(C) (i) - Major Projects with grants above Rs. 3 lakhs up to Rs. 5 lakhs</td>";		
		$table.="<td style='text-align:center;'>15</td>";
		$table.="<td style='text-align:center;'>{$rc3C102}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Sponsored Projects (III(C) (i) - Minor Projects with grants above Rs. 1 lakh up to Rs. 3 lakhs</td>";		
		$table.="<td style='text-align:center;'>10</td>";
		$table.="<td style='text-align:center;'>{$rc3C103}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Consultancy Projects (III(C)(ii) - Amount mobilized with a minimum of Rs. 2 lakhs</td>";		
		$table.="<td style='text-align:center;'>10</td>";
		$table.="<td style='text-align:center;'>{$rc3C201}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Projects Outcome / Outputs (III(C)i - Major Policy document prepared for international bodies like WHO/UNO/UNESCO/UNICEF etc.(International Bodies) </td>";		
		$table.="<td style='text-align:center;'>30</td>";
		$table.="<td style='text-align:center;'>{$rc3C301}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Projects Outcome / Outputs (III(C)i - Major Policy document prepared for international bodies like WHO/UNO/UNESCO/UNICEF etc.(Central Govt.) </td>";		
		$table.="<td style='text-align:center;'>20</td>";
		$table.="<td style='text-align:center;'>{$rc3C302}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Projects Outcome / Outputs (III(C)i - Major Policy document prepared for international bodies like WHO/UNO/UNESCO/UNICEF etc.(State Govt.) </td>";		
		$table.="<td style='text-align:center;'>10</td>";
		$table.="<td style='text-align:center;'>{$rc3C303}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Projects Outcome / Outputs (III(C)i - Major Policy document prepared for international bodies like WHO/UNO/UNESCO/UNICEF etc.(Local Bodies) </td>";		
		$table.="<td style='text-align:center;'>5</td>";
		$table.="<td style='text-align:center;'>{$rc3C304}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Research Guidance - MPhil (III(D))(i)</td>";		
		$table.="<td style='text-align:center;'>5</td>";
		$table.="<td style='text-align:center;'>{$rc3D101}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Research Guidance - PhD (III(D))(ii)</td>";		
		$table.="<td style='text-align:center;'>15</td>";
		$table.="<td style='text-align:center;'>{$rc3D201}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Fellowships / Awards (III(E)(i)) - International Award/Fellowship from academic bodies/association</td>";		
		$table.="<td style='text-align:center;'>15</td>";
		$table.="<td style='text-align:center;'>{$rc3E101}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Fellowships / Awards (III(E)(i)) - National Award/Fellowship from academic bodies/association</td>";		
		$table.="<td style='text-align:center;'>10</td>";
		$table.="<td style='text-align:center;'>{$rc3E102}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Fellowships / Awards (III(E)(i)) - State/University level award from academic bodies/association</td>";		
		$table.="<td style='text-align:center;'>5</td>";
		$table.="<td style='text-align:center;'>{$rc3E103}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Invited Lectures/ Papers  (III(E)(ii)) - International Level</td>";		
		$table.="<td style='text-align:center;'>7</td>";
		$table.="<td style='text-align:center;'>{$rc3E201}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Invited Lectures/ Papers  (III(E)(ii)) - National Level</td>";		
		$table.="<td style='text-align:center;'>3</td>";
		$table.="<td style='text-align:center;'>{$rc3E202}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Invited Lectures/ Papers  (III(E)(ii)) - State/University Level</td>";		
		$table.="<td style='text-align:center;'>3</td>";
		$table.="<td style='text-align:center;'>{$rc3E203}</td>"; 
		$table.="</tr>";


		$table.='<tr>'; 								
		$table.="<td>Development of E-Learning delivery process/Material (III(F))</td>";		
		$table.="<td style='text-align:center;'>10</td>";	
		$table.="<td style='text-align:center;'>{$rc3F101}</td>"; 
		$table.="</tr>";

		$table.='<tr>'; 								
		$table.="<td>Research Performance Total</td>";		
		$table.="<td style='text-align:center;'>308</td>";	
		$table.="<td style='text-align:center;'>{$totrc}</td>"; 
		$table.="</tr>";

		$table.="</table><br>";

	}
	else if($postname == 'ASSOCIATE PROFESSOR' || $postname == 'PROFESSOR')
	{
		
		
		if($postname == 'PROFESSOR')
			$rcmax = '400';
		else
			$rcmax = '300';

		$academic = $pg+$phd+$fexppoints;
		//$academic = $ug+$phd+$jre+$net+$slet;
		//$academicper = $academic*0.2;
		if($academicper > 10)
			$academicper = 10;
		
		
		
		if($cat2 >45)
			$cat2 = 45;
		
		$percent = $rchpoints*0.4;
		
		$rc = $rchpoints+$lecture+$projct+$guid; 	
		
		$total = $academicper+$rc+$cat2;
		
		$table = '<table class="table table-bordered" border-color:"black"; style="width:99%;" id="postdettable">';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight:bold;text-align:center;background-color:lightblue;font-family:italic;font-size:120%;" colspan=3>SUMMARY OF POINTS</td>';
		$table.='</tr>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;">Criteria</td>';
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;">Maximum Points</td>';
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;">Points Obtained</td>';
		$table.='</tr>'; 								
		$table.='<tr>';
		$table.="<td style='width:10%;font-family:italic;'>Academic Background and Teaching Experience</td>";		
		$table.="<td style='width:10%;font-weight: bold;'>20</td>";
		$table.="<td style='width:10%'>{$academic}</td>"; 
		$table.="</tr>";
		$table.='<tr>';
		$table.="<td style='width:10%;font-family:italic;'>Category II</td>";		
		$table.="<td style='width:10%;font-weight: bold;'>45</td>";
		$table.="<td style='width:10%'>{$cat2}</td>"; 
		$table.="</tr>";
		
		$table.='<tr>';
		$table.="<td style='width:10%;font-family:italic;'>Category III ( A+B+Ci+Cii+Ciii+Di+Dii+Ei+Eii+F) Minimum {$rcmax}</td>";		
		$table.="<td style='width:10%;font-weight: bold;'>{$rcmax}</td>";
		$table.="<td style='width:10%'>{$rc}</td>"; 
		$table.="</tr>";
		/* $table.='<tr>'; 								
		$table.="<td style='width:10%;font-family:italic;'>Research Publications</td>";		
		$table.='<td style="width:10%;font-weight: bold;">33</td>';
		$table.="<td style='width:10%'>{$rchpoints}</td>"; 
		$table.="</tr>"; 
		
		$table.='<tr>'; 								
		$table.="<td style='width:10%;font-family:italic;'>Total</td>";		
		$table.='<td style="width:10%;font-weight: bold;">392</td>';
		$table.="<td style='width:10%'>{$total}</td>"; 
		$table.="</tr>";*/
		//$percent = $total*0.5;
		//$table.='<tr style = "font-weight: bold;">'; 
		//$table.="<td style='width:10%;text-align:right;' colspan=2 >Research performance based on API score and quality of publications(40%)</td>";		
		//$table.="<td style='width:10%;font-weight: bold;'>{$percent}</td>";
		//$table.="</tr>";
		$table.="</table><br>";
		
	}	
	$lan = $results['lang'];
	$lang = explode(',',$lan);
	$div3.= "<span>Language</span>";
	$div3.= "<span>Write</span>";
	$div3.= "<span>Read</span>";
	$div3.= "<span>Spoken</span>";
	foreach($lang as $value)
	{
		$lang = explode('->',$value);
		$div4.="<span>{$lang[0]}, </span>";
		$div1.="<span>{$lang[1]}, </span>";
		$div2.="<span>{$lang[2]}, </span>";
		$div5.="<span>{$lang[3]}, </span>";
	}
	if($results)
	{
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan=6 style="text-align:center;font-weight:bold;background-color:lightblue;font-family:italic;font-size:110%;">Personal Details</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;">Name</td>';
		$table.="<td style='width:10%' colspan=9>{$results['fname']}</td>";		
		$table.='</tr>'; 								

		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;"> Father`s Name</td>';
		$table.="<td style='width:10%' colspan=9>{$results['ffatname']}</td>"; 
		$table.='</tr>'; 								
		
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;"> Mother`s Name </td>';
		$table.="<td style='width:10%' colspan=9>{$results['fmotname']}</td></tr>";
		$table.='</tr>'; 								

		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;;font-family:italic;">Date of Birth</td>';
		$table.="<td style='width:10%'>{$results['fdob']}</td>"; 
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;">Age</td>';
		$table.="<td style='width:10%'>{$results['fage']}</td>";
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;">Place of Birth</td>';
		$table.="<td style='width:10%'>{$results['fbirthplace']}</td>";	
		$table.='</tr>'; 								

		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;">Religion</td>';
		$table.="<td style='width:10%'>{$results['freligion']}</td>";		
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;"> Nationality</td>';
		$table.="<td style='width:10%'>{$results['fnational']}</td>"; 
		$table.='<td style="width:10%;font-weight: bold;font-family:italic;"> Gender</td>';
		$table.="<td style='width:10%'>{$results['fgender']}</td></tr>";		

		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;">Category</td>';
		$table.="<td style='width:10%'>{$results['fcatcode']}</td>";		
		$table.='<td style="width:10%;font-weight: bold;"> Marital Status </td>';
		$table.="<td style='width:10%'>{$results['fmarstatus']}</td>"; 
		$table.='<td style="width:10%;font-weight: bold;">Aadhar No.</td>';
		$table.="<td style='width:10%'>{$results['faadhar']}</td></tr>";
		
		$comadd = $results['fcomadd1'].' '.$results['fcomadd2'].''.$results['fcomadd3'].''.$results['fcomadd4'].' '.$results['fcomcity'].' - '.$results['fcompincode'];
		$peradd = $results['fperadd1'].' '.$results['fperadd2'].''.$results['fperadd3'].''.$results['fperadd4'].' '.$results['fpercity'].' - '.$results['fperpincode'];
		
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;">Address for Correspondence</td>';
		$table.="<td style='width:10%' colspan=2>{$comadd}</td>";		
		$table.='<td style="width:10%;font-weight: bold;">Address for Correspondence</td>';
		$table.="<td style='width:10%' colspan=2>{$peradd}</td>";				
		$table.="</tr>";

		$table.="<tr>";
		$table.='<td style="width:10%;font-weight: bold;">Email</td>';
		$table.="<td style='width:10%'>{$results['femailid']}</td>";		
		$table.='<td style="width:10%;font-weight: bold;">Phone No. </td>';
		$table.="<td style='width:10%'>{$results['fphone']}</td>";
		$table.='<td style="width:10%;font-weight: bold;">Mobile No.</td>';
		$table.="<td style='width:10%'>{$results['fmobile']}</td>";								
		$table.="</tr>";

		$table.="<tr>";
		$table.='<td style="width:10%;font-weight: bold;" >Languages Known</td>';
		$table.="<td style='width:10%' colspan=9><div><b>{$div4}</b></div> </td>";
		$table.="</tr>";

		if($results['fph']=='T')
		{
			$phvalue="Yes, Type: ".$results['fphtype'].", Percentage: ".$results['fphper'] ;
		}
		else
		{
			$phvalue="No";
		}
		$table.="<tr>";
		$table.='<td style="width:10%;font-weight: bold;">Physically disabled?</td>';
		$table.="<td style='width:10%' colspan=9>{$phvalue}</td>";								
		$table.="</tr>";

		if($results['f371j']==TRUE)
		{
			$hkvalue="Yes";
		}
		else
		{
			$hkvalue="No";
		}
		$table.='<tr>'; 										
		$table.='<td style="width:10%;font-weight: bold;"> Do you come under 371(j)?</td>';
		$table.="<td style='width:10%' colspan=9>{$hkvalue}</td>";		
		$table.="</tr>";

		if($results['fexservice']==TRUE)
		{
			$exvalue="Yes";
		}
		else
		{
			$exvalue="No";
		}
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;">Ex-Servicemen?</td>';
		$table.="<td style='width:10%' colspan=9>{$exvalue}</td>";		
		$table.="</tr>";

		if($results['fkanmedium']==TRUE)
		{
			$kmvalue="Yes";
		}
		else
		{
			$kmvalue="No";
		}
		$table.='<tr>'; 										
		$table.='<td style="width:10%;font-weight: bold;">Kannada Medium?</td>';
		$table.="<td style='width:10%' colspan=9>{$kmvalue}</td>";		
		$table.="</tr>";

		if($results['frural']==TRUE)
		{
			$rrvalue="Yes";
		}
		else
		{
			$rrvalue="No";
		}
		$table.='<tr>'; 										
		$table.='<td style="width:10%;font-weight: bold;"> Rural Candidate? </td>';
		$table.="<td style='width:10%' colspan=9>{$rrvalue}</td>";
		$table.="</tr>";
		$table.="</tbody></table><br>";			
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan=8 style="text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">Educational details</th>';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: bold;">Degree</td>';
		$table.="<td style='width:10%'>Name of the Board / University</td>";		
		$table.='<td style="width:10%;font-weight: ;">Year</td>';
		$table.="<td style='width:10%'>Max. Marks</td>"; 
		$table.='<td style="width:10%;font-weight: ;">Sec. Marks</td>';
		$table.="<td style='width:10%'>Percentage / CGPA</td>";
		$table.='<td style="width:10%;font-weight: ;">Division</td>';
		$table.='<td style="width:10%;font-weight: ;">Subject studied</td>';
		$table.='</tr>';
		
		
		
		$query2 = "select distinct * from qualdetl where fuserid = '{$userid}' and fappno = '{$appno}' and ifnull(funivname,'') <> ''  order by fenttype";
		$results2  = $aobj_context->mobj_db->GetAll($query2);
		
		foreach($results2 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%;font-weight: bold;'>{$value['fdegree']}</td>";
			$table.="<td style='width:10%'>{$value['funivname']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['fyear']}</td>";
			$table.="<td style='width:10%'>{$value['fmaxmarks']}</td>"; //
			$table.="<td style='width:10%;font-weight: ;'>{$value['fsecmarks']}</td>";
			$table.="<td style='width:10%'>{$value['fpercentage']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fdivision']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fsubjects']}</td>";
			$table.='</tr>';
		}
		$table.='</table><br>';
		
		$query2 = "select * from phddetl where fuserid = '{$userid}' and fappno = '{$appno}' order by fenttype";
		$results3  = $aobj_context->mobj_db->GetAll($query2);
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<tr>';
		$table.="<td style='width:10%;font-weight: bold;'>Degree</td>";
		$table.="<td style='width:10%;font-weight: bold;'>Date of Registration / Admission</td>";
		$table.="<td style='width:10%;font-weight: bold;'>Date of Submission</td>";
		$table.="<td style='width:10%;font-weight: bold;'>Date of Award</td>";
		$table.="<td style='width:10%;font-weight: bold;'>University / Institute</td>";
		$table.="<td style='width:10%;font-weight: bold;'>Thesis / DissertationTitle</td>";
		$table.="<td style='width:10%;font-weight: bold;'>Overall % / GP(Out of 10)</td>";
		$table.='</tr>';
		
		foreach($results3 as $value)
		{
			$table.='<tr>';
			$table.="<td style='width:10%;font-weight: bold;'>{$value['fdegree']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fdor']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fdos']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fdoa']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['funivname']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['ftitle']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpercent']}</td>";
			$table.='</tr>';
		}
		$table.="</table>";
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<tr>';
		$table.="<td style='width:10%;font-weight: bold;'>Details of JRF /NET / SLET</td>";
		$table.="<td style='width:10%;font-weight: bold;'>NET Subject</td>";
		$table.="<td style='width:10%;font-weight: bold;'>Certificate No. / Roll No.</td>";
		$table.="<td style='width:10%;font-weight: bold;'>Year of Passing</td>";
		$table.='</tr>';
		$table.='<tr>';
		$table.="<td style='width:10%;font-weight: bold;'>NET - JRF</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fjrfsub']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fjrfcertno']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fjrfpassmth']}</td>";
		$table.='</tr>';
		$table.='<tr>';
		$table.="<td style='width:10%;font-weight: bold;'>NET</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fnetsub']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fnetcertno']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fnetpassmth']}</td>";
		$table.='</tr>';
		$table.='<tr>';
		$table.="<td style='width:10%;font-weight: bold;'>SLET</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fsletsub']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fsletcertno']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['fsletpassmth']}</td>";
		$table.='</tr>';
		$table.='<tr>';
		$table.="<td style='width:10%;font-weight: bold;'>PDF</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['FPDFSUB']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['FPDFCERTNO']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results['FPDFPASSMTH']}</td>";
		$table.='</tr>';
		$table.="</table><br>";
		
		$query4 = "select * from expdetl where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'teach' order by fenttype";
		$results4  = $aobj_context->mobj_db->GetAll($query4);
		
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 9 style = "text-align:center;background-color:lightblue;font-family:italic;font-size=110%;">3.1 Full-time Teaching Experience</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Name of University / College / Institute / Organization</td>';
		$table.="<td style='width:10%'>Designation</td>";		
		$table.='<td style="width:10%;font-weight: ;">Status</td>';
		$table.="<td style='width:10%'>Pay Scale / Consolidated salary</td>"; 
		$table.='<td style="width:10%;font-weight: ;">From</td>';
		$table.="<td style='width:10%'>To</td>";
		$table.='<td style="width:10%;font-weight: ;">Effective Time Period (Excluding 2 years of Residency Period)</td>';
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['funivname']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['fdegncode']}</td>";
			$table.="<td style='width:10%'>{$value['fstatus']}</td>"; 
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpayscale']}</td>";
			$table.="<td style='width:10%'>{$value['ffromdate']}</td>";
			$table.="<td style='width:10%'>{$value['ftodate']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fexp']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
			$yeararry = explode('.',$value['fexp']);
			$fexpyear+=$yeararry[0];
			$fexpyear1+=$yeararry[1];
		}
		$year = $fexpyear1/12;
		$year = explode('.',$year); 
		$fexpyear = $fexpyear+$year[0];
		$moth = $fexpyear1%12;
		$fexp =  $fexpyear.'.'.$moth;
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 6>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$fexp}</td>";
		$table.='</table><br>';
		$query4 = "select * from expdetl where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'phd' order by fenttype";
		$results4  = $aobj_context->mobj_db->GetAll($query4);
		
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 8 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">3.2 Full-time Post-Ph.D. Research Experience</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">University / Institute / Industry</td>';
		$table.="<td style='width:10%'>Designation</td>";		
		$table.='<td style="width:10%;font-weight: ;">Pay scale / consolidated salary</td>';
		$table.='<td style="width:10%;font-weight: ;">From</td>';
		$table.="<td style='width:10%'>To</td>";
		$table.='<td style="width:10%;font-weight: ;">Time Period</td>';
		//$table.='<td style="width:10%;font-weight: ;">Points</td>';
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['funivname']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['fdegncode']}</td>"; 
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpayscale']}</td>";
			$table.="<td style='width:10%'>{$value['ffromdate']}</td>";
			$table.="<td style='width:10%'>{$value['ftodate']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fexp']}</td>";
			//$table.="<td style='width:10%;font-weight: ;'>{$value[fpoints]}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
			$fexp+=$value['fexp'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 5>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$fexp}</td>";
		//$table.="<td style='width:10%'>{$sumexpfpoints}</td><tr>";
		$table.='</table><br>';
		
		$query4 = "select * from expdetl where fuserid = '{$userid}' and fappno='{$appno}' and fenttype='present' order by fenttype";
		$results4  = $aobj_context->mobj_db->GetAll($query4);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan=8 style="text-align:center background-color:lightblue;font-family:italic;font-size:110%;">3.3 Present Employment Details</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Organization Name</td>';
		$table.="<td style='width:10%'>Position Held</td>";		
		$table.='<td style="width:10%;font-weight: ;">Date of Appointment</td>';
		$table.='<td style="width:10%;font-weight: ;">Present Status</td>';
		$table.='</tr>';
		
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['funivname']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['fdegncode']}</td>"; 
			$table.="<td style='width:10%'>{$value['ffromdate']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fstatus']}</td>";
			$table.='</tr>';
		}
		$table.='</table><br>';
		
		
		
		$query4 = "select fenttype,fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
				fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno,fautaddrs
				from researchexp 
				left join reason r1 on researchexp.fpublication = r1.freasoncode
				left join reason r2 on researchexp.fauthor = r2.freasoncode
				where fuserid = '{$userid}' and fappno = '{$appno}' order by fenttype desc";
		$results4  = $aobj_context->mobj_db->getAll($query4);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan=12 style="text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (A-1) Research Papers Published (Listed in UGC website)</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Publication Type</td>';
		$table.="<td style='width:10%'>Title of the Paper</td>";		
		$table.='<td style="width:10%;font-weight: ;">Journal Name</td>';
		$table.='<td style="width:10%;font-weight: ;">Year</td>';
		$table.="<td style='width:10%'>Vol. No.</td>";
		$table.='<td style="width:10%;font-weight: ;">Page No.</td>';
		$table.='<td style="width:10%;font-weight: ;">ISSN / ISBN No.</td>';
		$table.='<td style="width:10%;font-weight: ;">Journal No. Given By UGC</td>'; 
		$table.='<td style="width:10%;font-weight: ;">Author</td>';
		$table.='<td style="width:10%;font-weight: ;">Impact Factors</td>';
		$table.='<td style="width:10%;font-weight: ;">Points</td>'; 
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$first = true;
		$second = true;
		$otjpoints = '';
		$phdpoints = '';
		foreach($results4 as $value)
		{
			if($value['fenttype'] == 'rcphd')
			{
				$table.='<tr>'; 								
				$table.="<td style='width:10%'>{$value['fpublicationname']}</td>";		
				$table.="<td style='width:10%;font-weight: ;'>{$value['ftitle']}</td>"; 
				$table.="<td style='width:10%;font-weight: ;'>{$value['fjournalname']}</td>";
				$table.="<td style='width:10%'>{$value['fyear']}</td>";
				$table.="<td style='width:10%'>{$value['fvolno']}</td>";
				$table.="<td style='width:10%'>{$value['fpageno']}</td>"; 
				$table.="<td style='width:10%;font-weight: ;'>{$value['fissnno']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['fjournalno']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['ffauthorname']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['fimpfact']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
				$table.='</tr>';
				$phdpoints+=$value['fpoints'];
			}
			else if($value['fenttype'] == 'rcoth')
			{
				if($first)
				{
					$table.="<tr style = 'font-weight: bold;'><td style='width:10%;text-align:right;' colspan = 8>Total</td><td style='width:10%;font-weight: ;'>{$otjpoints}</td></tr><table class='table table-bordered' style='width:99%;' id='postdettable'>";
					$table.='<thead>';
					$table.='<th colspan=10 style="text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (A-2) Research Papers Published (Not Listed in UGC website)</th> ';	
					$table.='</thead>';
					$table.='<tbody>';
					$table.='<tr>'; 								
					$table.='<td style="width:10%;font-weight: ;">Publication Type</td>';
					$table.="<td style='width:10%'>Title of the Paper</td>";		
					$table.='<td style="width:10%;font-weight: ;">Journal Name</td>';
					$table.='<td style="width:10%;font-weight: ;">Year</td>';
					$table.="<td style='width:10%'>Vol. No.</td>";
					$table.='<td style="width:10%;font-weight: ;">Page No.</td>';
					$table.='<td style="width:10%;font-weight: ;">ISSN / ISBN No.</td>';
					$table.='<td style="width:10%;font-weight: ;">Author</td>';
					$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
					$table.='</tr>';
					$first = false;
				}
				$table.='<tr>'; 								
				$table.="<td style='width:10%'>{$value['fpublicationname']}</td>";		
				$table.="<td style='width:10%;font-weight: ;'>{$value['ftitle']}</td>"; 
				$table.="<td style='width:10%;font-weight: ;'>{$value['fjournalname']}</td>";
				$table.="<td style='width:10%'>{$value['fyear']}</td>";
				$table.="<td style='width:10%'>{$value['fvolno']}</td>";
				$table.="<td style='width:10%'>{$value['fpageno']}</td>"; 
				$table.="<td style='width:10%;font-weight: ;'>{$value['fissnno']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['ffauthorname']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
				$table.='</tr>';
								
				
			}else if($value['fenttype'] == 'rcotj')
			{
				if($second)
				{
					$table.="<tr style = 'font-weight: bold;'><td style='width:10%;text-align:right;' colspan = 10>Total</td><td style='width:10%;font-weight: ;'>{$phdpoints}</td></tr><table class='table table-bordered' style='width:99%;' id='postdettable'>";
					$table.='<thead>';
					$table.='<th colspan = 10 style = "text-align:center;background-color:lightblue;font-family:italic;font-size110%;">III (B) Publications Other than journal articles (books, chapters in books)</th> ';	
					$table.='</thead>';
					$table.='<tbody>';
					$table.='<tr>'; 								
					$table.='<td style="width:10%;font-weight: ;">Publication Type</td>';
					$table.="<td style='width:10%'>Title of the Book</td>";		
					$table.='<td style="width:10%;font-weight: ;">Title of the Paper</td>';
					$table.='<td style="width:10%;font-weight: ;">Year</td>';
					$table.="<td style='width:10%'>Page No.</td>";
					$table.='<td style="width:10%;font-weight: ;">ISSN/ ISBN No.</td>';
					$table.='<td style="width:10%;font-weight: ;">Publisher Details & Address</td>';
					$table.='<td style="width:10%;font-weight: ;">Author</td>';
					$table.='<td style="width:10%;font-weight: ;">Points</td>';
					$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
					$table.='</tr>';
					$second = false;
				}
				$table.='<tr>'; 								
				$table.="<td style='width:10%'>{$value['fpublicationname']}</td>";		
				$table.="<td style='width:10%;font-weight: ;'>{$value['ftitle']}</td>"; 
				$table.="<td style='width:10%;font-weight: ;'>{$value['fjournalname']}</td>";
				$table.="<td style='width:10%'>{$value['fyear']}</td>";
				$table.="<td style='width:10%'>{$value['fpageno']}</td>";
				$table.="<td style='width:10%'>{$value['fissnno']}</td>"; 
				$table.="<td style='width:10%;font-weight: ;'>{$value['fautaddrs']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['ffauthorname']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
				$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
				$table.='</tr>';
				$otjpoints+=$value['fpoints'];
			}
			
		}
		
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 8>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$otjpoints}</td>";
		$table.='</table><br>';
		
		if($postname == 'ASSOCIATE PROFESSOR' || $postname == 'PROFESSOR' || $postname == 'ASSISTANT PROFESSOR')
		{	
		/*$query1 = "SELECT * FROM tleact 
			where fuserid = '{$userid}' and fappno = '{$appno}' order by fenttype,factivity";
		$result = $aobj_context->mobj_db->GetAll($query1);
		$cat11 ="a. Direct Teaching (Actual Hours Spent ÷ 7.75)*";
		$cat12 ="b. Contribution to corporate life and management of the department and institution through participation in academic and administrative committees and responsibilities.<br>
		<li>Administrative responsibility (including as Dean/ Principal /Chairperson/Convener/Teacher-in-charge/similar other duties that require regular office hrs for its discharge).</li>
		<li>Participation in Board of Studies, Academic and Administrative Committees</li>";
		$cat13 ="c. Professional Development activities (such as participation in seminars, conferences, short term training courses, industrial experience, talks, lectures in refresher / faculty development courses, dissemination and general articles and any other contribution)";
		
		
		$cat21 ="a. Student related co-curricular, extension and field based activities.<br>
	<li>Discipline related co-curricular activities (e.g. remedial classes, career counselling, study visit, student seminar and other events).<li>
	<li>Other co-curricular activities (Cultural, Sports, NSS, NCC etc).<br></li>
	<li>Extension and dissemination activities (public /popular lectures/talks/seminars etc.)</li>";
		$cat22 ="b.Examination duties (question paper setting, Invigilation, evaluation of answer scripts) as per allotment(Actual Hours Spent ÷ 10)";
		$cat23 ="c.Innovative Teaching - learning methodologies, updating of subject contents/courses, mentoring etc.(Actual Hours Spent ÷ 10)";
		
		
		$table.='<table class="table table-bordered" style="width:90%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 7 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">CATEGORY I - TEACHING, LEARNING AND EVALUATION RELATED ACTIVITIES</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>';
		$table.='<td>Nature of Activity</td>';	
		$table.='<td>Max. Score</td>';
		$table.='<td></td>';		
		$table.='<td>Self Score</td>';
		$table.='</tr>';
		$first=true;
		$sumcat1 = '';
		$sumcat2 = '';
		foreach($result as $value)
		{
			if($value['fenttype'] == 'cat1')
			{	
				if($value['factivity'] == 'a')
				{
					$table.='<tr>';
					$table.="<td style='width:40%;font-weight: ;'>{$cat11}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fmaxscore']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fspent']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fselfscore']}</td>";
					$table.='</tr>';
					$sumcat1+=$value['fselfscore'];
				}
				if($value['factivity'] == 'b')
				{
					$table.='<tr>';
					$table.="<td style='width:40%;font-weight: ;'>{$cat12}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fmaxscore']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fspent']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fselfscore']}</td>";
					$table.='</tr>';
					$sumcat1+=$value['fselfscore'];
				}
				if($value['factivity'] == 'c')
				{
					$table.='<tr>';
					$table.="<td style='width:40%;font-weight: ;'>{$cat13}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fmaxscore']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fspent']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fselfscore']}</td>";
					$table.='</tr>';
					$sumcat1+=$value['fselfscore'];
					$table.='<tr>';
					$table.="<td style='width:40%;' ></td>";
					$table.="<td style='width:10%;' ></td>";
					$table.="<td style='width:10%;font-weight:bold;' >Total</td>"; 
					$table.="<td style='width:10%;font-weight:bold;float:' >{$sumcat1}</td>";
					$table.='</tr>';
				}
					
			}
			if($value['fenttype'] == 'cat2')
			{
				if($first)
				{
					$table.='</table><br><table class="table table-bordered" style="width:90%;" id="postdettable">';
					$table.='<thead>';
					$table.='<th colspan = 7 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">CATEGORY II - PROFESSIONAL DEVELOPMENT,CO-CURRICULAR AND EXTENSION ACTIVITIES</th> ';	
					$table.='</thead>';
					$table.='<tbody>';
					$table.='<tr>';
					$table.='<td>Nature of Activity</td>';	
					$table.='<td>Max. Score</td>';
					$table.='<td>Actual Hours Spent ÷ 10</td>';		
					$table.='<td>Self Score</td>';
					$table.='</tr>';
					
					$first=false;
				}	
				if($value['factivity'] == 'a')
				{
					$table.='<tr>';
					$table.="<td style='width:50%;font-weight: ;'>{$cat21}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fmaxscore']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fspent']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fselfscore']}</td>";
					$table.='</tr>';
					$sumcat2+=$value['fselfscore'];
				}
				if($value['factivity'] == 'b')
				{
					$table.='<tr>';
					$table.="<td style='width:50%;font-weight: ;'>{$cat22}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fmaxscore']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fspent']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fselfscore']}</td>";
					$table.='</tr>';
					$sumcat2+=$value['fselfscore'];
				}
				if($value['factivity'] == 'c')
				{
					$table.='<tr>';
					$table.="<td style='width:50%;font-weight: ;'>{$cat23}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fmaxscore']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fspent']}</td>";
					$table.="<td style='width:10%;font-weight: ;'>{$value['fselfscore']}</td>";
					$table.='</tr>';
					$sumcat2+=$value['fselfscore'];
					$table.='<tr>';
					$table.="<td style='width:40%;' ></td>";
					$table.="<td style='width:10%;' ></td>";
					$table.="<td style='width:10%;font-weight:bold;' >Total</td>"; 
					$table.="<td style='width:10%;font-weight:bold;float:' >{$sumcat2}</td>";
					$table.='</tr>';
				}
				
			}	
		}
		
		$table.='</table><br>';*/
		
		
		$query4 = "	select fslno,ffaculty,r1.freasonname as ffacultyname, ftitle,fagency,fperiod,famount,fpoints,fenclosureno,fenttype
					from rcprojct 
					left join reason r1 on rcprojct.ffaculty = r1.freasoncode
					where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcspon'";
		$results4  = $aobj_context->mobj_db->GetAll($query4);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 7 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (C) i. Sponsered projects</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Faculty</td>';
		$table.="<td style='width:10%'>Title of the Project</td>";		
		$table.='<td style="width:10%;font-weight: ;">Funding Agency / Agency</td>';
		$table.='<td style="width:10%;font-weight: ;">Period</td>';
		$table.="<td style='width:10%'>Amount</td>";
		$table.='<td style="width:10%;font-weight: ;">Points</td>';
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['ffacultyname']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['ftitle']}</td>"; 
			$table.="<td style='width:10%;font-weight: ;'>{$value['fagency']}</td>";
			$table.="<td style='width:10%'>{$value['fperiod']}</td>";
			$table.="<td style='width:10%'>{$value['famount']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 5>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		$query4 = "select fslno,ffaculty,r1.freasonname as ffacultyname, ftitle,fagency,fperiod,famount,fpoints,fenclosureno,fenttype
		from rcprojct 
		left join reason r1 on rcprojct.ffaculty = r1.freasoncode
		where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rccons'";
		$results4  = $aobj_context->mobj_db->GetAll($query4);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 7 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (C) ii. Consultancy projects</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Faculty</td>';
		$table.="<td style='width:10%'>Title of the Project</td>";		
		$table.='<td style="width:10%;font-weight: ;">Funding Agency / Agency</td>';
		$table.='<td style="width:10%;font-weight: ;">Period</td>';
		$table.="<td style='width:10%'>Amount</td>";
		$table.='<td style="width:10%;font-weight: ;">Points</td>';
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['ffacultyname']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['ftitle']}</td>"; 
			$table.="<td style='width:10%;font-weight: ;'>{$value['fagency']}</td>";
			$table.="<td style='width:10%'>{$value['fperiod']}</td>";
			$table.="<td style='width:10%'>{$value['famount']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 5>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		
		$query4 = "select fslno,ffaculty,r1.freasonname as flevelname, flevel,ftitle,fagency,fperiod,famount,fpoints,fenclosureno,fenttype
				from rcprojct 
				left join reason r1 on rcprojct.flevel = r1.freasoncode
				where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcpout'";
		$results4  = $aobj_context->mobj_db->GetAll($query4);
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 6 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (C) iii. Projects Outcome / Outputs</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Policy Document</td>';
		$table.="<td style='width:10%'>Title of the Outcomes</td>";		
		$table.='<td style="width:10%;font-weight: ;">Funding Agency / Agency</td>';
		$table.='<td style="width:10%;font-weight: ;">Level</td>';
		$table.="<td style='width:10%'>Points</td>";
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['ffacultyname']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['ftitle']}</td>"; 
			$table.="<td style='width:10%;font-weight: ;'>{$value['fagency']}</td>";
			$table.="<td style='width:10%'>{$value['flevelname']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 4>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		$query = "select fslno,fuserid,fappno,fnostud,fpoints,fenclosureno,fenttype
				from rechguid 
				where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcgm'";
		$results4  = $aobj_context->mobj_db->getAll($query);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 3 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (D) i. Research Guidance - M.Phil.</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">No. of students</td>';
		$table.="<td style='width:10%'>Points</td>";		
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['fnostud']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 1>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		$query = "select fslno,fuserid,fappno,fnostud,fpoints,fenclosureno,fenttype,fawareded,r1.freasonname as fawarededname
		from rechguid
		left join reason r1 on rechguid.fawareded = r1.freasoncode	
		where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcgp'";
		$results4  = $aobj_context->mobj_db->getAll($query);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 4 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (D) ii. Research Guidance - Ph.D</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Awareded / Submitted</td>';
		$table.="<td style='width:10%'>No of students</td>";
		$table.="<td style='width:10%'>Points</td>";		
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['fawarededname']}</td>";
			$table.="<td style='width:10%'>{$value['fnostud']}</td>";		
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 2>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		$query4 = "select fslno,fuserid,fappno,fname,facademic,flevel,fawareded,fpoints,fenclosureno,fenttype,
		r1.freasonname as fawarededname,r2.freasonname as flevelname
		from rechguid
		left join reason r1 on rechguid.fawareded = r1.freasoncode	
		left join reason r2 on rechguid.flevel = r2.freasoncode
		where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcfs'";
		$results4  = $aobj_context->mobj_db->getAll($query4);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 7 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (E) i. Fellowships and Awards</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Name of the Fellowship / Award</td>';
		$table.="<td style='width:10%'>Academic body / association</td>";
		$table.="<td style='width:10%'>Type</td>";
		$table.="<td style='width:10%'>Level</td>";
		$table.="<td style='width:10%'>Points</td>";		
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['fname']}</td>";
			$table.="<td style='width:10%'>{$value['facademic']}</td>";
			$table.="<td style='width:10%'>{$value['fawarededname']}</td>";
			$table.="<td style='width:10%'>{$value['flevelname']}</td>";			
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 4>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		$query4 = "select fslno,fuserid,fappno,ftitle,fsubmitted,forganized,flevel,date_format(fdate,'%d/%m/%Y') as fdate,ftype,fpoints,fenclosureno,
				r1.freasonname as ftypename,r2.freasonname as flevelname
				from rclecture
				left join reason r1 on rclecture.ftype = r1.freasoncode
				left join reason r2 on rclecture.flevel = r2.freasoncode		
				where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcil'";
		
		$results4  = $aobj_context->mobj_db->getAll($query4);
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 8 style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (E) ii. Invited lectures / papers</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Title of the Invited Lecture Delivered / Paper Presented</td>';
		$table.="<td style='width:10%'>Title of the conference / Seminar</td>";
		$table.="<td style='width:10%'>Organized By</td>";
		$table.="<td style='width:10%'>Date</td>";
		$table.="<td style='width:10%'>Type</td>";
		$table.="<td style='width:10%'>Level</td>";
		$table.="<td style='width:10%'>Points</td>";		
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['ftitle']}</td>";
			$table.="<td style='width:10%'>{$value['fsubmitted']}</td>";
			$table.="<td style='width:10%'>{$value['forganized']}</td>";
			$table.="<td style='width:10%'>{$value['fdate']}</td>";
			$table.="<td style='width:10%'>{$value['flevelname']}</td>";
			$table.="<td style='width:10%'>{$value['ftypename']}</td>";			
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 6>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		$query4 = "select fslno,fuserid,fappno,ftitle,fsubmitted,fnom,fpoints,fenclosureno,fenttype
		from rclecture
		where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcde'";

		$results4  = $aobj_context->mobj_db->getAll($query4);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan =6  style = "text-align:center;background-color:lightblue;font-family:italic;font-size:110%;">III (F) Development of e-learning delivery process / material</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.='<td style="width:10%;font-weight: ;">Title of module</td>';
		$table.="<td style='width:10%'>Recognized by / Submitted at / Delivered at</td>";
		$table.="<td style='width:10%'>No. of Modules</td>";
		$table.="<td style='width:10%'>Points</td>";
		$table.="<td style='width:10%'>Points</td>";		
		$table.='<td style="width:10%;font-weight: ;">Enclosure No.</td>';
		$table.='</tr>';
		$sumexpfpoints = '';
		$fexp = '';
		foreach($results4 as $value)
		{
			$table.='<tr>'; 								
			$table.="<td style='width:10%'>{$value['ftitle']}</td>";
			$table.="<td style='width:10%'>{$value['fsubmitted']}</td>";
			$table.="<td style='width:10%'>{$value['fnom']}</td>";			
			$table.="<td style='width:10%;font-weight: ;'>{$value['fpoints']}</td>";
			$table.="<td style='width:10%;font-weight: ;'>{$value['fenclosureno']}</td>";
			$table.='</tr>';
			$sumexpfpoints+=$value['fpoints'];
		}
		$table.='<tr style = "font-weight: bold;">'; 								
		$table.="<td style='width:10%;text-align:right;' colspan = 3>Total</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$sumexpfpoints}</td>";
		$table.='</table><br>';
		
		}
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		$query4 = "select * from otherdet
				where fuserid = '{$userid}' and fappno = '{$appno}'";
		$results4  = $aobj_context->mobj_db->getRow($query4);
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 2 style = "text-align:center;background-color:lightblue;font-family:italic;font-size110%;">Other Activities / Reponsibilities</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>';
		$table.="<td>{$results4['FANYDET']}</td>";
		$table.='</tr>';
		$table.='</tbody>';
		$table.='</html><br>';
		
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan = 2 style = "text-align:center;background-color:lightblue;font-family:italic;font-size110%;">6.1 Miscellaneous Information</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.="<td style='width:10%'>Have you ever been punished for Gender/Caste related offences or convicted by a court of law? If yes, give details.</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FPUNISHEDGC']}</td>"; 
		$table.='</tr>';
		$table.='<tr>'; 								
		$table.="<td style='width:10%'>Were you at any time declared medically unfit or asked to submit your resignation or discharged or dismissed? If yes, give details</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FUNFIT']}</td>"; 
		$table.='</tr>';
		$table.='<tr>'; 								
		$table.="<td style='width:10%'>Do you have any criminal case pending against you in a court of law? If yes, give details.</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FCRIMINAL']}</td>"; 
		$table.='</tr></table>';
		$table.='<table class="table table-bordered" style="width:99%;" id="postdettable">';
		$table.='<thead>';
		$table.='<th colspan=7 style="text-align:center;background-color:lightblue;font-family:italic;font-size110%;">Two References familiar with your academic work</th> ';	
		$table.='</thead>';
		$table.='<tbody>';
		$table.='<tr>'; 								
		$table.="<td style='width:10%'>Sl. No.</td>";		
		$table.="<td style='width:10%;font-weight: ;'>Full Name</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>Institutional Affiliation (Present/Former)</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>Designation</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>Address</td>";
		$table.="<td style='width:10%;font-weight: ;'>Mobile / Phone No.</td>";
		$table.="<td style='width:10%;font-weight: ;'>Email</td>";	
		$table.='</tr>';
		$table.='<tr>'; 								
		$table.="<td style='width:10%'>1</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFNAME1']}</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFINST1']}</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFDESG1']}</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFADD1']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFMOBILE1']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFEMAIL1']}</td>";	
		$table.='</tr>';
		$table.='<tr>'; 								
		$table.="<td style='width:10%'>2</td>";		
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFNAME2']}</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFINST2']}</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFDESG2']}</td>"; 
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFADD2']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFMOBILE2']}</td>";
		$table.="<td style='width:10%;font-weight: ;'>{$results4['FREFEMAIL2']}</td>";	
		$table.='</tr>';
		$table.='</table><br>';
		$table.="<center><button class='btn btn_3 btn btn-info'  onclick = 'submithprint()'>Submit</button></center>";
		
		$rst['table'] = $table;
		echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
			
	}else
	{
		$query = "select md.fdegndesc,mc.fdescpn,p.fappno from postdet p inner join mascourse mc on p.fdegree = mc.fdegree
		inner join masdegn md on md.fdegncode = p.fdegncode
		where fuserid = '{$userid}'";
		$results  = $aobj_context->mobj_db->getAll($query);
		
		/* $table ='<table class="table table-bordered" style="width:900px;" id="postdettable">';
		$table.='<thead>';
		$table.='<tr>'; 								
		$table.='<th style="width:50px;">Sl. No.</th>';		
		$table.='<th style="width:200px;">Post Applied for</th>';
		$table.='<th style="width:250px;">Department Name (subject)</th>'; 
		$table.='<th style="width:100px;">Application Number</th>';	
		$table.='<th style="width:50px;">Action</th>';									
		$table.='</tr></thead><tbody>'; */
		$i = 1;
		$table ='';
		foreach($results as $value)
		{
			
			$table.="<tr style = 'height:25px;'>"; 										
			$table.="<td><input type = 'text' id='postid_{$i}' disabled class='form-control1' value = '{$i}'></td>";
			$table.="<td><input type = 'text' id='postdeg_{$i}' value = '{$value['fdegndesc']}' disabled class='form-control1'></td>";
			$table.="<td><input type = 'text' id='postsub_{$i}' disabled value = '{$value['fdescpn']}' class='form-control1'></td>";
			$table.="<td><input type = 'text' id='postapplication_{$i}' disabled value = '{$value['fappno']}' class='form-control1'></td>";
			$table.="<td><button  id='postapp_{$i}' onclick = 'main_menu({$i});' class='form-control1'>Apply<button></td>";
			$table.='</tr>';
			$i++;
		}

		$rst['table'] = $table;
		echo $aobj_context->mobj_output->ToJSONEnvelope($rst,-1,"success");
	}		
	
}	
	
function loadapplieddetails($aobj_context)
{
		$userid = $_SESSION['userid'];
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		$query = "select md.fdegndesc,mc.fdescpn,p.fappno from postdet p inner join mascourse mc on p.fdegree = mc.fdegree
				inner join masdegn md on md.fdegncode = p.fdegncode
				where fuserid = '{$userid}'";
		$results  = $aobj_context->mobj_db->getAll($query);
		
		/* $table ='<table class="table table-bordered" style="width:900px;" id="postdettable">';
		$table.='<thead>';
		$table.='<tr>'; 								
		$table.='<th style="width:50px;">Sl. No.</th>';		
		$table.='<th style="width:200px;">Post Applied for</th>';
		$table.='<th style="width:250px;">Department Name (subject)</th>'; 
		$table.='<th style="width:100px;">Application Number</th>';	
		$table.='<th style="width:50px;">Action</th>';									
		$table.='</tr></thead><tbody>'; */
		$i = 1;
		$table ='';
		foreach($results as $value)
		{
			
			$table.="<tr style = 'height:25px;'>"; 										
			$table.="<td><input type = 'text' id='postid_{$i}' disabled class='form-control1' value = '{$i}'></td>";
			$table.="<td><input type = 'text' id='postdeg_{$i}' value = '{$value['fdegndesc']}' disabled class='form-control1'></td>";
			$table.="<td><input type = 'text' id='postsub_{$i}' disabled value = '{$value['fdescpn']}' class='form-control1'></td>";
			$table.="<td><input type = 'text' id='postapplication_{$i}' disabled value = '{$value['fappno']}' class='form-control1'></td>";
			$table.="<td><button  id='postapp_{$i}' onclick = 'main_menu({$i});' class='form-control1'>Apply<button></td>";
			$table.='</tr>';
			$i++;
		}

	if($results)
	{	
		$rst['table'] = $table;
		echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
	}else
	{
		$rst['msg'] = '';
		echo $aobj_context->mobj_output->ToJSONEnvelope($rst,-1,"Failure");
	}		
}

?>