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


Current Path : /proc/thread-self/root/var/www/oasis/src/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/src/convdet.php

<?php 

function getStudentsforconv($aobj_context)
{

	session_start();
	if(!isset($_SESSION['collcode']))
	{
		$arr['msg'] = 'Session Expired Re-login';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
	}	
	$college_code = $_SESSION['collcode'];
	$user_type = $_SESSION['user_type'];
	$userid = $_SESSION['user_id'];
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  	
	$degree = trim($aobj_context->mobj_data["degree"]); 	

		$query = "select fregno,fname,fkanname,fcollcode,fdegree,fcaste,fcnvno,FPREVPAID,FPRIVRECPT,
		ifnull(FELIG,'') as FELIG, ifnull(fconstype,'') as fconstype
    from dcstud 
    where fcollcode = '{$college_code}' and  fdegree = '{$degree}'";

	$obj_get_details = $aobj_context->mobj_db->GetAll($query);

	if(!$obj_get_details)
	{
		$arr['msg'] = 'No Students Found';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
		return;
	}	

	$k = 1;
	$edy_data = "";
	$m = 0;
	foreach ($obj_get_details as $key => $value)
	{		
		$regno = $value['fregno']; 
		$name = $value['fname'];
		$fkanname = $value['fkanname'];        
		$fcaste = $value['fcaste'];
		$FPRIVPAID = $value['FPREVPAID'];
		$FPRIVRECPT = $value['FPRIVRECPT'];
		$FELIG = $value['FELIG'];
		$fconstype = $value['fconstype'];        

		$ht_checked = "";
		if($FELIG == 'T')
		{
			$ht_checked = "checked = true";
		}
		$cns_checked ="";
		if($fconstype == 'T')
		{
			$cns_checked = "checked = true";
		}
		$cns_enable = "";
		if($fcaste == 'GM') {
			$cns_enable = "disabled";
		}
		if($k%2==0)
		{
			$class='tbl_row';
		}
		else
		{
			$class='tbl_row1'; 
		}
		$ht_lable = "";
		$edy_data.="<tr class='ui-widget-content jqgrow'>";
		$edy_data.="<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>{$k}</td>";
		$edy_data.="<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>{$regno} 
			<input type = 'hidden' value = '{$regno}' id = 'hregno_{$k}'>
			</td>";
		$edy_data.="<td class='tbl_row_new' align='left'   style='border-right:1px solid #C5DBEC;  padding:2px;' id='fmacas_FSUBNAME_{$m}'>{$name}</td>";		
		$edy_data.="<td class='tbl_row_new' align='center'   style='border-right:1px solid #C5DBEC;  padding:2px;' id='fmacas_fcaste_{$m}'>{$fcaste}</td>";		
        $edy_data.="<td class='tbl_row_new' align='left'   style='border-right:1px solid #C5DBEC;  padding:2px;' id='fmacas_FSUBNAME_{$m}'>
        <input type='text' name='kannada name' 
        onchange='statusChanged(\"$regno\")' value='{$fkanname}' placeholder='kannada name' 
        id = 'kan_$regno' onkeypress = 'onLoad(event,\"kan_$regno\")'
        style='border:0px;width:100%;height:25px;' ></td>";
        
        $edy_data.="<td class='tbl_row_new' align='left'   style='border-right:1px solid #C5DBEC;  padding:2px;' id='fmacas_FSUBNAME_{$m}'>
        <input type='text' name='Previous Paid' onchange='statusChanged(\"$regno\")' 
        id = 'fee_$regno'
        value='{$FPRIVPAID}' placeholder='Previous Paid' style='border:0px;width:100%;height:25px;' ></td>";

        $edy_data.="<td class='tbl_row_new' align='left'   style='border-right:1px solid #C5DBEC;  padding:2px;' id='fmacas_FSUBNAME_{$m}'>
        <input type='text' name='Receipt No' onchange='statusChanged(\"$regno\")' 
        id = 'recepet_$regno'
        value='{$FPRIVRECPT}' placeholder='Receipt No' style='border:0px;width:100%;height:25px;' ></td>";

		$edy_data.="<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC;  padding:2px;'><input type=checkbox {$ht_checked} id = 'eli_$regno' onchange='statusChanged(\"$regno\")' name='hallticket'>  {$ht_lable}</td>";
		$edy_data.="<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC;  padding:2px;'><input type=checkbox {$cns_checked} {$cns_enable} id = 'cns_$regno' onchange='statusChanged(\"$regno\")' name='fconstype'>  {$ht_lable}</td>";
		$edy_data.="<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC;  padding:0px;display:none'><input type=checkbox id='h_{$regno}' name='hidden'></td>";	
		$edy_data.="</tr>";   
		$k++;$m++;
	}

	$e_data="<table  width='100%' id='clear' class='tr_ventor_row' align='center' cellspacing='0' cellpadding='0' border='0' >";
	$e_data.="<th align='left' colspan='9' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:22px;'>Update Convocation Details</th>";		
	$e_data.="<tr  class='ui-state-default ui-jqgrid-hdiv'>";
	$e_data.="<td  align=center style='padding:2px; width:24px; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
	$e_data.="<td  align=center style='padding:2px; width:24px; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Reg. No.</td>";
	$e_data.="<td align=center  style='padding:2px;  width:60px; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Student Name</td>";
  $e_data.="<td align=center style='padding:2px; width:24px; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Cat.</td>";
  $e_data.="<td align=center  style='padding:2px;  width:90px; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Kan. Stud. Name</td>";
  $e_data.="<td align=center  style='padding:2px;  width:30px !important; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Fee Paid</td>";
  $e_data.="<td align=center  style='padding:2px;  width:30px; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Recipt No.</td>";
	$e_data.="<td align=center  style='padding:2px;  width:30px; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Eligilbe To Apply ?</td>";
	$e_data.="<td align=center  style='padding:2px;  width:30px; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC;  border-bottom:1px solid #C5DBEC;'>Eligilbe for Concession ?</td>";
	$e_data.="</tr>";		
	
	$arr['html_data']=$e_data.$edy_data;		  
	$arr['total_count']=$k;	
	// $arr['rem_sub']=trim($exam_removed_subject_code);	
	
	if($obj_get_details)	
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
    else
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
	return;	
 	
}


function saveUpdConvDet($aobj_context)
{
	session_start();
	$college_code = $_SESSION['collcode'];
	$realname = $_SESSION['realname'];
	if(!isset($_SESSION['collcode']))
	{
		$arr['msg'] = 'Session Expired Re-login';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
		return;
    }
    
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);			 
	$degree = trim($aobj_context->mobj_data["degree"]);
	$strECH = stripslashes($aobj_context->mobj_data["strECH"]);
    
    $rgECH = json_decode($strECH, true);
    
	foreach ($rgECH as $key => $value) 
	{
        
        $qry = "mysql_set_charset('utf8')";
        $res = $aobj_context->mobj_db->Execute($qry);

				$query = "update dcstud set FELIG = '{$value['elig']}', 
				FCONSTYPE = '{$value['cns']}',
        FPRIVRECPT = '{$value['recepet']}',
        FPREVPAID = '{$value['feepaid']}',
        FKANNAME =  '{$value['kanname']}'
        where fcollcode = '{$college_code}'
        and fdegree = '{$degree}'
        and fregno = '{$value['regno']}'";

        $results = $aobj_context->mobj_db->Execute($query);
		
	}

	if($results) 
	{
		$arr='Updated Successfully';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
		return;
	}	
	else
	{
		$arr='Updation Failure';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
		return;
	}
		
}

?>