diff --git a/css/default_style.css b/css/default_style.css index cf87617f912bb24e25a6f874aeb37ab44e45e115..9af0c20d29d2168a55c955bd043bd6443eceae96 100755 --- a/css/default_style.css +++ b/css/default_style.css @@ -44,9 +44,12 @@ input{ border: 1px solid black; } +a { + color: black; +} + a:link, a:visited { - color: black; - text-decoration: underline; + text-decoration: none; } a:hover { @@ -61,6 +64,11 @@ a:hover { font-family: calibri; } +.menu_active { + background-color: #465d43; + color: white; +} + .menu > h3 { margin-top: 5%; margin-bottom: 5% diff --git a/css/history.css b/css/history.css index c106793ff9d8a7f9749bab573337177e35162558..a260d6c2607f7b0542ec35c8da5fb6b54a806363 100755 --- a/css/history.css +++ b/css/history.css @@ -1,9 +1,42 @@ .history_container { margin-top: 10%; - height: 50%; + height: 79%; border: 1px solid red; } +.history_container .subheader { + height: 10%; +} + .history_container > * { - border: 1px solid red; -} \ No newline at end of file + +} + +.page_menu { + list-style-type: none; + margin: 0; + padding: 0; + overflow: hidden; +} + +.page_menu > li { + width: 50%; + display: inline; + float: left; +} + +.history_menu { + border: 0.5px solid black; + text-align: center; + font-family: calibri; + + position: relative;; + border: 0.5px solid black; + display: block; + + text-decoration: none; +} + +.history_menu > h3 { + margin: 5px 1px; +} diff --git a/css/order.css b/css/order.css index 36db29d3350757574574910400b6d7b6ea8b9827..b79bd3369bba25e52ecddd8fa0c7b22a154c6aad 100755 --- a/css/order.css +++ b/css/order.css @@ -1,3 +1,63 @@ +.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 diff --git a/history/driver_history.php b/history/driver_history.php new file mode 100644 index 0000000000000000000000000000000000000000..5d2fe7d1029a520d6a5594ea19e4869addb7e066 --- /dev/null +++ b/history/driver_history.php @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<head> + <title>driver history</title> + <link rel="stylesheet" type="text/css" href="../css/default_style.css"> + <link rel="stylesheet" type="text/css" href="../css/history.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="history_container"> + <div class="subheader"> + <div class="title"><h1>Transaction History</h1></div> + </div> + + <ul class="page_menu"> + <li> + <a class="history_menu" href=<?php echo 'transaction_history.php?id='.$user_id; ?>> + <h3>MY PREVIOUS ORDER</h3> + </a> + </li> + <li> + <a class="history_menu menu_active" href=<?php echo 'driver_history.php?id='.$user_id; ?>> + <h3>DRIVER HISTORY</h3> + </a> + </li> + </ul> + </div> + </div> +</body> +</html> \ No newline at end of file diff --git a/history/transaction_history.php b/history/transaction_history.php index 382bb296140efd35fbb4594c2649c3fd9e2e005b..ea67f9bf4cdb5f49b008e96d44a593468bc62188 100644 --- a/history/transaction_history.php +++ b/history/transaction_history.php @@ -31,7 +31,19 @@ <div class="subheader"> <div class="title"><h1>Transaction History</h1></div> </div> + <ul class="page_menu"> + <li> + <a class="history_menu menu_active" href=<?php echo 'transaction_history.php?id='.$user_id; ?>> + <h3>MY PREVIOUS ORDER</h3> + </a> + </li> + <li> + <a class="history_menu" href=<?php echo 'driver_history.php?id='.$user_id; ?>> + <h3>DRIVER HISTORY</h3> + </a> + </li> + </ul> </div> </div> </body> -</html> \ No newline at end of file +</html> diff --git a/order/order.php b/order/order.php index bad9b61694b66c246d485ea038567f1d9479e654..fef8dc16bd8d72ad6e07fce6aa31df11c39dc53d 100644 --- a/order/order.php +++ b/order/order.php @@ -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> diff --git a/order/select_location.html b/order/select_location.php old mode 100755 new mode 100644 similarity index 100% rename from order/select_location.html rename to order/select_location.php