ok

Mini Shell

Direktori : /home/ngwcolle/public_html/ICICI_MS_LIVE/
Upload File :
Current File : /home/ngwcolle/public_html/ICICI_MS_LIVE/student_details.php

<?php
include_once('dbconfig.php');
if (isset($_POST['rollno'])) {
    $rollno = $_POST['rollno'];
}
// echo $rollno;
$encryptionKey = "NGWC";
function encryptText($text, $key)
{
    $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
    $encrypted = openssl_encrypt($text, 'aes-256-cbc', $key, 0, $iv);
    return base64_encode($iv . $encrypted);
}

function decryptText($encryptedText, $key)
{
    $data = base64_decode($encryptedText);
    $ivSize = openssl_cipher_iv_length('aes-256-cbc');
    $iv = substr($data, 0, $ivSize);
    $encrypted = substr($data, $ivSize);
    return openssl_decrypt($encrypted, 'aes-256-cbc', $key, 0, $iv);
}
$sqlchecklink = "SELECT * FROM tbl_pmtlink WHERE id='1'";
$resultlink = $con->query($sqlchecklink);
$rowpmtlink = $resultlink->fetch_assoc();
if ($rowpmtlink['pmtlinkenabled'] == 0) {

    header("Location:errorpage.php");
}
$sql = "SELECT tbl_payment_order.*,tbl_payment_order.id as pmtid,tbl_student.studentfirstname,tbl_student.studentlastname,tbl_student.rollno FROM tbl_student inner join tbl_payment_order on tbl_student.rollno=tbl_payment_order.rollno WHERE tbl_student.rollno='$rollno'";
$result = $con->query($sql);
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <title>NGWC,ASKA</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://unpkg.com/bootstrap@5.3.3/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://unpkg.com/bs-brain@2.0.4/components/registrations/registration-5/assets/css/registration-5.css">

</head>

<body class="bg-primary">

    <!-- Registration 5 - Bootstrap Brain Component -->
    <!-- Table 2 - Bootstrap Brain Component -->
    <section class="py-3 py-md-5">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-12 col-lg-10 col-xl-10">
                    <div class="card widget-card border-light shadow-sm">
                        <div class="card-body p-4">
                            <div class="row">
                                <div class="float-start col">
                                    <h5 class="card-title widget-card-title mb-4">Student Details</h5>
                                </div>
                                <div class="col">
                                    <h5 class="card-title widget-card-title mb-4 float-end"><a href="index.php" class="btn btn-success text-white"><--Back </a> </h5>
                                </div>

                            </div>



                            <div class="table-responsive">
                                <table class="table table-borderless bsb-table-xl text-nowrap align-middle m-0">
                                    <thead>
                                        <tr>
                                            <th>Name of the Student</th>
                                            <th>Roll No</th>
                                            <th>Amount</th>
                                            <th>Payment Status</th>
                                            <th>Description</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        if ($result->num_rows > 0) {
                                            while ($row = $result->fetch_assoc()) {
                                        ?>
                                                <tr>
                                                    <td>
                                                        <div class="d-flex align-items-center">

                                                            <div>
                                                                <h6 class="m-0"><?php echo $row["studentfirstname"] . " " . $row['studentlastname']; ?></h6>
                                                                <!-- <span class="text-secondary fs-7">SMM</span> -->
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <h6 class="mb-1"><?php echo $row["rollno"]; ?></h6>
                                                        <!-- <span class="text-secondary fs-7">United States</span> -->
                                                    </td>
                                                    <td>
                                                        <h6 class="mb-1"><?php echo $row["amountdue"]; ?></h6>
                                                        <!-- <span class="text-secondary fs-7">v5.3+</span> -->
                                                    </td>
                                                    <td>
                                                        <?php
                                                        if ($row["pmtstatus"] == 0) { ?>
                                                            <span class="badge bg-danger bsb-w-85">Pending</span>
                                                        <?php } else { ?>
                                                            <span class="badge bg-success bsb-w-85">Paid</span>
                                                        <?php } ?>
                                                    </td>
                                                    <td>
                                                        <h6 class="mb-1"><?php echo $row["remark"]; ?></h6>
                                                        <!-- <span class="text-secondary fs-7">v5.3+</span> -->
                                                    </td>

                                                    <td>
                                                        <?php
                                                        if ($row["pmtstatus"] == 0) { ?>
                                                            <a href="saleApi.php?pmtid=<?php echo encryptText($row["pmtid"], $encryptionKey); ?>" class="btn btn-primary">Pay</a>
                                                        <?php } ?>
                                                    </td>
                                                </tr>
                                        <?php }
                                        } else {
                                            echo "<tr><td colspan='5' class='text-danger'>No records found</td></tr>";
                                        } ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

</body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>

</html>

Zerion Mini Shell 1.0