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.191.171.43


Current Path : /var/www/html/kswu/orms/src/
Upload File :
Current File : /var/www/html/kswu/orms/src/payment_det.php

<?php

function savepost($aobj_context)
{
	session_start();
	$userid = $_SESSION['userid'];
	
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$postappiled = trim($aobj_context->mobj_data["postappiled"]);
	$subjectapplied = trim($aobj_context->mobj_data["subjectapplied"]);
	$fvacancies = trim($aobj_context->mobj_data["fvacancies"]);
	
	$appno = $userid.$postappiled.$subjectapplied;
	//$_SESSION['appno'] = $appno;
	$query = "insert into postdet values('{$userid}','{$postappiled}','{$subjectapplied}','{$appno}','{$fvacancies}')";
	$results  = $aobj_context->mobj_db->Execute($query);

	if($results)
	{
		$query = "insert into perdetl(fuserid) values('{$userid}')";
		$result  = $aobj_context->mobj_db->Execute($query);
	}
	//var_dump($query);
	if($results)
	{
		$query = "select md.fdegndesc,mc.fdescpn,p.fappno,p.fvacancies 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='postvac_{$i}' value = '{$value['fvacancies']}' disabled class='form-control1'></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,0,"success");
			
	}else
	{
		$query = "select md.fdegndesc,mc.fdescpn,p.fappno,p.fvacancies 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);

		$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='postvac_{$i}' value = '{$value['fvacancies']}' disabled class='form-control1'></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 loadPaymentDetails($aobj_context)
{
	$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"]);
	$str = "";
	$query1 = "select * from perdetl where ifnull(fmobile,'') <> '' and ifnull(fdob,'')<> '' and ifnull(fage,'')<> ''
			and ifnull(fbirthplace,'') <> '' and ifnull(ffatname,'')<>'' and ifnull(fmotname,'')<>'' and ifnull(fnational,'')<>''
			and ifnull(fcatcode,'') <> '' and ifnull(fmarstatus,'') <> '' and ifnull(fcomadd1,'') <> ''
			and ifnull(fcomadd2,'')<>'' and ifnull(fcomadd3,'') <> '' and ifnull(fperadd1,'') <> '' and ifnull(fperadd2,'') <> ''
			and ifnull(fperadd3,'') <> '' and ifnull(femailid,'') <> '' and ifnull(fmobile,'') <> ''
			and fuserid = '{$userid}'";
	$results1  = $aobj_context->mobj_db->getRow($query1);
	if($results1)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Enter Personal Details</span><br>";
	}	
	
	$query2 = "select * from qualdetl where fuserid = '{$userid}'";
	$results2  = $aobj_context->mobj_db->getAll($query2);
	//var_dump($query2);
	if($results2)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Enter Educational Details</span><br>";
	}
	
	$query3 = "select * from otherdet where ifnull(FPUNISHEDGC,'')<> '' and ifnull(FUNFIT,'')<> ''
			and ifnull(FCRIMINAL,'') <> '' and ifnull(FREFNAME1,'')<>'' and ifnull(FREFNAME2,'')<>'' 
			and ifnull(FREFINST1,'')<>'' and ifnull(FREFDESG1,'')<>'' and ifnull(FREFADD1,'')<>'' and ifnull(FREFMOBILE1,'')<>'' and ifnull(FREFEMAIL1,'')<>''
			and ifnull(FREFINST2,'')<>'' and ifnull(FREFDESG2,'')<>'' and ifnull(FREFADD2,'')<>'' and ifnull(FREFMOBILE2,'')<>'' and ifnull(FREFEMAIL2,'')<>''
			and fuserid = '{$userid}'  and fappno = '{$appno}'";	
	$results3  = $aobj_context->mobj_db->getAll($query3);
	
	if($results3)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Enter Other Details</span><br>";
	}
	
	/* $query4 = "select * from otherdet where ifnull(FPUNISHEDGC,'')<> '' and ifnull(FUNFIT,'')<> ''
			and ifnull(FCRIMINAL,'') <> '' and ifnull(FREFNAME1,'')<>'' and ifnull(FREFNAME2,'')<>'' 
			and ifnull(FREFINST1,'')<>'' and ifnull(FREFDESG1,'')<>'' and ifnull(FREFADD1,'')<>'' and ifnull(FREFMOBILE1,'')<>'' and ifnull(FREFEMAIL1,'')<>''
			and ifnull(FREFINST2,'')<>'' and ifnull(FREFDESG2,'')<>'' and ifnull(FREFADD2,'')<>'' and ifnull(FREFMOBILE2,'')<>'' and ifnull(FREFEMAIL2,'')<>''
			and fuserid = '{$userid}'  and fappno = '{$appno}'";	
	$results4  = $aobj_context->mobj_db->getRow($query4);
	
	if($results4)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Enter Other Details</span><br>";
	} */
	
	/* $query5 = "select * from expdetl where fuserid = '{$userid}' and fappno = '{$appno}'";
	$results5  = $aobj_context->mobj_db->getAll($query5);
	
	if($results5)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Enter Experience Details</span><br>";
	} */
	
	/* $query6 = "select * from researchexp where fuserid = '{$userid}' and fappno = '{$appno}'";
	$results6  = $aobj_context->mobj_db->getAll($query6);
	
	if($results6)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Enter Research Details</span><br>";
	} */
	
	$query7 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = 'photo'";
	$results7  = $aobj_context->mobj_db->getRow($query7);
	
	if($results7)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Photo</span><br>";
	}
	
	$query8 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = 'signature'";
	$results8  = $aobj_context->mobj_db->getRow($query8);
	
	if($results8)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Signature</span><br>";
	}
	
	/* $query9 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = '10'";
	$results9  = $aobj_context->mobj_db->getRow($query9);
	
	if($results9)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Matric/Secondary/High School (10th Class) Certificate</span><br>";
	}
	
	$query10 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = 'clae'";
	$results10  = $aobj_context->mobj_db->getRow($query10);
	
	if($results10)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Check List and List of Enclosures</span><br>";
	}
	
	$query11 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = 'ugms'";
	$results11  = $aobj_context->mobj_db->getRow($query11);
	
	if($results11)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Bachelor's Degree Marks Sheet</span><br>";
	}
	
	$query12 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = 'ug'";
	$results12  = $aobj_context->mobj_db->getRow($query12);
	
	if($results12)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Bachelors' Degree</span><br>";
	}
	
	$query13 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = 'pgms'";
	$results13  = $aobj_context->mobj_db->getRow($query13);
	
	if($results13)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Master's Degree Marks Sheet</span><br>";
	}
	$query14 = "select * from upload where fuserid = '{$userid}' and fappno = '{$appno}' and ftype = 'pg'";
	$results14  = $aobj_context->mobj_db->getRow($query14);
	
	if($results14)
	{
		
	}else
	{
		$str.="<span style = 'color:red;'>Please Upload Master's Degree</span><br>";
	} */
		
	
	
	if($str == '')
	{	
	$query = "SELECT p.fuserid,s.fname,p.fappno,p.fvacancies,if('{$postname}' = 'ASSISTANT PROFESSOR',ifnull(c.famount,0),ifnull(c.fpamount,0)) as famount
			  FROM perdetl s INNER JOIN mascat c ON s.fcatcode  = c.fcatid
			  INNER JOIN postdet p ON s.fuserid = p.fuserid
			  where p.fuserid = '{$userid}' and p.fappno = '{$appno}'";
	$results  = $aobj_context->mobj_db->getRow($query);
	
	$appno = $results['fappno'];
		if($results[famount] == 0)
		{	
		
			$cariavle ="<button  class='btn btn_3 btn btn-info'  onclick = 'Printapplication(\"{$appno}\")'>Submit</button>";
		}else
		{
			$cariavle ="<button class='btn btn_3 btn btn-info' onclick = 'MakeOnlinePayment(\"{$appno}\");' >MakePayment</button>";
		}	
		
		$table ='<p><span style = "color:red">Note:</span><b>Please note Applicant`s are not allowed to update / modify their application form in any circumstance once paid the application fee.Application Fee is non refundable</b></p><br><br><table class="table table-bordered" style="width:900px;" id="postdettable">';
		$table.='<thead>';
		$table.='<tr>'; 									
		$table.='<th style="width:200px;">Name</th>';
		$table.='<th style="width:250px;">Application Number</th>'; 
		$table.='<th style="width:100px;">Post Applied for</th>';
		$table.='<th style="width:100px;">Department</th>';
		$table.='<th style="width:100px;">Amount</th>';		
		$table.='<th style="width:50px;">Action</th>';									
		$table.='</tr></thead><tbody>';
		
		$table.="<tr style = 'height:25px;'>"; 										
		$table.="<td>{$results['fname']}</td>";
		$table.="<td>{$appno}</td>";
		$table.="<td>{$postname}</td>";
		$table.="<td>{$post_subject}</td>";
		$table.="<td>{$results['famount']}</td>";
		$table.="<td align='center'>{$cariavle}</td>";
		$table.="</tr>";
	}	
	if($results)
	{	
		$rst['table'] = $table;
		echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
	}else
	{
		$rst['table'] = $str;
		echo $aobj_context->mobj_output->ToJSONEnvelope($rst,-1,"Failure");
	}		
}

function makeOnlinepaymentdetails($aobj_context)
{
	$userid = $_SESSION['userid'];
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	
	$appno = trim($aobj_context->mobj_data["appno"]);
	//$query = "update postdet set fappstatus = 'T' where fappno = '{$appno}' and fuserid = '{$userid}'";
	//$results  = $aobj_context->mobj_db->Execute($query);
	
	if(true)
	{	
		echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success");
	}
}

function Printapplicationdetails($aobj_context)
{
	$userid = $_SESSION['userid'];
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	
	$appno = trim($aobj_context->mobj_data["app_no"]);
	$query = "update postdet set fappstatus = 'T',fpaymentstatus = 'success' where fappno = '{$appno}' and fuserid = '{$userid}'";
	$results  = $aobj_context->mobj_db->Execute($query);
	//var_dump($query);
	if($results)
	{	
		echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success");
	}
}

?>