-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
83 lines (62 loc) · 2.77 KB
/
home.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
<?php
ob_start();
session_start();
/* Checks if the user is logged in or not */
/* If user is not logged in then is redirected to the index page( login page )*/
if (!isset($_SESSION['userid']) || !isset($_SESSION['usernaam'])) {
$home_url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php?err=noaccess';
header('Location: ' . $home_url);
}
?>
<html>
<head>
<title>
CloudHub :: Home
</title>
<!-- list of all the files to be linked with so as to display things properly -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./css/bootstrap.css" />
<link rel="stylesheet" href="./css/home.css" />
<script src="./js/jquery.js"></script>
</head>
<body>
<div id="diss_1"></div>
<img src="./img/logo_black.png" id="logo_main" /> <!-- displays the main image on the home page of the user -->
<a href="logout.php"><button class="btn btn-danger" id="logout">Logout</button></a> <!-- shows the logout button on the to-right corner of the page -->
<div id="dashboard">
<div id="sresults">
<p class="s"><input type="search" id="search" name="search" onclick="this.value=''" value="Search" /></span> <!-- this is for the search box -->
<div id="res"></div>
</div>
<h3><?php
$firstname = explode(' ', $_SESSION['usernaam'], 2); // extracts the username and then displays it on the home page
echo $firstname[0]; ?>'s Dashboard
</h3>
<!-- Displays all the buttons in order to surf through all the pages -->
<div id="uploadfiles" class="dashitem">Upload</div>
<div id="viewall" class="dashitem">My Files</div>
<div id="music" class="dashitem">Music</div>
<div id="photos" class="dashitem">Photos</div>
<div id="videos" class="dashitem">Videos</div>
<br /><br /><br />
<br /><br /><br />
<br /><br /><br />
<br /><br /><br />
</div>
<!-- Whenver user searches for a file using the search bar the user gets a list of all the files -->
<!-- To instantly view the files the user can just place the mouse pointer over it and instantly listen to the music files or watch video files -->
<!-- for e.g. if the mouse pointer is over a video file then that video will be played right there, next to the cursor -->
<div id="action">
</div>
<!-- this is the player which plays the videos and the music files instantly -->
<!-- the source of the files is passed through a javascript function defined in the javascript file ./js/home.js -->
<div id="vid"></div>
<div id="preview">
<video id="prevplayer">
<source id="music" src="music2.mp3"></source>
</video>
</div>
<script src="./js/home.js"></script>
</div>
</body>
</html>