-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstudentCourse.php
More file actions
233 lines (194 loc) · 6.83 KB
/
studentCourse.php
File metadata and controls
233 lines (194 loc) · 6.83 KB
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?php
session_start();
include('connect.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" />
<!-- font awesome cdn -->
<link rel="stylesheet" type="text/css"
href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<!-- Owl Carousel -->
<link rel="stylesheet" type="text/css" href="css/owl.carousel.min.css" />
<link rel="stylesheet" type="text/css" href="css/owl.theme.default.min.css" />
<!-- custom css file link up -->
<link rel="stylesheet" type="text/css" href="style2.css" />
<style>
.headr {
background-color: #009879;
color: #ffffff;
text-align: left;
border: 1px solid black;
}
.zigzag {
margin: 25px 0;
font-size: 0.9em;
font-family: sans-serif;
min-width: 400px;
margin-left: auto;
margin-right: auto;
border: 1px solid black;
}
.zigzag tbody tr {
border-bottom: 1px solid #dddddd;
}
.zigzag th,
.zigzag td {
padding: 12px 15px;
border: 1px solid rgb(255, 255, 255);
}
.zigzag td {
background-color: rgb(9, 54, 232);
color: #ffffff;
}
.boxx {
float: right;
margin-right: 150px;
color: white;
background: rgb(46, 36, 222);
background: linear-gradient(90deg,
rgba(46, 36, 222, 0.6) 0%,
rgba(51, 205, 245, 0.6) 50%,
rgba(27, 90, 103, 0.6) 100%);
padding: 10px;
border-radius: 5%;
}
.btn {
margin-top: 10px;
color: white;
background-color: red;
}
.seat {
font-weight: bold;
font-size: large;
}
#button-88 {
margin: 5px;
padding: 8px 15px;
text-align: center;
text-transform: uppercase;
transition: 0.5s;
background-size: 200% auto;
color: white;
display: block;
border: 1px solid yellow;
font-weight: 700;
box-shadow: 0px 0px 14px -7px #f09819;
background-image: linear-gradient(45deg,
#1900ff 0%,
#10d3c9 51%,
#03b129 100%);
cursor: pointer;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}
#button-88:hover {
background-position: right center;
/* change the direction of the change here */
color: #fff;
text-decoration: none;
}
#button-88:active {
transform: scale(0.95);
}
</style>
<title>Student | Course</title>
</head>
<body>
<?php
if($_SESSION['userID'] != NULL){
?>
<header>
<div class="overlay">
<div class="container">
<div class="row">
<div class="col-md-12">
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="#">জীবন যুদ্ধ | Course List</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="studentProfile2.php">Home <span
class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" id="s-out" href="index.php">Sign Out</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
<!-- <div class="boxx">
<p class="seat">View a Course?</p>
<form name="f2" action="studentCourse2.php" method="POST">
<label class="seat">Enter Course ID</label>
<br />
<input type="text" name="bid" required />
<br />
<input type="submit" name="bking" value="View" class="btn" />
<br />
</form>
</div> -->
<table class="zigzag" id="tabl">
<thead>
<tr>
<th class="headr"><b>Course ID</b></th>
<th class="headr"><b>Course Name</b></th>
<th class="headr"><b></b></th>
</tr>
</thead>
<tbody>
<?php
$stuID = $_SESSION['userID'];
$query = "SELECT * FROM enrolls, course WHERE enrolls.C_ID = course.C_ID AND enrolls.S_ID = $stuID AND Status = 'enrolled'";
$data = mysqli_query($conn,$query);
$row = mysqli_fetch_array($data, MYSQLI_ASSOC);
$total = mysqli_num_rows($data);
$result = $conn->query($query); if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) { ?>
<tr>
<td><?php echo $row["C_ID"]; ?></td>
<td><?php echo $row["name"]; ?></td>
<td>
<form method="post" action="studentCourse2.php">
<input type="hidden" name="selected_id" value="<?php echo $row['C_ID']; ?>">
<button id="button-88" type="submit">View</button>
</form>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</header>
<?php
}
else
{
?>
<script>
alert("Error. Login Required");
</script>
<?php
echo "<script>window.location.href='index.php?'</script>";
}
?>
</body>
</body>
</html>