-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchvideos.php
43 lines (41 loc) · 1.59 KB
/
searchvideos.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
<table style="box-shadow:1px 2px 3px lightgray;width:100%;">
<br><br><br><br><br><br>Results
<?php
session_start();
error_reporting(0);
require_once 'connect.php';
if(isset($_POST['pages'])):
$paged=$_POST['pages'];
$keyword=mysql_real_escape_string(htmlentities(htmlspecialchars_decode($_GET['v'])));
echo $keyword;
$sql=mysqli_query($con,"SELECT * FROM videos");
while($r=mysqli_fetch_array($sql))
{
$video=$r['video'];
$video_code=$r['video_code'];
$album=$r['album'];
$time=$r['time'];
$views=$r['views'];
$vtime=$r['videotime'];
$id=$r['id'];
echo '<li><tr><td style="padding:10px;"><a href="#" onclick="view_video(\'play.php?video='.$video_code.'\')">';
echo '<img src="images/video7.png" style="width:100px;height:100px;" class="iconimg"><p style="color:magenta;margin-top:-20px;margin-left:60px;z-index:999999;">'.$vtime.'</p></p></td>
<td style="width:300px;overflow:hidden;text-overflow:ellipsis;"><a href="#" onclick="view_video(\'play.php?video='.$video_code.'\')">'.$video.'</a></td><td>';
echo '</td><td>';
if(isset($_SESSION['stuid']))
{
$stu=$_SESSION['stuid'];
$ad=mysqli_query($con,"SELECT * FROM students where stuid='$stu' and category='admin'");
if(mysqli_fetch_array($ad)==true)
{
echo '<a href="del_link.php?cat=videos&&link='.$id.'" style="margin:5px;float:right;border:1px solid red;border-radius:100px;padding:5px;width:30px;height:30px;text-align:center;">X</a>';
}
}
echo '</td></tr><tr>
<td style="padding-left:10px;">Views: '.$views.'</td></tr></li>';
}
?>
<?php
endif;
?>
</table>