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 : 3.145.105.199


Current Path : /proc/thread-self/root/var/www/html/admission/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/admission/src/uOldQuestionPaper.php

<?php

function uniclareOldQuestionPaperExam($aobj_context)
{
    
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    
    $univcode = $aobj_context->mobj_data['univcode'];
    $fregno = $aobj_context->mobj_data['regno'];
    $fdegree = $aobj_context->mobj_data['degree'];
    $exam = $aobj_context->mobj_data['exam'];
	
	if($univcode == '' || $fregno == '' || $fdegree == '')
	{
		$arr['msg'] = 'Invalid Params';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
		return;
	}

    $exam_query = "select distinct d.fexamno, fexamname from qparc a inner join subject s on a.fqpcode = s.fqpcode
    inner join degree d on s.fdegree = d.fdegree and s.fexamno = d.fexamno
    where s.ftheory = 'T' and s.fdegree = '{$fdegree}'";
 
	$exam_result = $aobj_context->pobj_db->GetAll($exam_query);
    //var_dump($exam_result);die();
    
	if($exam_result)
	{ 
        $res['exam'] = $exam_result;
		echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success"); 
	}
	else
	{
		$arr['msg'] = 'No Data Found';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
	}

}

function uniclareOldQuestionPaperExamdate($aobj_context)
{


    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    
    $univcode = $aobj_context->mobj_data['univcode'];
    $fregno = $aobj_context->mobj_data['regno'];
    $fdegree = $aobj_context->mobj_data['degree'];
    $exam = $aobj_context->mobj_data['exam'];
	
	if($univcode == '' || $fregno == '' || $fdegree == '' || $exam == '')
	{
		$arr['msg'] = 'Invalid Params';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
		return;
	}
    
    $query = "select distinct a.fexamdate from qparc a inner join subject s on a.fqpcode = s.fqpcode
    inner join degree d on s.fdegree = d.fdegree and s.fexamno = d.fexamno
    where s.ftheory = 'T' and s.fdegree = '{$fdegree}' and s.fexamno = '{$exam}'";

    $examdate_result = $aobj_context->pobj_db->GetAll($query);
    if($examdate_result)
    {
        $res['examdate'] = $examdate_result;
        echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success"); 
	}
	else
	{
		$arr['msg'] = 'No Data Found';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
	}

}

function uniclareOldQuestionPaper($aobj_context)
{


    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    
    $univcode = $aobj_context->mobj_data['univcode'];
    $fregno = $aobj_context->mobj_data['regno'];
    $fdegree = $aobj_context->mobj_data['degree'];
    $exam = $aobj_context->mobj_data['exam'];
    $fexamdate = $aobj_context->mobj_data['examdate'];
	if($univcode == '' || $fregno == '' || $fdegree == '' || $exam == '' || $fexamdate == '') 
	{
		$arr['msg'] = 'Invalid Params';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
		return;
	}
    
    $query = "select distinct s.fsubname,q.fexamdate,concat('https://studentportal.universitysolutions.in/qparchive/',q.ffilename) as ffilename  from subject s
    inner join degree d on d.fdegree=s.fdegree and d.fexamno = s.fexamno
    inner join qparc q on q.fqpcode=s.fqpcode 
    where s.fexamno='{$exam}' and d.fdegree='{$fdegree}' and q.fexamdate='{$fexamdate}'";
	
    $examdate_result = $aobj_context->pobj_db->GetAll($query);
    
    if($examdate_result)
    {
        $res['oldqp'] = $examdate_result;
        echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success"); 
	}
	else
	{
		$arr['msg'] = 'No Data Found';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
	}

}