Add new views and styles for music application
- 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.
This commit is contained in:
24
request/post/register.post.php
Normal file
24
request/post/register.post.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$newUser = false;
|
||||
if (isset($_POST['username']) && isset($_POST['password']) && isset($_POST['rpassword'])) {
|
||||
if (!$user->exists($_POST['username'])) {
|
||||
if (strpos('_' . $_POST['username'], ' ') <= 0) {
|
||||
if ($_POST['password'] == $_POST['rpassword']) {
|
||||
$user->newUser($_POST);
|
||||
$message = 'Usuario creado con exito!';
|
||||
$newUser = true;
|
||||
} else {
|
||||
$message = "Las claves no coinciden.";
|
||||
}
|
||||
} else {
|
||||
$message = "El nombre de usuario <b>\"{$_POST['username']}\"</b> no debe tener espacios.";
|
||||
}
|
||||
} else {
|
||||
$message = "El usuario <b>{$_POST['username']}</b> existe.";
|
||||
}
|
||||
}
|
||||
|
||||
header("location: ./?view=$view&newuser=$newUser&message=$message");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user