-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup
74 lines (68 loc) · 3.3 KB
/
backup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
$sql = "SELECT * FROM carosel";
$query = mysqli_query($conn, $sql);
while ($data = mysqli_fetch_array($query)) {
?>
<div class="carousel-item active" data-bs-interval="10000">
<img src="assets/<?php echo $data['image_url'] ?>" class="w-75" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5></h5>
<p></p>
</div>
</div>
<?php } ?>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 rounded">
<div id="carouselExampleDark" class="carousel carousel-dark slide mt-3 mb-3" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner rounded">
<div class="carousel-item active" data-bs-interval="10000">
<img src="assets/img/work-01.png" class="img-fluid d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5>Kelas Penumpang Bisnis</h5>
<p>Seat Penumpang bangku 2-2 sehingga lebih lebar</p>
</div>
</div>
<div class="carousel-item" data-bs-interval="2000">
<img src="assets/img/profesional-01.png" class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5>Kelas Penumpang Ekonomi</h5>
<p>Seat penumpang tiga di kanan dan dua di kiri (3-2)</p>
</div>
</div>
<div class="carousel-item">
<img src="assets/img/all type-01.png" class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5>Kelas Penumpang Eksekutif</h5>
<p>Model sleeping seat</p>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</div>
</div>
<script>
let carouselCount = <?php echo count($carousel); ?>;
var currentCarouselIndex = 0;
function autoPlayCarousel() {
if (currentCarouselIndex < carouselCount) {
$(".carousel-item").removeClass("active");
$("#carousel-" + currentCarouselIndex).addClass("active");
currentCarouselIndex++;
}
}
</script>