-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
169 lines (141 loc) · 5.42 KB
/
index.php
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?php
require("Common_files/php/database.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- BOOTSTRAP CSS LINK START -->
<link rel="stylesheet" href="Common_files/css/bootstrap.min.css" />
<!-- BOOTSTRAP CSS LINK END -->
<!-- BOOTSTRAP JS LINK START -->
<script src="Common_files/js/bootstrap.bundle.min.js"></script>
<!-- BOOTSTRAP JS LINK END -->
<!-- ANIMATE CSS LINK START -->
<link rel="stylesheet" href="Common_files/css/animate.min.css" />
<!-- ANIMATE CSS LINK END -->
<!-- SWEET ALERT JS LINK START -->
<script src="Common_files/js/sweetalert.min.js"></script>
<!-- SWEET ALERT JS LINK END -->
<!--FONT AWESOME LINK START -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer"/>
<!--FONT AWESOME LINK END -->
<!-- JQUERY LINK START -->
<script src="Common_files/js/jquery.min.js"></script>
<!-- JQUERY LINK END -->
<!-- GOOGLE FONT START -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Sofia"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Audiowide"/>
<!-- GOOGLE FONT END -->
<title>School ERP System</title>
<link rel="stylesheet" href="pages/index.css">
</head>
<style>
.carousel-caption{
line-height:80px;
}
</style>
<body>
<!-- nav -->
<?php
require("assets/nav.php");
?>
<!-- Main Page code start -->
<div class="container-fluid" style="margin-top: 90px;">
<!-- CAROUSAL CODE START -->
<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<?php
$showcase = "SELECT * FROM header_showcase";
$response = $db -> query($showcase);
if($response){
while($data = $response -> fetch_assoc())
{
$h_align = $data['h_align'];
$v_align = $data['v_align'];
$text_align = "";
if($h_align == "center")
{
$text_align = "text-center";
}
else if($h_align == "flex-start")
{
$text_align = "text-start";
}
else if($h_align == "flex-end")
{
$text_align = "text-start";
}
$title_size = $data['title_size'];
$title_color = $data['title_color'];
$subtitle_size = $data['subtitle_size'];
$subtitle_color = $data['subtitle_color'];
echo "<div class='carousel-item carousel-control'>";
$image = "data:image/png;base64,".base64_encode($data['title_image']);
echo "<img src='".$image."' class='w-100'>";
echo "<div class='carousel-caption ".$text_align." d-flex h-100' style='justify-content:".$h_align."; align-items:".$v_align.";'>";
echo "<div>";
echo "<h1 style='font-size:".$title_size."; color:".$title_color.";'>".$data['title_text']."</h1>";
echo "<h4 style='font-size:".$subtitle_size."; color:".$subtitle_color.";'>".$data['subtitle_text']."</h4>";
echo $data['buttons'];
echo "</div>";
echo "</div>";
echo "</div>";
}
}
?>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" 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="#carouselExampleControls" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<!-- CAROUSAL CODE END -->
<!-- COURSE SECTION CODE START-->
<div class="course-section">
<div class="container">
<h1 class="mt-5 fw-bold mb-4">Trending Courses</h1>
<div class="row mb-5">
<?php
$get_course = "SELECT * FROM course";
$course_res = $db -> query($get_course);
if($course_res){
while($data = $course_res -> fetch_assoc()){
echo '
<div class="col-md-3 p-0 mb-3 course-box">
<div class="card">
<img src="Employee/'.$data['logo'].'" class="card-img-top" alt="">
<div class="card-body">
<h4 class="card-title">
'.$data['name'].'
</h4>
<p class="card-text fw-bold">'.$data['fee'].'</p>
</div>
</div>
</div>
';
}
}
?>
</div>
</div>
</div>
<!-- COURSE SECTION CODE END-->
</div>
<!-- Main Page code end -->
<!-- footer -->
<?php require("assets/footer.php"); ?>
</body>
<script>
$(document).ready(function(){
let carousel_item = document.querySelector(".carousel-control");
$(carousel_item).addClass("active");
});
</script>
</html>