-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewmore.php
More file actions
192 lines (191 loc) · 6.32 KB
/
Copy pathviewmore.php
File metadata and controls
192 lines (191 loc) · 6.32 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
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#4E0096" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Counter-Up/1.0.0/jquery.counterup.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!--sweetalert-->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="admincss.css">
<script src="script.js"></script>
<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/3.9.0/less.min.js" ></script>
<style>
@media screen and (min-width:320px){
#owl-demo .item img{
height: 100px;
}
.w3-card-4{
width: 90%;
margin:0 auto;
padding: 0%;
margin-top:3%;
}
.postimg{
width: 100%;
max-height:400px;
-o-object-fit: contain;
}
}
@media screen and (min-width:600px){
h2{
font-size: 20px;
}
#owl-demo .item img{
height: 150px;
}
h3{
font-size: 18px;
}
.w3-card-4{
width: 60%;
}
}
@media screen and (min-width:1050px){
h2{
font-size: 25px;
}
h3{
font-size: 20px;
}
#owl-demo .item img{
height: 200px;
}
.w3-card-4{
width: 50%;
}
.postimg{
width: 100%;
max-height:400px;
-o-object-fit: contain;
}
}
#existingcourses{
padding-top: 5%;
padding-bottom: 3%;
background-color: #eff5f5;
}
.no-js #loader { display: none; }
.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.se-pre-con {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url(img/loader.gif) center no-repeat #fff;
}
</style>
</head>
<body id="mypage" data-spy="scroll" data-target=".navbar" data-offset="60">
<?php
if(!isset($_SESSION['admin'])){
?>
<script type="text/javascript">
Swal.fire({
title: 'Unauthorized user!',
type: 'error',
onAfterClose: function() {
location.assign('index.php');
}
});
</script>
<?php
die();
}
?>
<div class="se-pre-con"></div>
<header>
<nav class="navbar navbar-inverse navbar-fixed-top" style=" margin:0%; background-color: #4E0096; border: 0%; border-radius:0%;">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php#mypage" style="color:white;"> Learn ME</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="logout.php">Logout <span class="glyphicon glyphicon-log-out"></span></a></li>
</ul>
</div>
</div>
</nav>
</header>
<?php
$mname = $_GET["mname"];
?>
<div class="jumbotron">
<br><h2 class="text-center"><?php echo $mname; ?></h2>
</div>
<?php
$con = new mysqli("localhost","root","","learndb");
$sel="select * from coursetb where modulename='$mname'";
$result=$con->query($sel);
if($result->num_rows>0){
while($row=$result->fetch_assoc()){
$coursename = $row["coursename"];
$description = $row["description"];
$videoid = $row["videoid"];
$type = $row["type"];
if($type==NULL){
$typeshown = "empty";
}
else if($type == 'gif' || $type == 'jpg' || $type == 'jpeg' || $type == 'png'){
$typeshown = "image";
}
else{
$typeshown = "video";
}
?>
<div class="w3-container">
<div class="w3-card-4">
<?php
if($typeshown == "image"){
?>
<img id="#myimg" src="<?php echo $videoid ?>" class="postimg" alt="Alps">
<?php
}
else if($typeshown == "video"){
?>
<video class="postimg" controls>
<source src="<?php echo $videoid; ?>" type="video/mp4">
</video>
<?php
}
?>
<div style="padding:1%;color:dimgrey;text-align:center;font-weight:bold;font-size:24px;"><?php echo $coursename ?></div>
<div style="padding:1%;color:dimgrey;"> <?php echo $description ?></div>
<div class="w3-container w3-center">
</div>
</div>
</div>
<?php
}
}
?>
<script>
$(window).load(function(){
// Animate loader off screen
$(".se-pre-con").fadeOut("slow");
});
</script>
</body>
</html>