- Created new CSS files for styling the application, including home.css and style.css. - Implemented 403 and 404 error views with appropriate messages and navigation. - Developed a dump view to display deleted elements with restoration options. - Enhanced home view to include music search functionality and display results. - Added listplay view for managing music playlists, including creation and deletion options. - Implemented loadmusic view for uploading new music with necessary fields. - Created login and register views for user authentication. - Developed sound view to display individual music tracks with playback controls and options for liking and deleting. - Updated menu view to include navigation links based on user authentication status.
26 lines
603 B
PHP
26 lines
603 B
PHP
<?php
|
|
|
|
session_start();
|
|
|
|
class Session{
|
|
public static function Auth(){
|
|
return isset($_SESSION['LOGIN'])?$_SESSION['LOGIN']:false;
|
|
}
|
|
|
|
public static function Admin(){
|
|
return isset($_SESSION['privileges'])?$_SESSION['privileges']:false;
|
|
}
|
|
|
|
public static function getUsername(){
|
|
return isset($_SESSION['username'])?$_SESSION['username']:null;
|
|
}
|
|
|
|
public static function getUserID(){
|
|
return isset($_SESSION['idUser'])?$_SESSION['idUser']:0;
|
|
}
|
|
|
|
public static function logout(){
|
|
unset($_SESSION);
|
|
session_destroy();
|
|
}
|
|
} |