File: //proc/thread-self/cwd/counselor/list-appointment.php
<?php
include_once('header.php');
include_once('../wp-config.php');
$counselor_id = $_SESSION['COUN-ID'];
echo "Counselor Name : " . $uname;
$query = "SELECT id, counselor_id, scheduled_date, time_dur, time_slot_hr, time_slot_min, end_slot_time, pricing_for_slot, add_date,created_by, status FROM wp_psy_slot_available WHERE counselor_id='$counselor_id' and slot_status='S'";
$queryData = $wpdb->get_results($query);
?>
<style>
.modal-backdrop {
z-index: 999!important;
}
table.dataTable.nowrap th, table.dataTable.nowrap td {
white-space: nowrap !important;
}
.page-title{
float: left;
width: 100%;
}
.excel{
float: right;
color: #fff;
}
</style>
<div class="page-inner">
<div class="page-title">
<div class="col-md-4">
<h3> Users MIS </h3>
<div class="page-breadcrumb">
<ol class="breadcrumb">
<li><a href="dashboard">Home</a></li>
<li class="active">Users</li>
</ol>
</div>
</div>
<div class="col-md-8">
<div class="navbar-right">
<ul class="navul">
<!--<li><a href="apt-class">Class List</a></li>-->
</ul>
</div>
</div>
</div>
<div id="main-wrapper">
<div class="col-md-12" style="padding:0;">
<div class="panel panel-info">
<div class="panel-heading clearfix">
<h4 class="panel-title">Aptitude Test List</h4>
<a href="student-test-excel.php?type=APT" target="_blank" class="excel">
<i class="fa fa-file-excel-o" title="Download" style="cursor:pointer;"></i>
</a>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="display " id="userList" style="font-size: 13px;">
<thead>
<tr>
<th>Id</th>
<th>Created By</th>
<th>Scheduled Date</th>
<th>Duration</th>
<th>Slot Start</th>
<th>Slot End</th>
<th>Slot Price</th>
<th>Booking Time</th>
<th>Booking Status</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
foreach($queryData as $tst){
if($tst->status == 'Y')
{
$link = 'Confirmed';
}
else if($tst->status == 'Y')
{
$link = 'Over';
}
$createdBy = $tst->created_by == 'user' ? 'User' : 'Counselor';
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $createdBy; ?></td>
<td><?php echo $tst->scheduled_date; ?></td>
<td><?php echo $tst->time_dur; ?></td>
<td><?php echo date('h',strtotime($tst->time_slot_hr.':00:00')).':'.$tst->time_slot_min; ?></td>
<td><?php echo $tst->end_slot_time; ?></td>
<td><?php echo $tst->pricing_for_slot; ?></td>
<td><?php echo $tst->add_date; ?></td>
<td><?php echo $link; ?></td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Main Wrapper -->
<!-------------------edit ability modal---------------->
<div class="modal fade" id="editAbilityModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content" style="border: 3px solid #ccc;">
<div class="modal-header" style="padding: 5px 10px 0px 0px; height: 20px;">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="edit_ability_modal"></div>
</div>
</div>
</div>
<div class="page-footer">
<p class="no-s">shinemetrics.com</p>
</div>
</div>
<!-- Page Inner -->
<script type="text/javascript" charset="utf-8">
jQuery.noConflict();
jQuery(function($) {
$('#userList').dataTable({
"bPaginate": true,
"iDisplayLength": 50,
"lengthMenu": [[10,20, 50, 100, 500, 1000 ], [10,20, 50, 100, 500, 1000]],
"order": [[ 7, "desc" ]]
});
jQuery('#editAbilityModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var abid = button.data('id');
//alert(abid);
var url = "/counselor/apt-ability-edit.php";
jQuery.ajax({
url: url,
type:'POST',
data: { abid : abid },
success:function(data){
document.getElementById("edit_ability_modal").innerHTML = data;
}
})
})
});
</script>
<link href="assets/css/jquery.dataTables.min.css" rel="stylesheet">
<link href="assets/css/responsive.dataTables.min.css" rel="stylesheet">
<script src="assets/js/jquery.dataTables.min.js"></script>
<script src="assets/js/dataTables.responsive.min.js"></script>
<?php include_once('footer.php'); ?>