87 lines
2.2 KiB
PHP
87 lines
2.2 KiB
PHP
<main class="common_margin" id="main">
|
|
<div class="main-wrap">
|
|
</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"> </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>
|