HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //proc/self/cwd/school-admin/transaction-history.php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

include('header.php');
?>
<link href="assets/extra-libs/datatables.net-bs4/css/dataTables.bootstrap4.css" rel="stylesheet">
<?php

include('sidebar.php');
include_once('../wp-config.php');

$school_id = $_SESSION['user_id'];

$list = "SELECT pt.total_plan, pt.remaining_plan, pt.date,ud.first_name,p.plan_name FROM wp_psy_bulk_plan_transactions as pt LEFT JOIN wp_psy_users_details as ud ON ud.user_id = pt.student_id LEFT JOIN wp_psy_plans as p ON p.plan_id = pt.plan_id WHERE pt.school_id='$school_id'";
$allData = $wpdb->get_results($list);

?>
<div class="page-wrapper">
    <div class="page-breadcrumb">
        <div class="row">
            <div class="col-12 align-self-center">
                <h4 class="page-title text-truncate text-dark font-weight-medium mb-1">Transaction History</h4>
                <div class="d-flex align-items-center">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb m-0 p-0">
                            <li class="breadcrumb-item"><a href="dashboard" class="text-muted">Home</a></li>
                            <li class="breadcrumb-item text-muted active" aria-current="page">Transaction History</li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>
    </div>
            <div class="container-fluid">
                <!-- ============================================================== -->
                <!-- Start Page Content -->
                <!-- ============================================================== -->
                <!-- basic table -->
                <div class="row">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-body">
                                <h4 class="card-title">Transaction History</h4>
                                <div class="table-responsive">
                                    <table id="zero_config" class="table table-striped table-bordered no-wrap">
                                        <thead>
                                            <tr>
                                            	<th>S.No</th>
                                                <th>Plan Name</th>
                                                <th>Student Name</th>
                                                <th>Befor Txn Plan</th>
                                                <th>Aftr Txn Plan</th>
                                                <th>Transaction Date</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        	<?php 
                                        	$a=1;
                                        	foreach($allData as $data){ ?>
                                            <tr>
                                            	<td><?php echo $a; ?></td>
                                                <td><?php echo $data->plan_name; ?></td>
                                                <td><?php echo $data->first_name; ?></td>
                                                <td><?php echo $data->total_plan; ?></td>
                                                <td><?php echo $data->remaining_plan; ?></td>
                                                <td><?php echo date('d-M-Y h:i:s',strtotime($data->date)); ?></td>
                                            </tr>
                                        <?php $a++; } ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
</div>

<?php
include('footer.php');
?>
<!--This page plugins -->
<script src="assets/extra-libs/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="dist/js/pages/datatable/datatable-basic.init.js"></script>
<script type="text/javascript">
function validateForm() {
  var x = document.forms["myForm"]["fname"].value;
  if (x == "") {
    alert("Name must be filled out");
    return false;
  }
}


    function getState(sel) {
        $('#citvselect').hide();
        $.ajax({
            url: "backend/get_cities.php?state_id=" + sel.value,
            cache: false,
            success: function(html) {
                $("#cityDIV").append(html);
            }
        });
    }
</script>