-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
111 lines (102 loc) · 5.62 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
<?php include_once('includes/dbconnection.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>ProfsPortail</title>
<!-- Bootstrap icons-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css" rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" />
</head>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<body class="d-flex flex-column h-100">
<main class="flex-shrink-0">
<!-- Navigation-->
<?php include_once('includes/header.php');?>
<!-- Header-->
<header class="bg-dark py-5">
<div class="container px-5">
<div class="row gx-5 align-items-center justify-content-center">
<div class="col-lg-8 col-xl-7 col-xxl-6">
<div class="my-5 text-center text-xl-start">
<h class="display-5 fw-bolder text-white mb-2">Welcome to</h>
<h1 class="display-5 fw-bolder text-white mb-2">ProfsPortail</h1>
<div class="d-grid gap-3 d-sm-flex justify-content-sm-center justify-content-xl-start" style="margin-top:5%;">
<a class="btn btn-primary btn-lg px-4 me-sm-3" href="Professor/signup.php">Professor Signup/Registration</a>
<a class="btn btn-outline-light btn-lg px-4" href="Professor/index.php">Professor Login</a>
</div>
</div>
</div>
<div class="col-xl-5 col-xxl-6 d-none d-xl-block text-center"><img class="img-fluid rounded-3 my-5" src="images/3802031.jpg" alt="..." /></div>
</div>
</div>
</header>
<!-- Blog preview section-->
<section class="py-5">
<div class="container px-5 my-5">
<form method="post" action="search-result.php">
<aside class="bg-primary bg-gradient rounded-3 p-4 p-sm-5 mt-5">
<div class="d-flex align-items-center justify-content-between flex-column flex-xl-row text-center text-xl-start">
<div class="mb-4 mb-xl-0">
<div class="fs-3 fw-bold text-white">Search Professor by Name or Subject</div>
</div>
<div class="ms-xl-4">
<div class="input-group mb-2">
<input class="form-control" type="text" placeholder="Search Professor by Name or Subject" aria-label="Email address..." aria-describedby="button-newsletter" name="searchinput" required style="width:350px;" />
<button class="btn btn-outline-light" id="button-newsletter" type="submit">Search</button>
</div>
</div>
</div>
</aside>
</form>
<hr />
<div class="row gx-5 justify-content-center">
<div class="col-lg-8 col-xl-6">
<div class="text-center">
<h2 class="fw-bolder">Listed Professors</h2>
<hr color="red" />
</div>
</div>
</div>
<div class="row gx-5">
<?php
$sql="SELECT * from tblteacher where isPublic='1' limit 9";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
foreach($results as $row)
{ ?>
<div class="col-lg-4 mb-5">
<div class="card h-100 shadow border-0">
<img class="card-img-top" src="Professor/images/<?php echo $row->Picture;?>" alt="<?php echo htmlentities($row->Name);?>" />
<div class="card-body p-4">
<div class="badge bg-primary bg-gradient rounded-pill mb-2"><?php echo htmlentities($row->TeacherSub);?></div>
<a class="text-decoration-none link-dark stretched-link" href="Professor-details.php?tid=<?php echo $row->ID;?>" target="_blank">
<h5 class="card-title mb-3"><?php echo htmlentities($row->Name);?></h5></a>
<p class="card-text mb-0"><small>Registered Since <?php echo htmlentities($row->RegDate);?></small></p>
</div>
</div>
</div>
<?php }} else{?>
<h3 align="center" style="color:red;">Record not Found</h3>
<?php } ?>
</div>
</div>
</section>
</main>
<!-- Footer-->
<?php include_once('includes/footer.php'); ?>
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="js/scripts.js"></script>
</body>
</html>