Skip to content
Snippets Groups Projects
Commit 50308e84 authored by Muhammad Umar Fariz Tumbuan's avatar Muhammad Umar Fariz Tumbuan
Browse files

Merge branch 'master' of http://gitlab.informatika.org/IF3110-2017-K02-OneHundred/TugasBesar1_2017

Aku ngedit dan nambah file baru tapi lupa bikin branch lokal, jadi perlu
merge dulu
parents 4a807067 790706ae
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
.frame > h1 {
text-align: left;
}
.submenu_container {
width: 360px;
display: inline-flex;
margin-left: auto;
margin-right: auto;
}
.submenu {
width: 100px;
height: 40px;
float: left;
border: 0.5px solid black;
font-size: 15px;
text-align: center;
}
.submenu.left {
float: left;
}
.submenu.mid {
margin-left: 29px;
margin-right: 29px;
}
.submenu.right {
float: right;
}
.content {
width: 350px;
margin-top: 20px;
margin-left: 5px;
margin-right: 5px;
}
.content > div {
margin: 5px 0px 5px 0px;
}
.content > div > span {
float: left;
}
.content > div > input[type="text"] {
width: 200px;
float: right;
}
#select_driver div {
border: 0.5px solid black;
}
#preferred_driver {
}
#order_link {
background-color: #465d43;
}
\ No newline at end of file
......@@ -27,29 +27,76 @@
<div class="menu_container">
<?php include'../template/menu.php';?>
</div>
<h1>Make an Order</h1>
<div class="submenu_container">
<a href="order/select_location.html">
<div class="submenu left">
Select Destination
</div>
</a>
<div>
<h1>MAKE AN ORDER</h1>
<div style="background-color: white; max-width: 600px; margin-left: auto; margin-right: auto">
<a href="order/select_location.html">
<div style="width:150px; float: left; margin-left: 5%; border: 5px solid black">
Select Destination
<a id="xxx">
<div class="submenu mid" id="xxx">
Select a Driver
</div>
</a>
<a href="order/complete_order.html">
<div class="submenu right">
Complete Order
</div>
</a>
</div>
<form method="post">
<div class="content" id="select_destination">
<div>
<div>
<span>Picking point</span>
<input type="text" name="picking_point">
</div>
</a>
<a href="order/select_driver.html">
<div style="width:150px; float: left; margin-left: 5px; margin-right: 5px; border: 5px solid black">
Select Driver
<div>
<span>Destination</span>
<input type="text" name="destination">
</div>
</a>
<a href="order/complete_order.html">
<div style="width:150px; float: left; margin-right: 5%; border: 5px solid black">
Complete Order
<div>
<span>Preferred driver</span>
<input type="text" name="preferred_driver">
</div>
</a>
</div>
<div class="button green" id="next">
Next
</div>
</div>
</div>
<div class="content" id="select_driver" style="display: none;">
<div id="preferred_driver">
<h2>Preferred driver</h2>
</div>
<div id="other_driver">
<h2>Other drivers</h2>
</div>
<div id="selected_driver" style="display: none">
<input type="text" name="selected_driver">
</div>
</div>
<div class="content" id="complete_order" style="display: none;">
<h2>
How was it?
</h2>
<input class="button green" type="submit" name="submit" value="Complete Order">
</div>
</form>
</div>
<script type="text/javascript">
var element = document.getElementById('next');
// element.onclick = function () {
// alert('hi');
// };
element.onclick = function () {
document.getElementById('select_destination').style.display='none';
document.getElementById('select_driver').style.display='inline';
}
</script>
</body>
</html>
File moved
......@@ -32,9 +32,9 @@
</div>
<div class="add_loc_frame">
<h2> Add New Location</h2>
<form name="add_location" action="">
<form name="add_location" action="updateLocation.php" method="POST">
<input type="text" name="new_location">
<input type="text" name="hidden_userid" style="display: none;">
<input type="text" id="hidden_userid" name="hidden_userid" style="display: none;">
<input type="submit" value="ADD" class="button green add">
</form>
</div>
......
......@@ -40,7 +40,9 @@
echo "</br><strong>".$row['username']."</strong></br>";
echo $row['name']."</br>";
if ($row['status'] == "driver") {
echo "driver | Rating (xxx Votes)</br>";
echo "Driver | Rating (xxx Votes)</br>";
} else {
echo "No-Driver</br>";
}
echo $row['email']."</br>";
echo $row['phone']."</br>";
......
......@@ -4,9 +4,9 @@
include '../database/dbconnect.php';
$user_id = $_POST['hidden_userid'];
$new_loc = $_POST['new_location'];
$query = mysqli_query($con,"INSERT INTO user (driver_id,pref_loc) VALUES ('$user_id', '$new_loc')") or die(mysqli_error());
$query = mysqli_query($con,"INSERT INTO driver_prefloc (driver_id,pref_loc) VALUES ('$user_id', '$new_loc')") or die(mysqli_error($con));
if ($query) {
header("Location: ../profile/profile.php?id=$user_id");
header("Location: edit_location.php?id=$user_id");
}
}
}
......
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