-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
263 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!-- PHP ZONE! Don't touch it --> | ||
<?php | ||
|
||
$link = @mysqli_connect('localhost', 'root','root','proiectmds') | ||
or die('Nu s-a putut efectua conectarea la baza de date. Eroare: ' . mysql_error()); | ||
session_start(); | ||
|
||
$username = $_SESSION['username']; | ||
$result = mysqli_query($link, "SELECT * FROM follow WHERE username1 = '$username'"); | ||
|
||
?> | ||
|
||
|
||
|
||
<!-- HTML ZONE --> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<body> | ||
|
||
<h2> <?php echo "Prietenii Mei:"; ?></h2> | ||
|
||
<?php | ||
if(mysqli_num_rows($result) > 0) | ||
{ | ||
while($row = mysqli_fetch_assoc($result)) | ||
{ | ||
echo "Nume Prieten: " . $row["username2"]. "<br>"; | ||
echo "Dată: " . $row["followtime"]. "<br>"; | ||
echo "----------------------------------------"."<br>"; | ||
} | ||
} | ||
else | ||
{ | ||
echo "Niciun Prieten Adăugat :("; | ||
}?> | ||
</table> | ||
|
||
<br></br> | ||
<a href="dashboard.php" >Înapoi la Pagina Principală</a> | ||
|
||
</body> | ||
|
||
</html> | ||
|
||
|
||
|
||
<!-- PHP ZONE! Don't touch it --> | ||
<?php | ||
|
||
//Închidere Conexiune | ||
mysqli_close($link); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
<!-- PHP ZONE! Don't touch it --> | ||
<?php | ||
|
||
$link = @mysqli_connect('localhost', 'root','root','proiectmds') | ||
or die('Nu s-a putut efectua conectarea la baza de date. Eroare: ' . mysql_error()); | ||
session_start(); | ||
|
||
$username = $_SESSION['username']; | ||
$keywords = $_SESSION['keywords']; | ||
$sql = "SELECT * FROM list NATURAL JOIN user WHERE username='$username'"; | ||
$result = mysqli_query($link, $sql) or die('Playlist Query failed: ' . mysql_error()); | ||
|
||
?> | ||
|
||
|
||
|
||
<!-- HTML ZONE --> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<style> | ||
form { | ||
/* Just to center the form on the page */ | ||
margin: 0 auto; | ||
width: 800px; | ||
/* To see the outline of the form */ | ||
padding: 1em; | ||
border: 1px solid #CCC; | ||
border-radius: 1em; | ||
} | ||
|
||
form div + div { | ||
margin-top: 1em; | ||
} | ||
|
||
label { | ||
/* To make sure that all labels have the same size and are properly aligned */ | ||
display: inline-block; | ||
width: 110px; | ||
text-align: right; | ||
} | ||
|
||
input, textarea { | ||
/* To make sure that all text fields have the same font settings | ||
By default, textareas have a monospace font */ | ||
font: 1em sans-serif; | ||
|
||
/* To give the same size to all text fields */ | ||
width: 200px; | ||
box-sizing: border-box; | ||
|
||
/* To harmonize the look & feel of text field border */ | ||
border: 1px solid #999; | ||
} | ||
|
||
input:focus, textarea:focus { | ||
/* To give a little highlight on active elements */ | ||
border-color: #000; | ||
} | ||
|
||
textarea { | ||
/* To properly align multiline text fields with their labels */ | ||
vertical-align: top; | ||
|
||
/* To give enough room to type some text */ | ||
height: 5em; | ||
} | ||
|
||
.button { | ||
/* To position the buttons to the same position of the text fields */ | ||
padding-left: 90px; /* same size as the label elements */ | ||
} | ||
|
||
button { | ||
/* This extra margin represent roughly the same space as the space | ||
between the labels and their text fields */ | ||
margin-left: .5em; | ||
} | ||
|
||
</style> | ||
|
||
|
||
|
||
<body> | ||
|
||
<h2>Playlists:</h2> | ||
<form action="show_playlist.php" method = "POST"> | ||
|
||
<table> | ||
<tr> | ||
<th> </th> | ||
<th>Nume Playlist</th> | ||
<th>Nume User</th> | ||
<th>Dată Creare</th> | ||
</tr> | ||
|
||
<?php | ||
if(mysqli_num_rows($result) > 0) | ||
{ | ||
while($row = mysqli_fetch_assoc($result)) | ||
{ | ||
?> | ||
|
||
<tr> | ||
<th><input type = 'radio' name = 'list_id' value = "<?php echo $row["lid"]?>"></th> | ||
<input name="user_name" type="hidden" value = "<?php echo $username?>"> | ||
<th><?php echo $row["ltitle"]?></th> | ||
<th><?php echo $row["username"]?></th> | ||
<th><?php echo $row["lissuedate"]?></th> | ||
</tr> | ||
|
||
<?php | ||
} | ||
} | ||
else | ||
{ | ||
echo "Niciun Rezultat Găsit :("; | ||
}?></table> | ||
|
||
<br></br> | ||
<input type = "submit" name="list_select_button_2" value = "Selectează"> | ||
<br></br> | ||
<a href="search.php" >Înapoi la Pagina cu Rezultate</a> | ||
|
||
</form> | ||
</body> | ||
|
||
</html> | ||
|
||
|
||
|
||
<!-- PHP ZONE! Don't touch it --> | ||
<?php | ||
|
||
//Eliberare Rezultate | ||
mysqli_free_result($result); | ||
//Închidere Conexiune | ||
mysqli_close($link); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!-- PHP ZONE! Don't touch it --> | ||
<?php | ||
|
||
$link = @mysqli_connect('localhost', 'root','root','proiectmds') | ||
or die('Nu s-a putut efectua conectarea la baza de date. Eroare: ' . mysql_error()); | ||
session_start(); | ||
|
||
$username = $_SESSION['username']; | ||
|
||
if(isset($_POST['list_select_button_2'])) | ||
{ | ||
$list_id = $_POST['list_id']; | ||
} | ||
|
||
$result = mysqli_query($link, "SELECT * FROM listcontains NATURAL JOIN song WHERE lid = '$list_id'"); | ||
|
||
?> | ||
|
||
|
||
|
||
<!-- HTML ZONE --> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<body> | ||
|
||
<h2> <?php echo "Melodiile din acest Playlist:"; ?></h2> | ||
|
||
<?php | ||
if(mysqli_num_rows($result) > 0) | ||
{ | ||
while($row = mysqli_fetch_assoc($result)) | ||
{ | ||
echo "Artist name: " . $row["aname"]. "<br>"; | ||
echo " Track Name: " . $row["stitle"]. "<br>"; | ||
echo "Year :" . $row["year"] . "<br>"; | ||
echo "Count :" . $row["count"] ."<br>"; | ||
|
||
$ho = $row["link"]; | ||
|
||
echo "<audio controls='controls'>"; | ||
echo "<source src='$ho' />"; | ||
echo "</audio>"; | ||
echo "<br>"; | ||
echo "----------------------------------------"."<br>"; | ||
} | ||
} | ||
else | ||
{ | ||
echo "Niciun Rezultat Găsit :("; | ||
}?> | ||
</table> | ||
|
||
<br></br> | ||
<a href="dashboard.php" >Înapoi la Pagina Principală</a> | ||
|
||
</body> | ||
|
||
</html> | ||
|
||
|
||
|
||
<!-- PHP ZONE! Don't touch it --> | ||
<?php | ||
|
||
//Închidere Conexiune | ||
mysqli_close($link); | ||
|
||
?> |