-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
160 lines (130 loc) · 6.94 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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="./res/logo4.png">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Custom css -->
<link rel="stylesheet" href="./styles/indexPage.css">
<title>Reflect Forum</title>
</head>
<body>
<?php include './partials/_header.php' ?>
<?php include './partials/_dbconnect.php' ?>
<?php
if (isset($_GET['signupsuccess']) && $_GET['signupsuccess'] == "true") {
echo '<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>Success !</strong> Registration Successful, Login next time.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
} else if (isset($_GET['signupsuccess']) && $_GET['signupsuccess'] == "false" && isset($_GET['error'])) {
echo '<div class="alert alert-danger alert-dismissible fade show" role="alert">
<strong>Error !</strong> ' . $_GET['error'] . '
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
?>
<div id = "main" style="color:blue;">
<center>
<img src="res\gpp.png" alt="..." >
<h2>GOVERMENT POLYTECNIC PEN</h2>
<h4 style="color:red;">Aprooved by AICTE, New Delhi, Recognized by Goverment of India and </h4>
<h4 style="color:red;">Affilated to Mharashtra State Board of Technical Education, Mubai</h4>
</center>
</div>
<div id="carouselExampleControls" class="carousel slide my-2 mb-2 mx-3 " data-bs-ride="carousel" >
<div class="carousel-inner">
<div class="carousel-item active">
<img src="https://source.unsplash.com/1600x400/?coding, cloude" class="d-block w-100" alt="..." style="border-radius: 5%;">
</div>
<div class="carousel-item">
<img src="https://source.unsplash.com/1600x400/?Java, applet" class="d-block w-100" alt="..." style="border-radius: 5%;">
</div>
<div class="carousel-item">
<img src="https://source.unsplash.com/1600x400/?code, python" class="d-block w-100" alt="..." style="border-radius: 5%;">
</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>
<!-- Intro to the forum -->
<div class="container m-5">
<div class="row align-items-center">
<div class="col">
<h1 class="display-5">Welcome to the online discussion forum for <span class=" font-monospace fw-bold placeholder-glow" style="color:#1a2436 ">
Goverment Polytechnic Pen
</span>
</h1>
</div>
<div class="col">
<img src="https://source.unsplash.com/1200x800/?code, java" class="img-fluid " alt="" style="border-radius: 10%;">
</div>
</div>
</div>
<!-- Trending -->
<!-- Welcome to goverment pen -->
<!-- <div class="container-fluid rounded"> -->
<!-- <div class=" " style="background-color: #2A0944;">
<h2 class="text-center my-4" style="font-family: 'Kanit', sans-serif; color:white">Welcome to Reflect Forum</h2>
</div> -->
<div class="container-fluid rounded text-center">
<h1 style = "font-family: Arial, Helvetica, sans-serif;"><span class=" font-monospace fw-bold placeholder-glow" style="color:#1a2436 ">
Welcome To Reflect
</span> </h1>
<img src="./res/logo4.png" width="100" height="100" alt="">
</div>
<div class="row my-2 row-cols-1 row-cols-md-4 g-4 mx-4 align-items-center justify-content-center rounded " style="border-radius: 5px; background-color: #25334d;" >
<!--Fetching data from the categories -->
<?php
$sql = "SELECT * FROM `categories`";
$result = mysqli_query($conn, $sql);
$limit = 0;
while ($row = mysqli_fetch_assoc($result)) {
$limit + 1;
if ($limit > 8)
break;
$catID = $row['category_id'];
$catTitle = $row['category_title'];
$catDesc = $row['category_description'];
$catImg = $row['imgurl'];
echo '
<div class="col">
<div class="card shadow-lg p-3 mb-5 bg-body rounded my-4 h-100" style="width: 18rem; height:auto;">
<img src=' . $catImg . ' class="card-img-top img-thumbnail" style="height:250px; width:auto;" alt="...">
<div class="card-body">
<h5 class="card-title">' . $catTitle . '</h5>
<p class="card-text">' . substr($catDesc, 0, 45) . '...</p>
</div>
<div class="card-footer">
<a href="threadslist.php?catid=' . $catID . '" class="btn btn-primary rounded-pill " style="width:100%">Click Here</a>
</div>
</div>
</div>';
}
?>
</div>
</div>
</div>
<?php include './partials/_footer.php' ?>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
-->
</body>
</html>