Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IF3110-2018-K03-Petjah
TugasBesar1_2018
Commits
2f84fae3
Commit
2f84fae3
authored
Oct 26, 2018
by
Erma Safira Nurmasyita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Profile picture problem display
parent
b70fe0c3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
177 deletions
+20
-177
web/book_detail/view.html
web/book_detail/view.html
+0
-85
web/book_detail/view.php
web/book_detail/view.php
+4
-4
web/css/search_result.css
web/css/search_result.css
+4
-3
web/javascript/review-book.js
web/javascript/review-book.js
+9
-10
web/registration/controller.php
web/registration/controller.php
+1
-1
web/review/view.html
web/review/view.html
+0
-72
web/review/view.php
web/review/view.php
+1
-1
web/search_result/view.php
web/search_result/view.php
+1
-1
No files found.
web/book_detail/view.html
deleted
100644 → 0
View file @
b70fe0c3
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
Book Detail
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../css/header.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../css/color-lib.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../css/basic.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"../css/book_detail.css"
/>
<script
type=
"text/javascript"
src=
"../js/order-book.js"
></script>
</head>
<body>
<div
class=
"detail-container"
>
<div
class=
"flex-container book-detail"
>
<div
class=
"flex-1 book-desc"
>
<div
class=
"orange-text text-size-50"
>
Judul Buku
</div>
<div
id=
"lucu"
class=
"book-author"
>
Pengarang
</div>
<div
class=
"text-size-20"
>
Buku ini adalah dsajdjdsfjdsbvfbdhvbfd lorem ipsum dolor sit a
</div>
</div>
<div
class=
"add-flex-direction-column book-desc"
align=
"center"
>
<div
class=
"flex-1"
>
<img
id=
"book-pict"
src=
"../images/books_picture/4.jpg"
>
</div>
<div
class=
"rating-pict"
>
<img
class=
"rating"
src=
"../svgIcon/star-filled.svg"
>
<img
class=
"rating"
src=
"../svgIcon/star-filled.svg"
>
<img
class=
"rating"
src=
"../svgIcon/star-filled.svg"
>
<img
class=
"rating"
src=
"../svgIcon/star-filled.svg"
>
<img
class=
"rating"
src=
"../svgIcon/star.svg"
>
</div>
<div
class=
"text-size-20"
>
5.0/5.0
</div>
</div>
</div>
<div
class=
"book-detail"
>
<div
class=
"text-size-30"
>
Order
</div>
<div
class=
"order-select"
>
<label>
Jumlah:
</label>
<select
id=
"order-qty"
>
<option
value=
"1"
>
1
</option>
<option
value=
"2"
>
2
</option>
<option
value=
"3"
>
3
</option>
<option
value=
"4"
>
4
</option>
<option
value=
"5"
>
5
</option>
</select>
</div>
<div
align=
"right"
>
<button
class=
"order-button light-blue"
onclick=
"orderBook(1)"
>
Order
</button>
</div>
</div>
<div
class=
"book-detail"
>
<div
class=
"text-size-30"
>
Reviews
</div>
<div
class=
"flex-review-tab"
>
<div>
<img
id=
"profile_pict"
src=
"../images/profiles_picture/baron44.jpg"
>
</div>
<div
class=
"review-desc"
>
<div
class=
"text-size-20"
>
@heitayo
</div>
<div
class=
"text-size-20"
>
Waw keren juga ya asique. lalal yeye llalala yayayay yeyeyeye. lalal yeye llalala yayayay yeyeyeye. lalal yeye llalala yayayay yeyeyeye
</div>
</div>
<div
class=
"add-flex-direction-column"
>
<img
id=
"star-icon"
src=
"../svgIcon/star-filled.svg"
>
<div
class=
"text-size-20"
align=
"center"
>
5.0/5.0
</div>
</div>
</div>
<div
class=
"flex-review-tab"
>
<div
class=
"picture"
>
<img
id=
"profile_pict"
src=
"../images/profiles_picture/baron44.jpg"
>
</div>
<div
class=
"flex-1 book-desc"
>
<div
class=
"text-size-20"
>
@heitayo
</div>
<div
class=
"text-size-20"
>
Waw keren juga ya asique. lalal
</div>
</div>
<div
class=
"add-flex-direction-column"
>
<img
id=
"star-icon"
src=
"../svgIcon/star-filled.svg"
>
<div
class=
"rating-numeric text-size-20"
align=
"center"
>
5.0/5.0
</div>
</div>
</div>
</div>
</div>
<div
id=
"modal-container"
></div>
</body>
</html>
\ No newline at end of file
web/book_detail/view.php
View file @
2f84fae3
...
@@ -75,10 +75,10 @@
...
@@ -75,10 +75,10 @@
return
'/images/books_picture/default.jpg'
;
return
'/images/books_picture/default.jpg'
;
}
}
}
else
{
}
else
{
if
(
fileProcessing
::
isExistProfileImage
(
$input
))
{
if
(
$input
==
"null"
)
{
return
fileProcessing
::
getImageProfilePathFromRoot
(
$input
);
}
else
{
return
'/images/profiles_picture/default.jpg'
;
return
'/images/profiles_picture/default.jpg'
;
}
else
{
return
'/uploads/'
.
$input
;
}
}
}
}
}
}
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
<div class="flex-container align-items-flex-start">
<div class="flex-container align-items-flex-start">
<div class="flex-1 flex-review-tab">
<div class="flex-1 flex-review-tab">
<div class="reviewer-profile">
<div class="reviewer-profile">
<img id="profile_pict" src="'
.
self
::
showPicture
(
'user'
,
$review
[
'
usernam
e'
])
.
'">
<img id="profile_pict" src="'
.
self
::
showPicture
(
'user'
,
$review
[
'
profile_pictur
e'
])
.
'">
</div>
</div>
<div id="comment-user">
<div id="comment-user">
<div id="reviewer">@'
.
$review
[
'username'
]
.
'</div>
<div id="reviewer">@'
.
$review
[
'username'
]
.
'</div>
...
...
web/css/search_result.css
View file @
2f84fae3
...
@@ -11,9 +11,10 @@ h1{
...
@@ -11,9 +11,10 @@ h1{
}
}
.title-right
{
.title-right
{
flex-basis
:
250px
;
margin-top
:
6%
;
margin-top
:
5%
;
margin-left
:
15%
;
margin-left
:
26%
;
color
:
#7A7A7A
;
/*margin-left: 26%;*/
}
}
.title-container
{
.title-container
{
...
...
web/javascript/review-book.js
View file @
2f84fae3
...
@@ -41,19 +41,18 @@ function isEmptyRating() {
...
@@ -41,19 +41,18 @@ function isEmptyRating() {
}
}
function
trySubmitSearch
()
{
function
trySubmitSearch
()
{
var
valid
=
true
;
if
(
isEmptyCommentBar
())
{
if
(
isEmptyCommentBar
())
{
document
.
getElementById
(
"
comment-area
"
).
style
.
display
=
'
table
'
;
document
.
getElementById
(
"
comment-area
"
).
style
.
display
=
'
table
'
;
valid
=
false
;
}
else
{
document
.
getElementById
(
"
comment-area
"
).
style
.
display
=
'
none
'
;
}
}
if
(
isEmptyRating
())
{
if
(
isEmptyRating
())
{
document
.
getElementById
(
"
rating-area
"
).
style
.
display
=
'
table
'
;
document
.
getElementById
(
"
rating-area
"
).
style
.
display
=
'
table
'
;
valid
=
false
;
}
else
{
document
.
getElementById
(
"
rating-area
"
).
style
.
display
=
'
none
'
;
}
}
}
return
valid
;
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
function
()
{
\ No newline at end of file
document
.
getElementById
(
'
comment
'
).
addEventListener
(
'
keypress
'
,
function
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
event
.
preventDefault
();
trySubmitSearch
();
}
});
},
false
);
\ No newline at end of file
web/registration/controller.php
View file @
2f84fae3
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
if
(
$conn
!==
NULL
)
{
if
(
$conn
!==
NULL
)
{
$sql_query
=
'INSERT INTO user (name, username, password, email, address, phone, profile_picture)
$sql_query
=
'INSERT INTO user (name, username, password, email, address, phone, profile_picture)
VALUES ("'
.
$name
.
'", "'
.
$username
.
'", "'
.
$password
.
'", "'
VALUES ("'
.
$name
.
'", "'
.
$username
.
'", "'
.
$password
.
'", "'
.
$email
.
'", "'
.
$address
.
'", "'
.
$phonenumber
.
'", "
'
.
$username
.
'
")'
;
.
$email
.
'", "'
.
$address
.
'", "'
.
$phonenumber
.
'", "
null
")'
;
$result
=
$conn
->
query
(
$sql_query
);
$result
=
$conn
->
query
(
$sql_query
);
$conn
->
close
();
$conn
->
close
();
...
...
web/review/view.html
deleted
100644 → 0
View file @
b70fe0c3
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
Book Review
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../css/header.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../css/color-lib.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../css/basic.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"../css/review.css"
/>
<script
type=
"text/javascript"
src=
"../javascript/review-book.js"
></script>
</head>
<body>
<div
class=
"detail-container add-nunito-font"
>
<div
class=
"flex-container book-detail"
>
<div
class=
"flex-1"
>
<div
class=
"book-title orange-text"
><b>
Judul Buku
</b></div>
<div
class=
"book-author"
><b>
Pengarang
</b></div>
</div>
<div
class=
"add-flex-direction-column"
id=
"rightbar-pic"
align=
"center"
>
<div
class=
"flex-1"
>
<img
id=
"book-pict"
src=
"../images/books_picture/4.jpg"
>
</div>
</div>
</div>
<form
action=
"submit_review.php"
method=
"POST"
>
<div
class=
"book-detail"
>
<div
class=
"head-title"
>
Add Rating
</div>
<div
class=
"order-select"
>
<div
class=
"rating-pict"
>
<input
type=
"image"
id=
"star1"
class=
"fivestar-rating"
onclick=
"ratingClick(this.value); return false;"
src=
"../svgIcon/star.png"
value=
"1"
onmouseout=
"noHoverStar(this.value)"
onmouseover=
"hoverStar(this.value)"
>
<input
type=
"image"
id=
"star2"
class=
"fivestar-rating"
onclick=
"ratingClick(this.value); return false;"
src=
"../svgIcon/star.png"
value=
"2"
onmouseout=
"noHoverStar(this.value)"
onmouseover=
"hoverStar(this.value)"
>
<input
type=
"image"
id=
"star3"
class=
"fivestar-rating"
onclick=
"ratingClick(this.value); return false;"
src=
"../svgIcon/star.png"
value=
"3"
onmouseout=
"noHoverStar(this.value)"
onmouseover=
"hoverStar(this.value)"
>
<input
type=
"image"
id=
"star4"
class=
"fivestar-rating"
onclick=
"ratingClick(this.value); return false;"
src=
"../svgIcon/star.png"
value=
"4"
onmouseout=
"noHoverStar(this.value)"
onmouseover=
"hoverStar(this.value)"
>
<input
type=
"image"
id=
"star5"
class=
"fivestar-rating"
onclick=
"ratingClick(this.value); return false;"
src=
"../svgIcon/star.png"
value=
"5"
onmouseout=
"noHoverStar(this.value)"
onmouseover=
"hoverStar(this.value)"
>
<!-- Rating value submitted via POST Method-->
<input
name=
"rating-value"
id=
"rating-given"
type=
"hidden"
value=
"0"
>
<input
name=
"order-id"
type=
"hidden"
value=
"0"
>
<input
name=
"book-id"
type=
"hidden"
value=
"0"
>
</div>
</div>
</div>
<div
class=
"book-detail"
>
<div
class=
"head-title"
>
Add Comment
</div>
<div
class=
"flex-review-tab"
>
<div
class=
"comment-bar"
>
<textarea
id=
"textarea-comment"
name=
"comment"
cols=
"180"
rows=
"5"
></textarea>
</div>
</div>
</div>
<div
class=
"review-button"
>
<div>
<button
class=
"back-button c-button"
type=
"button"
onClick=
"window.history.back()"
>
Back
</button>
<button
class=
"submit-button c-button light-blue"
type=
"submit"
>
Submit
</button>
</div>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
web/review/view.php
View file @
2f84fae3
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
private
function
showReviewForm
(
$order_id
,
$book_id
)
{
private
function
showReviewForm
(
$order_id
,
$book_id
)
{
$str
=
'
$str
=
'
<form id="book-review" action="review/submit_review.php" method="POST">
<form id="book-review" action="review/submit_review.php"
onsubmit="return trySubmitSearch()"
method="POST">
<div class="book-detail">
<div class="book-detail">
<div class="head-title">Add Rating</div>
<div class="head-title">Add Rating</div>
<div class="order-select">'
.
<div class="order-select">'
.
...
...
web/search_result/view.php
View file @
2f84fae3
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div class="rows">
<div class="rows">
<div class="title-container">
<div class="title-container">
<div class="title-left"><h1>Search Result</h1></div>
<div class="title-left"><h1>Search Result</h1></div>
<div class="title-right"><p class="tRight">Found <u>'
.
$params
[
"item"
]
->
num_rows
.
'</u> result(s)
.
</p></div>
<div class="title-right"><p class="tRight">Found <u>'
.
$params
[
"item"
]
->
num_rows
.
'</u> result(s)</p></div>
</div>
</div>
'
;
'
;
$end
=
'
$end
=
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment