diff --git a/app/controller/user/UserUsecase.php b/app/controller/user/UserUsecase.php index 8bf764968cf349028f23263f3d50e8b12a9ae20d..334cd56727243f0ff8ee2b04230b0c8c90ee3ec9 100644 --- a/app/controller/user/UserUsecase.php +++ b/app/controller/user/UserUsecase.php @@ -60,7 +60,6 @@ $id = getJwtData($_COOKIE["Authorization"])->user_id; $user = $this->userDb->getUserById($id); if ($user){ - $imageFile = $_FILES["profile_picture"]; $uploadImage = $this->userDb->uploadImage($imageFile); diff --git a/app/view/profile.php b/app/view/profile.php index 5891440f049af77cfdc5da71946d0e166daab918..e279556d0f620f8239233807f363d5e4905ffde4 100644 --- a/app/view/profile.php +++ b/app/view/profile.php @@ -9,7 +9,7 @@ </div> <div class="profile-picture-container"> <img src="<?= $user->imgPath ?>" class="profile-img"> - <h1 class="profile-name" id="profile_name"><?= $user->fullname?></h1> + <h1 class="profile-name" id="profile_name"><?php echo $user->fullname ?></h1> </div> <div class="profile-picture-container"> <a href="/profile/edit/"><img src="/static/img/pencil.png" class="edit-icon"></a> diff --git a/config/devel.php b/config/devel.php index 608929744fc9414526ce34dcb411acc6728a39b4..6746a909f6f3ada19a139f2c5b18610e8e394f9a 100644 --- a/config/devel.php +++ b/config/devel.php @@ -3,7 +3,7 @@ "db" => array( "host" => "localhost", "user" => "root", - "password" => "rinda123", + "password" => "06071998", "db_name" => "tayo_book_store" ), "base_url" => "http://localhost:4000/", diff --git a/public/static/css/base.css b/public/static/css/base.css index 8d459c1514de44a73b3fe6de50ddfd9a8e29210e..3129920298d713ff408b8504ddc0960131124b15 100644 --- a/public/static/css/base.css +++ b/public/static/css/base.css @@ -41,4 +41,8 @@ body { display: flex; flex-direction: row; flex-wrap: wrap; +} + +* { + font-family: 'Nunito', sans-serif; } \ No newline at end of file diff --git a/public/static/css/header.css b/public/static/css/header.css index fcbe2e27d99de0ce2ff84ab297997d88a12453bf..c046ba671b12ce16cfcc8cb36fcb1a2afd9bc895 100644 --- a/public/static/css/header.css +++ b/public/static/css/header.css @@ -6,13 +6,13 @@ nav { display: flex; flex-flow: column; width:100%; - height:20%; + height:175px; background-color:#0095C7; } #header{ width: 100%; - height: 50%; + height: 95px; background-color:#00AFEA; display: flex; font-family: 'Courier New', Courier, monospace; @@ -40,7 +40,8 @@ nav { color: white; font-weight: bold; margin-left: 25px; - padding: 25px; + padding-top: 15px; + padding-left: 20px; display: inline; /* justify-self: flex-start; */ } @@ -58,7 +59,7 @@ nav { } #menu { - height: 100%; + height: 80px; display: grid; width:100%; grid-template-columns: repeat(3,auto); diff --git a/public/static/css/profile.css b/public/static/css/profile.css index bd5e6d96363ae105e7e794455b8a51846743d77f..8470990426ab29d4bc6308bfa58210a624e1ed8b 100644 --- a/public/static/css/profile.css +++ b/public/static/css/profile.css @@ -9,7 +9,7 @@ body{ .profile-picture-jumbotron { min-height: 50%; - max-height: 70%; + padding: 20px; background-color: #003B4C; display: flex; justify-content: center; @@ -18,14 +18,13 @@ body{ .profile-picture-container{ margin: 0 auto; - width: 50%; padding:1.5%; text-align: center; } .profile-img { - height: 70%; - width: 50%; + height: 300px; + width: 300px; border-radius : 100%; border: 10pt solid yellow; background: url("/static/img/profile.png"); diff --git a/public/static/html/edit-profile.html b/public/static/html/edit-profile.html deleted file mode 100644 index adc2c984e1c0b0d636163847ee87c69f400f0549..0000000000000000000000000000000000000000 --- a/public/static/html/edit-profile.html +++ /dev/null @@ -1,45 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <title>Edit Profile</title> - <link rel="stylesheet" href="/static/css/edit-profile.css"> -</head> -<body> - <div class="edit-profile-container"> - <h1 class="edit-profile-headline">Edit Profile</h1> - <div class="edit-profile-content"> - <div class="edit-profile-picture"> - <img src="/static/img/tayoblue.jpg" class="edit-picture-img"> - <div class="edit-picture-input"> - <input type="text" class="picture-input-text" > - <input type="file" name="pic" accept="image/*" class="picture-input-file" > - </div> - </div> - <div class="edit-profile-identity"> - <div class="row"> - <span class="identity-column" >Name </span> - <input type="text" class="input-column" id="edit_name"> - </div> - <div class="row"> - <span class="identity-column">Address </span> - <textarea class="input-column" rows="10" id="edit_address"></textarea> - </div> - <div class="row"> - <span class="identity-column">Phone Number </span> - <input type="text" class="input-column" id="edit_phone"> - </div> - </div> - - <div class="edit-button-container"> - <button class="edit-button orange-button" id="back_button">BACK</button> - <button class="edit-button blue-button" id="save_button">SAVE</button> - </div> - </div> - - - </div> - -</body> -<script src="/static/js/edit-profile.js"></script> -</html> \ No newline at end of file diff --git a/public/static/html/header.html b/public/static/html/header.html deleted file mode 100644 index 12ea60763c5d68b743cd8313ff64996c4ee37487..0000000000000000000000000000000000000000 --- a/public/static/html/header.html +++ /dev/null @@ -1,18 +0,0 @@ -<link rel="stylesheet" href="/static/css/base.css"> -<link rel="stylesheet" href="/static/css/header.css"> -<nav> - <div id="header"> - <div id="logo"> - <span style="color:#FFEC5D;">Pro</span><span>-Book</span> - </div> - <div class="right-header"> - <a href="" id="header_username">Hi Username</a> - <a href="/logout/"><img id="logout_img" src="/static/img/logout.png"></a> - </div> - </div> - <div id="menu"> - <a href ="/browse/" class="menu-item" id="menu_browse"> BROWSE </a> - <a href ="/history/" class="menu-item" id="menu_history"> HISTORY </a> - <a href ="/profile/" class="menu-item" id="menu_profile"> PROFILE </a> - </div> -</nav> \ No newline at end of file diff --git a/public/static/html/history.html b/public/static/html/history.html deleted file mode 100644 index 1b6b56528d35704d49be538d0d889de78e8f21a3..0000000000000000000000000000000000000000 --- a/public/static/html/history.html +++ /dev/null @@ -1,41 +0,0 @@ -<link rel="stylesheet" href="/static/css/base.css"> -<link rel="stylesheet" href="/static/css/history.css"> - -<div id="history"> - <div id="title">History</div><br> - - <div class="book-container"> - <div class="bc1"> - <img src="/static/img/contoh_buku.png" class="imghistory"> - <div class="booktitle">Nota Hidup</div> - <div id="jumlah">Jumlah : </div> - <div class="banyakjumlah">1</div> - <div class="status">Anda sudah memberikan review</div> - </div> - <div class="bc2"> - <div class="waktupesan">30 September 2018</div><br> - <div class="order">2</div> - <div id="NoOrder">Nomor Order : #</div> - - </div> - </div> - <br><br> - <div class="book-container"> - <div class="bc1"> - <img src="/static/img/fantasticbis.jpeg" class="imghistory"> - <div class="booktitle">Bis Fantastis & Cara Menemukannya</div> - <div id="jumlah">Jumlah : </div> - <div class="banyakjumlah">10</div> - <div class="status">Belum direview</div> - </div> - <div class="bc2"> - <div class="waktupesan">28 September 2018</div><br> - <div class="order">1</div> - <div id="NoOrder">Nomor Order : #</div><br><br> - <div class="submit-review"> - <button class="submit-button">Review</button> - </div><br> - </div> - </div> - -</div> \ No newline at end of file diff --git a/public/static/html/profile.html b/public/static/html/profile.html deleted file mode 100644 index e4e9f5c2774a41d27191284b51d14a4326ae0312..0000000000000000000000000000000000000000 --- a/public/static/html/profile.html +++ /dev/null @@ -1,44 +0,0 @@ -<link rel="stylesheet" href="/static/css/profile.css"> -<div class="main-container"> - <div class="profile-picture-jumbotron"> - <div class="profile-picture-container"> - </div> - <div class="profile-picture-container"> - <img src="/static/img/tayoblue.jpg" class="profile-img"></img> - <h1 class="profile-name" id="profile_name">Username</h1> - </div> - <div class="profile-picture-container"> - <a href="/profile/edit/"><img src="/static/img/pencil.png" class="edit-icon"></a> - </div> - - - </div> - - <div class="detail-container"> - <h1 class="table-headline">My Profile</h1> - <table class="profile-table" cellpadding="15"> - <tr class="table-row" height=75> - <td width="10%" ><img class="profile-icon" src="/static/img/profile.png"></td> - <td width="40%">Username</td> - <td id="username_column">Tayo</td> - </tr> - <tr class="table-row" height=75> - <td><img class="profile-icon" src="/static/img/email.png"></td> - <td>Email</td> - <td id="email_column">email</td> - </tr> - <tr class="table-row" height=75> - <td><img class="profile-icon" src="/static/img/house.png"></td> - <td>Address</td> - <td id="address_column">address</td> - </tr> - <tr class="table-row" height=75> - <td><img class="profile-icon" src="/static/img/phone.png"></td> - <td>Phone Number</td> - <td id="phone_column">phone</td> - </tr> - </table> - </div> -</div> - -<script src="/static/js/profile.js"></script> \ No newline at end of file diff --git a/public/static/js/edit-profile.js b/public/static/js/edit-profile.js index 4aff9fcc2b536ad7daffa59b56e2b91ab96f7cf4..73c884aaf6d78f8220f563c8a2db1595fa647182 100644 --- a/public/static/js/edit-profile.js +++ b/public/static/js/edit-profile.js @@ -48,8 +48,6 @@ function enableValidatePhone(){ }); } - - function validateForm(){ enableValidateName(); enableValidateAddress(); diff --git a/util/Routing/Router.php b/util/Routing/Router.php index 6f5aac7cc622ef6993f6730afc12f7aab474e2fa..28810e313a5a99602ef0341aa0a92e131fe16fc6 100644 --- a/util/Routing/Router.php +++ b/util/Routing/Router.php @@ -84,8 +84,8 @@ } if(array_key_exists("Content-Type",$headers) && ($headers["Content-Type"] == "application/json") && $payload){ - $strPayload = trim(str_replace('_','',array_keys($payload)[0])); - $payload = json_decode($strPayload,true); + $strPayload = file_get_contents('php://input'); + $payload = json_decode($strPayload,TRUE); } $request = new Request($params, $payload, $headers, $queries);