BBnepal-Accounts/bustracking/application/views/bustracking-admin/dashboard.php

267 lines
9.6 KiB
PHP
Raw Normal View History

2024-07-10 12:43:19 +00:00
<main class="common_margin" id="main">
<div class="main-wrap">
<div class="dashboard-cover">
<div class="dashboard-left">
<div class="common-heading">
<h2>DashBoard</h2>
</div>
<div class="dashboard-tabs-wrap">
<div class="dashboard-tabs">
<div class="tab-img">
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon1.png">
</div>
<div class="tab-info">
<h3>8/10</h3>
<h5>Today's Trips</h5>
</div>
</div>
<div class="dashboard-tabs">
<div class="tab-img">
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon2.png">
</div>
<div class="tab-info">
<h3><?php echo $driver_count ? $driver_count : 0 ; ?></h3>
<h5>Total Drivers</h5>
</div>
</div>
<div class="dashboard-tabs">
<div class="tab-img">
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
</div>
<div class="tab-info">
<h3><?php echo $bus_count ? $bus_count : 0 ; ?></h3>
<h5>Total Buses</h5>
</div>
</div>
<div class="dashboard-tabs">
<div class="tab-img">
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon4.png">
</div>
<div class="tab-info">
<h3><?php echo $student_count ? $student_count : 0 ; ?></h3>
<h5>Total Students</h5>
</div>
</div>
</div>
</div>
<div class="dashboard-right">
<div class="right-first-block">
<div class="right-head">
<div class="common-sub-heading">
Trip Status
</div>
<div class="right-head-right">
<div class="completed">
<i class="fas fa-check-circle"></i>
<h6>Trip Completed</h6>
</div>
<div class="pending">
<i class="fas fa-check-circle"></i>
<h6>Trip Pending</h6>
</div>
</div>
</div>
<div class="right-block">
<div class="owl-carousel owl-theme">
<div class="item">
<div class="right-inner">
<div class="inner-block">
<span>1</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>2</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5 class="trip-completed"><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>3</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>4</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5 class="trip-completed"><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>5</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>6</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5 class="trip-completed"><i class="fas fa-check-circle"></i></h5>
</div>
</div>
</div>
<div class="item">
<div class="right-inner">
<div class="inner-block">
<span>1</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>2</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5 class="trip-completed"><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>3</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>4</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5 class="trip-completed"><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>5</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5><i class="fas fa-check-circle"></i></h5>
</div>
<div class="inner-block">
<span>6</span>
<img src="<?php echo base_url();?>assets-bustracking/images/dashboard-icon3.png">
<h5 class="trip-completed"><i class="fas fa-check-circle"></i></h5>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="dashboard-cover">
<div class="dashboard-left">
<div class="common-heading">
<h2>Bus Location</h2>
<label>Route</label>
<select class="form-control form-control-sm" id="route_id">
<?php if (isset($route_name) && !empty($route_name)) { $i=1;
foreach ($route_name as $key => $value) { if($i==1){?>
<option selected value="<?= $value['id'] ?>"><?= $value['route_name'] ?></option>
<?php }else{ ?>
<option value="<?= $value['id'] ?>"><?= $value['route_name'] ?></option>
<?php } $i++; }
}else{ ?>
<option>No Route</option>
<?php } ?>
</select>
</div>
<div class="map-div">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d7777.571379030323!2d77.61403862439637!3d12.92149136355506!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3bae1458e6baac69%3A0x1d02c77cc85211ed!2sMadiwala%2C%201st%20Stage%2C%20BTM%20Layout%2C%20Bengaluru%2C%20Karnataka!5e0!3m2!1sen!2sin!4v1632120611168!5m2!1sen!2sin" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
</div>
</div>
<div class="dashboard-right">
<div class="right-first-block">
<div class="right-head">
<div class="common-sub-heading towads-route">
Route1 (Towards Silkboard)
</div>
</div>
<div class="right-block right-block-noborder">
<table>
<thead>
<tr>
<th><span class="bus-tr">&nbsp</span></th>
<th>Bus Stop</th>
<th>Arrival Time</th>
</tr>
</thead>
<tbody class="route_stops_class">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</main>
<!--End right-top side-->
</div>
<!-- <script src="<?php echo base_url();?>assets-bustracking/js/jquery-3.2.1.slim.min.js"></script> -->
<script src="<?php echo base_url();?>assets-bustracking/js/jquery-3.4.1.min.js" ></script>
<script src="<?php echo base_url();?>assets-bustracking/js/popper.min.js"></script>
<script src="<?php echo base_url();?>assets-bustracking/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script defer src="<?php echo base_url();?>assets-bustracking/js/all.js"></script>
<script defer src="<?php echo base_url();?>assets-bustracking/js/main.js"></script>
<script src="<?php echo base_url();?>assets-bustracking/owl-carousel/js/owl.carousel.min.js"></script>
<script>
$('.owl-carousel').owlCarousel({
loop:true,
margin:10,
nav:true,
responsive:{
0:{
items:1
},
600:{
items:1
},
1000:{
items:1
}
}
})
$(document).ready(function(){
$('.user-drpdown').click(function(){
$('.drpdown-items').toggle();
});
});
//table js
$('#tbl').DataTable( {
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
} );
//table js end
</script>
<!-- script for the route view -->
<script>
$(document).ready(function(){
var id = <?= $route_name[0]['id']; ?>;
get_route_Data(id)
});
function get_route_Data(id)
{
$.ajax({
url: '<?php echo base_url() . 'get-details-route/' ?>' + id,
type: 'POST',
dataType: 'json',
success: function(result) {
console.log(result);
// var obj = JSON.parse(result);
// console.log(obj);
var stops_name = ''; var last_stop ='';var route_name;
$.each(result, function(index, value) {
stops_name +='<tr><td><span class="bus-tr">&nbsp</span></td><td>'+ value['place_name']+'</td><td>4:30PM</td></tr>'
last_stop = value['place_name'];
route_name = value['route_name'];
});
$('.route_stops_class').html(stops_name);
$('.towads-route').text(route_name + ' (Towards '+ last_stop +')');
}
});
}
$('#route_id').change(function(){
var id = $(this).children("option:selected").val();
get_route_Data(id);
});
</script>
</body>
</html>