diff --git a/app/api/anime_list/add.php b/app/api/anime_list/add.php new file mode 100644 index 0000000000000000000000000000000000000000..62083159ab46f8f59069acf43336857e34d3aeba --- /dev/null +++ b/app/api/anime_list/add.php @@ -0,0 +1,7 @@ +<?php +require_once(dirname(__DIR__,2).'/define.php'); +require_once(BASE_DIR.'/models/Anime_List.php'); + +$al = new Anime_List(); + +?> \ No newline at end of file diff --git a/app/api/anime_list/delete.php b/app/api/anime_list/delete.php new file mode 100644 index 0000000000000000000000000000000000000000..62083159ab46f8f59069acf43336857e34d3aeba --- /dev/null +++ b/app/api/anime_list/delete.php @@ -0,0 +1,7 @@ +<?php +require_once(dirname(__DIR__,2).'/define.php'); +require_once(BASE_DIR.'/models/Anime_List.php'); + +$al = new Anime_List(); + +?> \ No newline at end of file diff --git a/app/api/anime_list/edit.php b/app/api/anime_list/edit.php new file mode 100644 index 0000000000000000000000000000000000000000..62083159ab46f8f59069acf43336857e34d3aeba --- /dev/null +++ b/app/api/anime_list/edit.php @@ -0,0 +1,7 @@ +<?php +require_once(dirname(__DIR__,2).'/define.php'); +require_once(BASE_DIR.'/models/Anime_List.php'); + +$al = new Anime_List(); + +?> \ No newline at end of file diff --git a/app/public/style/list.css b/app/public/style/list.css index 3c13aa97d3cd97490639d896329fd2e07df91176..a09e76e9b59f4fd458c9542071da88be320c07c6 100644 --- a/app/public/style/list.css +++ b/app/public/style/list.css @@ -31,4 +31,11 @@ background-color: white; width: 400px; margin:auto; -} \ No newline at end of file +} + +.form-vertical { + display: flex; + flex-direction: column; + gap: 10px; /* Provides space between each item */ + width: 45%px; /* Adjust based on your preference */ +} diff --git a/app/views/Client/list.php b/app/views/Client/list.php index ed4a6bce642cf2410bafaaecf9bbb91a9cde5b2a..4aa3969e631ba31f0a1b38522645ecc370e73219 100644 --- a/app/views/Client/list.php +++ b/app/views/Client/list.php @@ -19,7 +19,7 @@ $isUserOwn = $al->getAnimeListByID($id)['client_id'] == $c->getClientByUsername( <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Error Page</title> + <title>Anime List Page</title> <link rel="stylesheet" href="../../public/style/global.css"> <link rel="stylesheet" href="../../public/style/list.css"> <script src='/public/handler/navbar.js'></script> @@ -30,6 +30,25 @@ $isUserOwn = $al->getAnimeListByID($id)['client_id'] == $c->getClientByUsername( if ($isUserOwn){ echo " <h1> Anime List ID $id </h1> + <form class='form-vertical' action='/api/anime_list/edit.php' method='post' enctype='multipart/form-data'> + <!-- Hidden input for client_id --> + <input type='hidden' id='editClientId' name='client_id'> + + <label for='editUserScore'>User Score</label> + <input type='text' id='editUserScore' name='user_score'> + + <label for='editProgress'>Progress:</label> + <input type='text' id='editProgress' name='progress'> + + <label for='editWatchStatus'>WatchStatus:</label> + <input type='text' id='editWatchStatus' name='watch_status' required> + + <label for='editReview'>Review:</label> + <input type='text' id='editReview' name='review'> + + + <input type='submit' value='Update Client'> + </form> "; } else { echo "