Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
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
f5b469de
Commit
f5b469de
authored
Oct 26, 2018
by
Erma Safira Nurmasyita
Browse files
Options
Browse Files
Download
Plain Diff
Resolve conflict
parents
2f84fae3
2f899331
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
193 additions
and
17 deletions
+193
-17
data/web3.sql
data/web3.sql
+161
-0
web/css/edit_profile.css
web/css/edit_profile.css
+23
-11
web/edit_profile/edit_profile.php
web/edit_profile/edit_profile.php
+5
-5
web/edit_profile/view.php
web/edit_profile/view.php
+1
-1
web/javascript/edit_profile.js
web/javascript/edit_profile.js
+3
-0
No files found.
data/web3.sql
0 → 100644
View file @
f5b469de
This diff is collapsed.
Click to expand it.
web/css/edit_profile.css
View file @
f5b469de
...
...
@@ -4,7 +4,7 @@
}
.left2
{
flex-basis
:
28%
;
padding-left
:
20px
;
/*
padding-left:
1.5%; */
padding-top
:
2.5%
;
}
...
...
@@ -14,16 +14,17 @@ h1 {
.right
{
flex-basis
:
90%
;
width
:
fit-content
;
align-content
:
left
;
padding-left
:
5%
;
margin-top
:
2.5%
;
padding-right
:
9
%
;
padding-right
:
5
%
;
}
.right2
{
flex-basis
:
72%
;
align-content
:
left
;
padding-right
:
1
5%
;
/*
padding-right: 5%;
*/
padding-top
:
30px
;
}
...
...
@@ -36,9 +37,10 @@ h1 {
.cols
{
display
:
flex
;
width
:
fit-content
;
flex-wrap
:
wrap
;
flex-direction
:
column
;
marg
in-left
:
10
0px
;
padd
in
g
-left
:
5
0px
;
}
.rows1
{
display
:
flex
;
...
...
@@ -53,13 +55,13 @@ h1 {
display
:
flex
;
flex-wrap
:
nowrap
;
flex-direction
:
row
;
marg
in-left
:
1
0
0px
;
padd
in
g
-left
:
1
5
0px
;
justify-content
:
space-around
;
height
:
80px
;
}
.rows
{
marg
in-left
:
1
0
0px
;
padd
in
g
-left
:
1
5
0px
;
display
:
flex
;
flex-wrap
:
nowrap
;
flex-direction
:
row
;
...
...
@@ -100,14 +102,16 @@ h1 {
padding
:
8px
10px
;
border-radius
:
8px
;
font-size
:
20px
;
width
:
fit-content
;
}
.upload-btn-wrapper
input
[
type
=
file
]
{
font-size
:
50px
;
position
:
absolute
;
width
:
fit-content
;
left
:
0
;
top
:
0
;
opacity
:
0
;
opacity
:
0
0
;
}
#profpict_dummy
{
...
...
@@ -133,8 +137,9 @@ input[type=file]{
color
:
transparent
;
}
.
profpict_dummy
{
#
profpict_dummy
{
width
:
500px
;
margin-left
:
0
;
}
input
[
type
=
text
]
{
...
...
@@ -143,10 +148,14 @@ input[type=text]{
font-weight
:
500
;
letter-spacing
:
1px
;
font-size
:
32px
;
margin-left
:
50px
;
padding-left
:
10px
;
}
textarea
{
width
:
625px
;
margin-left
:
50px
;
padding-left
:
10px
;
font-size
:
32px
;
}
...
...
@@ -180,14 +189,17 @@ textarea{
#warning-1
{
visibility
:
hidden
;
width
:
625px
;
width
:
620px
;
margin-left
:
50px
;
}
#warning-2
{
visibility
:
hidden
;
width
:
625px
;
width
:
620px
;
margin-left
:
50px
;
}
#warning-3
{
visibility
:
hidden
;
width
:
625px
;
width
:
620px
;
margin-left
:
50px
;
}
web/edit_profile/edit_profile.php
View file @
f5b469de
...
...
@@ -22,11 +22,11 @@
}
// echo $update_name;
$update
=
setUserProfile
(
$user_id
,
$update_name
,
$update_address
,
$update_phone
,
$name
,
$tmp_name
);
if
(
$update
==
0
){
echo
"<script type='text/javascript'>alert 'Update Failed';</script>"
;
}
else
{
echo
"<script type='text/javascript'>alert 'Update Success';</script>"
;
}
//
if ($update == 0){
//
echo "<script type='text/javascript'>alert 'Update Failed';</script>";
//
} else{
//
echo "<script type='text/javascript'>alert 'Update Success';</script>";
//
}
header
(
'Location: ../profile'
);
exit
;
?>
\ No newline at end of file
web/edit_profile/view.php
View file @
f5b469de
...
...
@@ -48,7 +48,7 @@
<div class="flex-container">
<input id="profpict_dummy" class="profpict_dummy"type="text" name="profile_picture2" readonly>
<div class="upload-btn-wrapper">
<button class="btn">Browse
...</button>
<button class="btn">Browse...</button>
<input id="profpict" type="file" name="profile_picture" accept="image/png, image/jpg, image/jpeg" onchange="showname()" >
</div>
</div>
...
...
web/javascript/edit_profile.js
View file @
f5b469de
...
...
@@ -71,6 +71,9 @@ function validateForm(){
// alert(false);
if
(
isNameEmpty
==
true
){
document
.
getElementById
(
"
warning-1
"
).
style
.
visibility
=
'
visible
'
;
}
else
if
(
isNameTooLong
==
true
){
document
.
getElementById
(
"
warning-1
"
).
style
.
visibility
=
'
visible
'
;
document
.
getElementById
(
"
warning-1
"
).
innerHTML
=
'
Name must be under 20 characters.
'
;
}
if
(
isAddressEmpty
==
true
){
document
.
getElementById
(
"
warning-2
"
).
style
.
visibility
=
'
visible
'
;
...
...
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