Your IP : 3.16.212.203
<?php
session_start();
include("lib/connect.inc.php");
$uid = $covis->Uid();
if($uidx != 1){
header("Location:../login.php");
}
if(isset($_SESSION['report'])){$report = $_SESSION['report']; }
if(isset($_POST['tid'])){$_SESSION['tid'] = $_POST['tid']; }
$tid = $_SESSION['tid']??'';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Registered Participant</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Font Awesome -->
<?php include('head.php'); ?>
<script src="https://cdn.tiny.cloud/1/ouel3uwpwm72k70z91sb1tnlogecmzdka4g5vu5fpb3fheoo/tinymce/5/tinymce.min.js"></script>
<script>tinymce.init({selector:'textarea'});</script>
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
<?php include('nav.php'); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Non members registration</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item active">Training Registration</li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Content Header (Page header) -->
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<form method="post">
<select name="tid" class="form-control" required onchange="submit()">
<option value="">Select Option...</option>
<?php $sql = $db->query("SELECT * FROM training ");
while($row = $sql->fetch_assoc()){ $i +=1;
?>
<option value="<?php echo $row['sn'] ?>"><?php echo $row['title'] ?></option>
<?php } ?>
</select>
</form>
<?php if(isset($_GET['reg'])){$reg = $_GET['reg']; ?>
<br>
<div class="card ">
<div class="card-header text-white bg-dark">
<h5><?php echo sqLx('trainee2','sn',$reg,'name') ?>: <?php echo sqLx('training','sn',$tid,'title') ?></h5>
</div>
<div class="card-body p-0">
<table class="table table-striped table-bordered dataTable table-sm" id="example1">
<tr>
<th>Phone No</th>
<th>Email</th>
<th>Referral ID</th>
<th>Training Location</th>
<th>Fee</th>
<th>Submitted on</th>
<th>Paymant Details</th>
</tr>
<?php $i=0;
$sql = $db->query("SELECT * FROM trainee2 WHERE sn='$reg' ");
while($row = $sql->fetch_assoc()){ $i +=1;
?>
<tr>
<td><?php echo $row['phone'] ?></th>
<td><?php echo $row['email'] ?></th>
<td><?php echo $row['ref'] ?></th>
<td><?php echo $row['location'] ?></th>
<td>$<?php echo $row['cost'] ?></th>
<td><?php echo $row['created'] ?></th>
<td><?php echo $row['note'] ?></th>
</tr>
<?php } ?>
</table>
<form method="post">
<?php if(sqLx('trainee2','sn',$reg,'status')==1){ ?>
<div class="p-3"><button class="btn btn-primary" name="visitorPaid">Confirm Payment and Register</button></div><?php } ?>
</form>
</div>
</div>
<?php } ?>
<br>
<div class="card ">
<div class="card-header text-white bg-dark">
<h5>List of Submission: <?php echo sqLx('training','sn',$tid,'title') ?></h5>
</div>
<div class="card-body p-0">
<table class="table table-striped table-bordered dataTable table-sm" id="example1">
<tr>
<th>S/N</th>
<th>Name</th>
<th>Phone No</th>
<th>Email</th>
<th>Referral ID</th>
<th>Training Location</th>
<th>Fee</th>
<th>Submitted on</th>
<th>Status</th>
</tr>
<?php $i=0;
$sql = $db->query("SELECT * FROM trainee2 WHERE training='$tid' AND status=1");
while($row = $sql->fetch_assoc()){ $i +=1;
?>
<tr>
<td><?php echo $i ?></th>
<td><a href="?reg=<?php echo $row['sn'] ?>"><?php echo $row['name'] ?></a></th>
<td><?php echo $row['phone'] ?></th>
<td><?php echo $row['email'] ?></th>
<td><?php echo $row['ref'] ?></th>
<td><?php echo $row['location'] ?></th>
<td>$<?php echo $row['cost'] ?></th>
<td><?php echo $row['created'] ?></th>
<td><?php echo $row['status'] ?></th>
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
<!-- right col -->
</div>
<!-- /.row (main row) -->
</div><!-- /.container-fluid -->
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include('foot.php'); ?>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="../plugins/jquery-ui/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
$.widget.bridge('uibutton', $.ui.button)
</script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- ChartJS -->
<script src="../plugins/chart.js/Chart.min.js"></script>
<!-- Sparkline -->
<script src="../plugins/sparklines/sparkline.js"></script>
<!-- JQVMap -->
<script src="../plugins/jqvmap/jquery.vmap.min.js"></script>
<script src="../plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
<!-- jQuery Knob Chart -->
<script src="../plugins/jquery-knob/jquery.knob.min.js"></script>
<!-- daterangepicker -->
<script src="../plugins/moment/moment.min.js"></script>
<script src="../plugins/daterangepicker/daterangepicker.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Summernote -->
<script src="../plugins/summernote/summernote-bs4.min.js"></script>
<!-- overlayScrollbars -->
<script src="../plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="../dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- DataTables -->
<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<!-- page script -->
<script>
$(function () {
$("#example1").DataTable({
"responsive": true,
"autoWidth": false,
});
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
"responsive": true,
});
});
function EditTrain(a,b,c,d,e,f){
$('#EditTrain').modal('show');
$('#ShowContent').html('<div class="modal-body"><input type="hidden" value="'+f+'" name="sn"/><input type="text" value="'+a+'" class="form-control" name="title" placeholder="Training Title" required/> <br/><input type="number" value="'+b+'" class="form-control" name="cost1" placeholder="Member Price" required/> <br/><input type="number" value="'+c+'" class="form-control" name="cost2" placeholder="Non Member Price" required/> <br/><input type="text" value="'+d+'" class="form-control" name="date" placeholder="Training Date & Time" required/> <br/><input type="text" value="'+e+'" class="form-control" name="location" placeholder="Training Locations" required/><small>Separate multiple locations with comma</small></div><div class="modal-footer"><button type="submit" class="btn btn-warning" name="DeleteTraining">Delete Training</button><button type="submit" class="btn btn-primary" name="EditTraining">Edit Training</button><button type="button" class="btn btn-danger" data-dismiss="modal">Close</button></div>');
}
</script>
</body>
</html>