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


Current Path : /var/www/html/oums/src/
Upload File :
Current File : /var/www/html/oums/src/pg_app_edit.php

<?php
include("sys_session.php");
include("sys_mainphp.php");
include("sys_connect_pget.php");
$load_data = $_POST["load_data"];

$resp_mesg = "";
$resp_stat = "";
$resp_file = "";

if ($load_data == 'appl_data') {
    $mysql = "select FAPPNO,FQREGNO,sd.FNAME,sd.FMOBILENO,FPASSWD,sd.FEMAIL,FQMAXMARKS,FQSECMARKS,FQPERCENTAGE from entstudadm sd
    inner join collstud cs on sd.fmobileno=cs.fmobileno
    where fappno='$_POST[appl_numb]' or fqregno='$_POST[appl_numb]'";
    $myres = mysqli_query($mycon, $mysql);
    $myrows = array();
    while ($r = mysqli_fetch_assoc($myres)) {
        $myrows = $r;
    }
    echo json_encode($myrows);
}

if ($load_data == 'mark_data') {
    $mysql = "select fappno,pm.fsubcode,famo,famm,fbmo,fbmm,fcmo,fcmm,fdmo,fdmm,femo,femm,ffmo,ffmm,fsecmarks,fmaxmarks,fpercent,fsubname,pm.fcombcode 
    from entprevmarks pm
    left join entprevcomb cb on pm.fdegree=cb.fdegree and pm.fcombcode=cb.fcombcode and pm.fsubcode = cb.fsubcode
    where fappno='$_POST[appl_numb]' and pm.fsubcode<>'' order by pm.fsubcode";
    $myres = mysqli_query($mycon, $mysql);
    $i = 0;
    $myrows = array();
    while ($r = mysqli_fetch_assoc($myres)) {
        $myrows[$i] = $r;
        $i++;
    }
    echo json_encode($myrows);
}


if ($load_data == "save_data") {
    $mysql = "update entstudadm set FQMAXMARKS='$_POST[maxi_mark]',FQSECMARKS='$_POST[secr_mark]',FQPERCENTAGE='$_POST[totl_perc]' where fappno='$_POST[appl_numb]'";
    $myres = mysqli_query($mycon, $mysql);
    $resp_mesg = "Main data updated successfully!";
    echo json_encode(array("mesg" => $resp_mesg, "stat" => $resp_stat, "file" => $resp_file));
}


if ($load_data == "save_mark") {
    if ($_POST['subj_code1'] != "") {
        $mysql = "update entprevmarks set 
        famo='$_POST[secr_mar11]',famm='$_POST[maxi_mar11]',
        fbmo='$_POST[secr_mar21]',fbmm='$_POST[maxi_mar21]',
        fcmo='$_POST[secr_mar31]',fcmm='$_POST[maxi_mar31]',
        fdmo='$_POST[secr_mar41]',fdmm='$_POST[maxi_mar41]',
        femo='$_POST[secr_mar51]',femm='$_POST[maxi_mar51]',
        ffmo='$_POST[secr_mar61]',ffmm='$_POST[maxi_mar61]',
        fsecmarks='$_POST[subj_secr1]',fmaxmarks='$_POST[subj_maxi1]',fpercent='$_POST[subj_perc1]' where fappno='$_POST[appl_numb]' and fsubcode='$_POST[subj_code1]'";
        $myres = mysqli_query($mycon, $mysql);
    }

    if ($_POST['subj_code2'] != "") {
        $mysql = "update entprevmarks set 
        famo='$_POST[secr_mar12]',famm='$_POST[maxi_mar12]',
        fbmo='$_POST[secr_mar22]',fbmm='$_POST[maxi_mar22]',
        fcmo='$_POST[secr_mar32]',fcmm='$_POST[maxi_mar32]',
        fdmo='$_POST[secr_mar42]',fdmm='$_POST[maxi_mar42]',
        femo='$_POST[secr_mar52]',femm='$_POST[maxi_mar52]',
        ffmo='$_POST[secr_mar62]',ffmm='$_POST[maxi_mar62]',
        fsecmarks='$_POST[subj_secr2]',fmaxmarks='$_POST[subj_maxi2]',fpercent='$_POST[subj_perc2]' where fappno='$_POST[appl_numb]' and fsubcode='$_POST[subj_code2]'";
        $myres = mysqli_query($mycon, $mysql);
    }

    if ($_POST['subj_code3'] != "") {
        $mysql = "update entprevmarks set 
        famo='$_POST[secr_mar13]',famm='$_POST[maxi_mar13]',
        fbmo='$_POST[secr_mar23]',fbmm='$_POST[maxi_mar23]',
        fcmo='$_POST[secr_mar33]',fcmm='$_POST[maxi_mar33]',
        fdmo='$_POST[secr_mar43]',fdmm='$_POST[maxi_mar43]',
        femo='$_POST[secr_mar53]',femm='$_POST[maxi_mar53]',
        ffmo='$_POST[secr_mar63]',ffmm='$_POST[maxi_mar63]',
        fsecmarks='$_POST[subj_secr3]',fmaxmarks='$_POST[subj_maxi3]',fpercent='$_POST[subj_perc3]' where fappno='$_POST[appl_numb]' and fsubcode='$_POST[subj_code3]'";
        $myres = mysqli_query($mycon, $mysql);
    }

    if ($_POST['subj_code4'] != "") {
        $mysql = "update entprevmarks set 
        famo='$_POST[secr_mar14]',famm='$_POST[maxi_mar14]',
        fbmo='$_POST[secr_mar24]',fbmm='$_POST[maxi_mar24]',
        fcmo='$_POST[secr_mar34]',fcmm='$_POST[maxi_mar34]',
        fdmo='$_POST[secr_mar44]',fdmm='$_POST[maxi_mar44]',
        femo='$_POST[secr_mar54]',femm='$_POST[maxi_mar54]',
        ffmo='$_POST[secr_mar64]',ffmm='$_POST[maxi_mar64]',
        fsecmarks='$_POST[subj_secr4]',fmaxmarks='$_POST[subj_maxi4]',fpercent='$_POST[subj_perc4]' where fappno='$_POST[appl_numb]' and fsubcode='$_POST[subj_code4]'";
        $myres = mysqli_query($mycon, $mysql);
    }

    if ($_POST['subj_code5'] != "") {
        $mysql = "update entprevmarks set 
        famo='$_POST[secr_mar15]',famm='$_POST[maxi_mar15]',
        fbmo='$_POST[secr_mar25]',fbmm='$_POST[maxi_mar25]',
        fcmo='$_POST[secr_mar35]',fcmm='$_POST[maxi_mar35]',
        fdmo='$_POST[secr_mar45]',fdmm='$_POST[maxi_mar45]',
        femo='$_POST[secr_mar55]',femm='$_POST[maxi_mar55]',
        ffmo='$_POST[secr_mar65]',ffmm='$_POST[maxi_mar65]',
        fsecmarks='$_POST[subj_secr5]',fmaxmarks='$_POST[subj_maxi5]',fpercent='$_POST[subj_perc5]' where fappno='$_POST[appl_numb]' and fsubcode='$_POST[subj_code5]'";
        $myres = mysqli_query($mycon, $mysql);
    }
    $resp_mesg = "Subject marks updated successfully!";
    echo json_encode(array("mesg" => $resp_mesg, "stat" => $resp_stat, "file" => $resp_file));
}