Ejemplo n.º 1
0
?>
<h2 class = "white" style = "position: absolute; left: 1130px; top: 2px"><?php 
echo $name;
?>
</h2>
<h1 class = "white" style = "position: absolute; left: 30px; top: -10px;"><?php 
echo $recordOne['filename'];
?>
</h1>
<h1 class = "white" style = "position: absolute; left: 600px; top: 110px;">Recommended Media</h1>
<a href = "logout.php"><img src = "images/logout.png" height = "45" width = "45"
                            style = "position: absolute; top: 10px; left: 1280px;"></a>
<table style = "position: absolute; top: 170px; left: 600px; width: 600px;">
<?php 
//recommendMedia($queryThree, 0);
searchFunctionality($connection, $queryThree, $u_id);
?>
</table>
<img src = "images/board.png" height = "290" width = "850" style = "position: absolute; top: 370px; left: -150px;">
<?php 
$mediaLink = "/~asherwa/uploads/" . $uname . "/" . $recordOne['filename'];
//<?php $mediaLink = "/uploads/" . $uname . "/" . $recordOne['filename'];
$category = $recordOne['category'];
if ($category == "image") {
    ?>
<img src = "<?php 
    echo $mediaLink;
    ?>
" style = "position: absolute; left: 30px; top: 85px;"
     height = "300" width = "500">
<?php 
Ejemplo n.º 2
0
        } elseif ($_GET['sort'] == "views") {
            $queryOne = mysqli_query($connection, "select * from media order by views desc");
        } elseif ($_GET['sort'] == "averageScore") {
            $queryOne = mysqli_query($connection, "select * from media order by averageScore desc");
        }
    } elseif (isset($_GET['category'])) {
        if ($_GET['category'] == "image") {
            $queryOne = mysqli_query($connection, "select * from media where category = 'image'");
        } elseif ($_GET['category'] == "audio") {
            $queryOne = mysqli_query($connection, "select * from media where category = 'audio'");
        } elseif ($_GET['category'] == "video") {
            $queryOne = mysqli_query($connection, "select * from media where category = 'video'");
        }
    } elseif (isset($_GET['shareWith'])) {
        if ($_GET['shareWith'] == "contacts") {
            $queryOne = mysqli_query($connection, "select * from media m inner join contacts c\n                                 on m.user_id = c.userID where c.contactOf = '{$usID}'");
        } elseif ($_GET['shareWith'] == "friends") {
            $queryOne = mysqli_query($connection, "select * from media m inner join contacts c\n                                 on m.user_id = c.userID where c.contactOf = '{$usID}' and c.isFriend = 'yes'");
        }
    }
}
searchFunctionality($connection, $queryOne, $usID);
?>
 
</table>
<button type = "button" class = "fancy_button" style = "position: absolute; top: 65px; left: 10px;"
        onclick = "window.location.href = 'dashboard.php'"><span> Dashboard </span></button>
<button type = "button" class = "fancy_button" style = "position: absolute; top: 65px; left: 1150px; width: 200px;"
        onclick = "window.location.href = 'advancedSearch.php'"><span> Advanced Search </span></button>
</body>
</html>