Skip to content
Snippets Groups Projects
Commit 568a47ab authored by Akmal Fadlurohman's avatar Akmal Fadlurohman
Browse files

Menambahkan halaman edit preferred location

parent afad5b80
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
...@@ -72,3 +72,4 @@ a:hover { ...@@ -72,3 +72,4 @@ a:hover {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.editloc_container {
margin-top: 10%;
height: 50%;
}
.subheader {
height: 15%;
}
.title {
float: left;
}
.title h1 {
text-align: left;
margin: 0;
}
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
margin-bottom: 20%; margin-bottom: 20%;
display: flex; display: flex;
font-size: 1.7em; font-size: 1.7em;
letter-spacing: -5px;
} }
.login_header h1 { .login_header h1 {
margin: 0px 8px; margin: 0px 8px;
...@@ -58,6 +59,9 @@ ...@@ -58,6 +59,9 @@
float: left; float: left;
margin-top: 2%; margin-top: 2%;
} }
.login_field {
height: 30px;
}
.login_form { .login_form {
height: 30px; height: 30px;
} }
......
#profile_frame h1 {
text-align: left;
margin-top: 0;
}
.profile_container { .profile_container {
height: 70%; margin-top: 10%;
height: 50%;
} }
.profile_header { .subheader {
height: 15%; height: 15%;
} }
.profile_title { .title {
float: left; float: left;
} }
.profile_title h1 { .title h1 {
text-align: left; text-align: left;
margin: 0; margin: 0;
} }
.edit_profile_button { .edit_profile_button {
float: right; float: right;
margin-top: 0; margin-top: 10px;
margin-right: 10 px; margin-right: 10px;
} }
.myprofile { .profile_info_container {
text-align: center; text-align: center;
margin-top: 2%;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.profilepict_frame { .profile_pict_frame {
width: 100px; width: 100px;
height: 100px; height: 100px;
overflow: auto; overflow: auto;
...@@ -33,63 +31,84 @@ ...@@ -33,63 +31,84 @@
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.profilepict_frame img { .profile_pict_frame img {
display: inline; display: inline;
margin: 0 auto; margin: 0 auto;
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.profile_info { .profile_data_container {
height: 100px; height: 100px;
} }
#edit_profile_page { .edit_prefloc_button {
height: 550px; float: right;
width: 400px; margin-top: 10px;
} margin-right: 10px;
#edit_profile_page h1 {
text-align: left;
margin-top: 0;
}
#edit_profile_page input[type="text"] {
width: 180px;
} }
.edit_profile_frame { .edit_profile_container {
text-align: left; margin-top: 10%;
overflow-y: scroll; overflow-y: scroll;
height: 415px; height: 72%;
} }
.edit_image_frame { .change_profilepict {
float: left; display: flex;
width: 100px; height: 25%;
width: 100%;
margin-bottom: 5%;
}
.current_pict_frame {
width: 170px;
height: 100px; height: 100px;
overflow: auto; overflow: auto;
border-radius: 50%; border-radius: 50%;
margin-left: 5%;
} }
.edit_image_frame img { .current_pict_frame img {
display: inline;
margin: 0 auto;
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.select_pict { .pict_name_field {
display: flex; margin-top: 35px;
position: relative; margin-left: 5%;
top: 35px;
left: 5px;
} }
.browse_file { .pict_name_field input {
display: flex; width: 100%;
position: absolute; }
top: 37px; .pict_picker_frame {
left: 300px; margin-top: 37px;
} }
input.upload_file { .pict_picker_frame input {
border: 0px;
}
.current_profile {
height: 25%;
width: 100%;
display: flex; display: flex;
position: relative; }
display: inline; .form_name {
text-align: right; height: 100px;
left: 0px; width: 115px;
height: 17px; margin-left: 5%;
width: 100px; margin-right: 5%
}
.form_field {
height: 100px;
width: 250px;
}
.form_field input {
width: 100%;
}
.back {
width: 39px;
text-align: center;
padding: 3px;
font-size: 0.8em;
}
.save {
width: 50px;
} }
#profile_link { #profile_link {
background-color: #465d43; background-color: #465d43;
} }
\ No newline at end of file
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<form name="login" method="POST" action="login.php" onsubmit="return validate();"> <form name="login" method="POST" action="login.php" onsubmit="return validate();">
<div class="login_container"> <div class="login_container">
<div class="form_name"> <div class="form_name">
<div class="login_form"> <div class="login_field">
Username Username
</div> </div>
<div class="login_form"> <div class="login_field">
Password Password
</div> </div>
</div> </div>
......
<html>
<head>
<title>U Wanna Call Me Beibh?</title>
<link rel="stylesheet" type="text/css" href="../css/default_style.css">
<link rel="stylesheet" type="text/css" href="../css/location.css">
<link rel="stylesheet" type="text/css" href="../css/header.css">
</head>
<body>
<div class="frame">
<div class="header">
<?php
$user_id = $_GET['id'];
include '../database/dbconnect.php';
$query=mysqli_query($con,"SELECT * FROM user WHERE user_id='".$user_id."'") or die(mysqli_error());
if(mysqli_num_rows($query)!=0)
{
$row=mysqli_fetch_assoc($query);
$username = $row['username'];
include("../template/header.php");
}
mysqli_close($con);
?>
</div>
<div class="menu_container">
<?php include'../template/menu.php';?>
</div>
<div class="editloc_container">
<div class="subheader">
<div class="title"><h1>Edit Preferred Loaction</h1></div>
</div>
</div>
</body>
</html>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="../css/switch.css"> <link rel="stylesheet" type="text/css" href="../css/switch.css">
</head> </head>
<body> <body>
<div class="frame" id="edit_profile_page"> <div class="frame">
<div class="header"> <div class="header">
<?php <?php
$user_id = $_GET['id']; $user_id = $_GET['id'];
...@@ -24,56 +24,56 @@ ...@@ -24,56 +24,56 @@
mysqli_close($con); mysqli_close($con);
?> ?>
</div> </div>
<div class="menu"> <div class="menu_container">
<?php include '../template/menu.php';?> <?php include'../template/menu.php';?>
</div> </div>
<h1>Edit Profile</h1> <div class="edit_profile_container">
<div class="edit_profile_frame"> <div class="subheader">
<div class="title"><h1>My Profile</h1></div>
</div>
<form name="edit_identity" method="POST" action="update_profile.php" enctype="multipart/form-data"> <form name="edit_identity" method="POST" action="update_profile.php" enctype="multipart/form-data">
<div> <div class="change_profilepict">
<div style="display: inline-block; position: relative; margin-left: 20px; height: 100px; width: 300px;"> <div class="current_pict_frame">
<div class="edit_image_frame"> <img id="current_profile_pict" src="../img/default_profile.jpeg">
<img id="edit_profile_pict" src="../img/default_profile.jpeg"> </div>
<div class="pict_name_field">
<input id="file_name" type="text" readonly="readonly">
</div>
<div class="pict_picker_frame">
<input type="file" name="profile_pictfile" class="upload_file" onchange="showFileName(this);">
</div>
</div>
<div class="current_profile">
<div class="form_name">
<div style="height: 30px;">
Your Name
</div> </div>
<div class="select_pict"> <div style="height: 30px;">
<input id="file_name" type="text" readonly="readonly"> Phone
</div> </div>
<div class="browse_file"> <div style="height: 30px;">
<input type="file" name="profile_pictfile" class="upload_file" onchange="showFileName(this);"> Status Driver
</div> </div>
</div> </div>
<div style="display: inline; position: relative; margin-left: 20px; top: 20px;"> <div class="form_field">
<div style="display: inline-block; position: relative; height: 100px; width: 100px;"> <div style="height: 30px;">
<div style="height: 30px;"> <input id="current_name" name="edit_name" type="text">
Your Name </div>
</div> <div style="height: 30px;">
<div style="height: 30px;"> <input id="current_phone" name="edit_phone" type="text">
Phone
</div>
<div style="height: 30px;">
Status Driver
</div>
</div> </div>
<div style="display: inline-block; position: absolute; height: 100px; width: 250px;"> <div style="height: 30px;">
<div style="height: 30px; margin-left: 10px;"> <label class="switch" style="float: right;">
<input id="current_name" name="edit_name" type="text" style="height: 20px; width: 260px;"> <input type="checkbox" name="is_driver" value="true">
</div> <span class="slider round"></span>
<div style="height: 30px; margin-left: 10px;"> </label>
<input id="current_phone" name="edit_phone" type="text" style="height: 20px; width: 260px;">
</div>
<div style="height: 30px; margin-left: 10px;">
<label class="switch" style="float: right;">
<input type="checkbox" name="is_driver" value="true">
<span class="slider round"></span>
</label>
</div>
</div> </div>
</div> </div>
</div> </div>
<div> <div class="edit_profile_nav">
<a href=<?php echo 'profile.php?id='.$user_id; ?>><div class="button red back" style="float: left; margin-left: 20px;">BACK</div></a>
<input type="submit" value="SAVE" style="float: right;" class="button green save">
<input id="hidden_userid" name="hidden_userid" type="text" style="display:none;"> <input id="hidden_userid" name="hidden_userid" type="text" style="display:none;">
<button class="button" style="float: left;"><a href="profile.php">BACK</a></button>
<input type="submit" value="SAVE" style="float: right;" class="button">
</div> </div>
</form> </form>
</div> </div>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
echo "<script>document.getElementById('current_name').value = '".$row['name']."'</script>"; echo "<script>document.getElementById('current_name').value = '".$row['name']."'</script>";
echo "<script>document.getElementById('current_phone').value = '".$row['phone']."'</script>"; echo "<script>document.getElementById('current_phone').value = '".$row['phone']."'</script>";
if (isset($row['pict'])) { if (isset($row['pict'])) {
echo "<script>document.getElementById('edit_profile_pict').src ='getProfilePict.php?id=".$user_id."'</script>"; echo "<script>document.getElementById('current_profile_pict').src ='getProfilePict.php?id=".$user_id."'</script>";
} }
echo "<script>document.getElementById('hidden_userid').value =".$user_id."</script>"; echo "<script>document.getElementById('hidden_userid').value =".$user_id."</script>";
?> ?>
......
...@@ -29,16 +29,16 @@ ...@@ -29,16 +29,16 @@
<div class="menu_container"> <div class="menu_container">
<?php include'../template/menu.php';?> <?php include'../template/menu.php';?>
</div> </div>
<div class="profile_container"> <div class="top_container">
<div class="profile_header"> <div class="subheader">
<div class="profile_title"><h1>My Profile</h1></div> <div class="title"><h1>My Profile</h1></div>
<div class="edit_profile_button"><a href=<?php echo 'edit_profile.php?id='.$user_id; ?>>✎</a></div> <div class="edit_profile_button"><a href=<?php echo 'edit_profile.php?id='.$user_id; ?>>✎</a></div>
</div> </div>
<div class="myprofile"> <div class="profile_info_container">
<div class="profilepict_frame"> <div class="profile_pict_frame">
<img id="profile_pict" src="../img/default_profile.jpeg"> <img id="profile_pict" src="../img/default_profile.jpeg">
</div> </div>
<div class="profile_info"> <div class="profile_data_container">
<?php <?php
echo "</br><strong>".$row['username']."</strong></br>"; echo "</br><strong>".$row['username']."</strong></br>";
echo $row['name']."</br>"; echo $row['name']."</br>";
...@@ -54,6 +54,12 @@ ...@@ -54,6 +54,12 @@
</div> </div>
</div> </div>
</div> </div>
<div class="top_container">
<div class="subheader">
<div class="title"><h1>Preferred Locations</h1></div>
<div class="edit_prefloc_button"><a href=<?php echo 'edit_location.php?id='.$user_id; ?>>✎</a></div>
</div>
</div>
</div> </div>
</body> </body>
</html> </html>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment