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/challenge_eva_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');
 
if (isset($_POST['apply'])) {

    $sem = realEscape('sem');
    $paper_code = $_POST['paper_code'];
    $new_paper_code = array();
    foreach ($paper_code as $p_code) {
        if ($p_code != '') {
            array_push($new_paper_code, $p_code);
        }
    }

    $json_of_paper_code = json_encode($new_paper_code);


    $file = $_FILES['file']['name'];
    $file_tmp = $_FILES['file']['tmp_name'];

    if (file_format($file, $img_format)) {

        $new_file_name =  new_fileName($file);

        $insert =  "INSERT INTO `challenge_eva`( `enroll_no`, `sem`, `marksheet`, `paper_code`, `date`, `time`)
             VALUES ('$enroll_no','$sem','$new_file_name','$json_of_paper_code','$date','$time')";

        if (mysqli_query($conn, $insert)) {
            move_uploaded_file($file_tmp, '../Files/challenge_eva/' . $new_file_name);
            SuccessFun('Application Submitted Successfully');
        } else {
            DangerFun('Application Failed');
        }
    } else {
        DangerFun('Invalid File Format');
    }
}

?>

<!-- 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 Challenge Evaluation</h4>
        </div>
        <div class="card-body overflow-auto">

            <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">Semester </label>
                        <input type="number" name="sem" class="form-control" required placeholder="Semester">
                    </div>
                    <div class="col-lg-6 col-12 mb-3 ">
                        <label class="form-label label-color">Semester Marksheet</label>
                        <input type="file" name="file" accept="image/*" class="form-control" required>
                    </div>
                    <div class="col-lg-6 col-12 mb-3 " id="apend-more-field">
                        <label class="form-label label-color">Paper Code </label>
                        <input type="text" name="paper_code[]" class="form-control mb-2" required placeholder="Paper Code">
                    </div>
                    <div class="col-lg-6 mb-3 d-flex align-items-center">
                        <button type="button" class="btn btn-primary mt-4" onclick="create_more_field_one('#apend-more-field')"> <i class="fas fa-plus"></i></button>
                    </div>
                    <div class="col-12 mb-3 text-center">
                        <button type="submit" name="apply" class="btn btn-info">Apply</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


<?php require('Common/Footer.php') ?>


</body>

</html>

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