diff --git a/src/complete-order.php b/src/complete-order.php index db82697d0782a8ad9a977ff2d618690d1d496783..06b8aa32a6c1312116ddfb8d1e2b30a735831624 100644 --- a/src/complete-order.php +++ b/src/complete-order.php @@ -10,7 +10,24 @@ if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } + /* GET USER INFO */ + // Menyiapkan statement SELECT + $sqlquery = 'SELECT username, fullname, email, phoneno, isdriver, avg_vote, n_voters, img_name FROM userinfo WHERE id=?'; + $stmt = mysqli_prepare($conn, $sqlquery); + // Bind variables + mysqli_stmt_bind_param($stmt, "i", $_GET['id_active']); + + if(mysqli_stmt_execute($stmt)){ + // Simpan Hasil query + mysqli_stmt_store_result($stmt); + // username exist + mysqli_stmt_bind_result($stmt, $username, $fullname, $email, $phoneno, $isdriver, $avg_vote, $n_voters, $img_name); + + mysqli_stmt_fetch($stmt); + } + + /* PREFLOC */ $sql = "SELECT * FROM userinfo, prefloc WHERE userinfo.id = prefloc.id AND userinfo.id LIKE {$_POST['u_driver']}"; //$sql = "SELECT * FROM `userinfo`,`prefloc` WHERE `userinfo.id` = `prefloc.id` LIKE '{$_POST["u_driver"]}'"; @@ -27,6 +44,7 @@ <head> <title>Complete Order</title> <link rel="stylesheet" href="css/fan2.css"/> + <link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> </head> <body> @@ -35,9 +53,7 @@ <div class="rowflex"> <div class="flexone"> <div> - <span class="font-header" style="color: green;">PR</span> - - - <span class="font-header" style="color: red;">OJEK</span> + <span class="font-header" style="color: green;">PR-</span><span class="font-header" style="color: red;">OJEK</span> </div> <div style="color: green;"> wushh... wushh... ngeeeeeeenggg... @@ -46,16 +62,16 @@ <div class="mtop10 flexone textright"> <span>Hi, </span> - <span id="username">pikapikachu</span> + <span id="username"><?php echo $username ?> !</span> <br /> <a href="#">Logout</a> </div> </div> <div class="mtop10 rowflex"> - <div class="flexone box font-header selected-navbar">ORDER</div> - <div class="flexone box font-header">HISTORY</div> - <div class="flexone box font-header">MY PROFILE</div> + <div class="flexone box font-navbar selected-navbar"><a href="order-ojek.php?id_active=<?php echo $_GET['id_active'] ?>">ORDER</a></div> + <div class="flexone box font-navbar"><a href="history.php?id_active=<?php echo $_GET['id_active'] ?>">HISTORY</a></div> + <div class="flexone box font-navbar"><a href="">MY PROFILE</a></div> </div> @@ -65,33 +81,33 @@ <div class="mtop10 rowflex"> <div class="rowflex order-step flexone box font-order"> - <div class="number mr20 lh40"> + <div class="number mr12"> 1 </div> - <div class="lh40"> + <div class="left-align"> Select Destination </div> </div> <div class="rowflex order-step flexone box font-order"> - <div class="number mr20 lh40"> + <div class="number mr12"> 2 </div> - <div class="lh40"> + <div class="left-align"> Select a Driver </div> </div> <div class="rowflex order-step flexone box font-order selected-order"> - <div class="number mr20 lh40"> + <div class="number mr12"> 3 </div> - <div class="lh40"> + <div class="left-align"> Complete your order </div> </div> </div> <h2>HOW WAS IT ?</h2> - <div class="mtop30 textcenter" > + <div class="textcenter" > <img class="mtop10 profilepic" src="img/<?php echo $row['img_name']; ?>" /> <div class="mtop10" id="username"> <?php echo $row['username']; ?> @@ -117,7 +133,8 @@ <div class="mtop10 float-right"> - <input class="button" type="submit" value="Complete Order" /> + <!-- <input class="button" type="submit" value="Complete Order" /> --> + <button type="submit" class="btn-complete">COMPLETE<br>ORDER</button> </div> </form> @@ -127,7 +144,7 @@ </div> </body> - <?php + <?php /* if($clicked > 0) { // Create connection $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); @@ -145,6 +162,6 @@ } $conn->close(); - } + } */ ?> </html> diff --git a/src/css/fan.css b/src/css/fan.css index 54de30b867f1a1657acd9642f735d709cd82f2b7..8b3f0a61103de04534f2c34cf5b3efd957785e8f 100644 --- a/src/css/fan.css +++ b/src/css/fan.css @@ -5,10 +5,15 @@ img { max-width: 100%; height: auto; } - +h1 { + margin-top: 60px; + margin-bottom: 10px; + font-size: 40px; + font-family: Oswald; +} /* Layout */ .container { - margin: 0 auto; + margin: 20px auto; max-width: 1280px; width: 40%; min-width: 540px; @@ -49,7 +54,8 @@ img { } /* Vertical center */ .title { - font-size: 25px; + font-size: 30px; + font-weight: bold; } .relative { /* parent */ position: relative; @@ -89,15 +95,21 @@ img { .mt10 { margin-top: 10px; } +.mt20 { + margin-top: 20px; +} .mt25 { margin-top: 25px; } -.mr67 { - margin-right: 67px; -} .mt40 { margin-top: 40px; } +.mr25 { + margin-right: 25px +} +.mr67 { + margin-right: 67px; +} .m0 { margin:0; } @@ -108,6 +120,12 @@ img { margin-bottom: 25px; } /* Padding */ +.p5 { + padding: 5px; +} +.p10 { + padding: 10px; +} .p15 { padding: 15px; } @@ -162,7 +180,10 @@ nav ul li a { display: block; text-decoration: none; color: black; - padding: 10px; + padding: 8px; + font-weight: bold; + font-size: 24px; + font-family: Roboto; } nav ul li a:hover { cursor: pointer; @@ -254,23 +275,30 @@ input:checked + .slider:before { width: 75%; } +/* Status */ +.status { + font-size: 17px; +} +.status .active { + background: #FFFE9F; +} +.status .col-3 { + width: 30%; +} .round-numb { - width: 30px; - height: 30px; + width: 40px; + height: 40px; display: block; text-align: center; background: #D9D9D9; - padding: 6px; + padding: 11px; border-radius: 25px; } .numb { position: relative; - height: 36px; - -} -.status .active { - background: #FFFE9F; + height: 50px; } + /* Driver */ .driver { list-style: none; diff --git a/src/css/fan2.css b/src/css/fan2.css index 211d12d8d89258a40965ad7cd03beea9c154afcb..3c912e1991bb899438ebead8057a66506aea16c0 100644 --- a/src/css/fan2.css +++ b/src/css/fan2.css @@ -2,14 +2,14 @@ .card { margin-top: 20px; width: 40%; + min-width: 540px; } /* Elements */ .number { + padding: 10px 16px; border-radius: 50%; - background-color: grey; - height: 40px; - width: 40px; + background-color: #D9D9D9; } .box { @@ -19,7 +19,7 @@ .box a { display: block; - padding: 10px; + padding: 8px; } .box a:hover { @@ -40,12 +40,12 @@ /* Fonts */ .font-order { font-size: 17px; - font-weight: bold; } .font-title { font-size: 40px; font-weight: bold; + font-family: Oswald; } .font-header { @@ -54,8 +54,11 @@ } .font-navbar a { + font-family: Roboto; text-decoration: none; color: black; + font-weight: bold; + font-size: 24px; } /* Selection */ @@ -154,6 +157,10 @@ margin-right: 20px; } +.mr12 { + margin-right: 12px; +} + /* List */ li { font-size: 20px; @@ -166,13 +173,20 @@ li { /* Button */ .button { - background-color: green; + background-color: #82D800; border: 1px solid black; - border-radius: 7%; - width: 120px; - padding: 10px; + border-radius: 10px; + /* width: 99px; */ + padding: 12px 28px; + font-size: 20px; +} +.btn-complete { + background-color: #82D800; + border: 1px solid black; + border-radius: 10px; + padding: 7px 14px; + font-size: 18px; } - /* Label */ .labels { width: 150px; @@ -181,4 +195,7 @@ li { } -/* Rating */ +/* text align */ +.left-align { + text-align: left; +} \ No newline at end of file diff --git a/src/css/styles.css b/src/css/styles.css index bd7358f1ea8740ec0bb1224e68a5a98338929fb4..c5310d1658af02e196cf68256df71f3bc1319fe0 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -2,13 +2,16 @@ body { font-family: Roboto, sans-serif; } -nav { - background-color: #009688; - height: 60px; - margin: 0px; - padding: 0; +h1 { + font-family: Oswald; + font-size: 40px; + margin-top: 60px; + margin-bottom: 10px; +} +h2 { + font-family: Oswald; + margin-bottom: 10px; } - ul { list-style: none; margin: 0; @@ -22,8 +25,11 @@ li a { display: block; color: white; text-align: center; - padding: 16px; + padding: 5px 15px; text-decoration: none; + display: flex; + flex-direction: column; + justify-content: center; } li a:hover { @@ -31,29 +37,32 @@ li a:hover { } .container { margin: 25px auto auto; - text-align: center; + width: 40%; } -h1 { - font: 33px sans-serif; - margin-top: 30px; - position: relative; - text-align: center; - text-transform: uppercase; - z-index: 1; - color: #02702C; +.login h1, .register h1 { + font-family: Oswald; + font-size: 55px; + margin-top: 4px; + position: relative; + text-align: center; + text-transform: uppercase; + z-index: 1; + color: #02702C; } -h1:before { - border-top: 2px solid #02702C; - content:""; - margin: 0 auto; - position: absolute; - top: 15px; left: 0; right: 0; bottom: 0; - width: 86%; - z-index: -1; +.login h1:before, .register h1:before { + border-top: 2px solid #02702C; + content:""; + margin: 0 auto; + position: absolute; + top: 42px; left: 0; right: 0; bottom: 0; + width: 86%; + z-index: -1; } -h1 span { background: #8BBD3C; padding: 0 23px; } +.login h1 span, .register h1 span { + background: #8BBD3C; padding: 0 23px; +} .box { width: 400px; @@ -154,7 +163,7 @@ a { } a img { - width: 16px; + width: 20px; } table { @@ -162,16 +171,32 @@ table { } table, th, td { - border: 1px solid black; + border: 1px solid #C8C8C8; } .form-inline button{ margin: auto; } +.loc { + width: 418px; + border-color: #C8C8C8; +} +.btn-css { + font-size: 16px; + width: 80px; + height: 35px; + border: 1px solid; +} + .btn-danger { background-color: red; float: left; + left: 3px; + font-size: 16px; + width: 80px; + height: 35px; + border: 1px solid; } input.form-control.validation { @@ -189,3 +214,11 @@ input.form-control.validation { margin-bottom: -4px; margin-left: 5px; } + +/* layout */ +.wid70 { + width: 70%; +} +.wid20 { + width: 20%; +} \ No newline at end of file diff --git a/src/edit-prefered-location.php b/src/edit-prefered-location.php index bed89d76dfed984c0b9d79bc8b4a5fa3903c9518..5210660ba8a3fcac67d8968247aa7162dd596c7b 100644 --- a/src/edit-prefered-location.php +++ b/src/edit-prefered-location.php @@ -4,21 +4,16 @@ <meta charset="utf-8"> <title>Edit Prefered Location</title> <link rel="stylesheet" href="css/styles.css"> + <link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> </head> <body> - <nav> - <ul> - <li><a href="#home">Home</a></li> - <li><a href="#about">About</a></li> - </ul> - </nav> <div class="container"> - <h2>EDIT PREFERED LOCATION</h2> + <h1>EDIT PREFERED LOCATIONS</h1> <table style="text-align: center; width: 100%;"> <thead> <th>No</th> - <th>Location</th> - <th>Actions</th> + <th class="wid70">Location</th> + <th class="wid20">Actions</th> </thead> <tbody> <tr> @@ -34,13 +29,13 @@ </tbody> </table> <br> - <h2>ADD NEW LOCATION</h2> - <form class="form-group form-inline"> - <input type="text" class="form-control" name="location" > + <h2>ADD NEW LOCATION:</h2> + <form class="form-inline"> + <input type="text" class="form-control loc" name="location" > <button type="submit" class="btn-css">ADD</button> </form> <br> - <button type="button" class="btn-danger" >Back</button> + <button type="button" class="btn-danger" >BACK</button> </div> </body> </html> diff --git a/src/edit-profile.php b/src/edit-profile.php index c4fac4c1eacebc2bd02a1ef94bdb73a120a2ec66..4380192ed0fe5402a52f0de33f5ce27ed9b86aa7 100644 --- a/src/edit-profile.php +++ b/src/edit-profile.php @@ -1,9 +1,9 @@ <!DOCTYPE html> <html> <head> - <title>Edit Profile</title> <link rel="stylesheet" type="text/css" href="css/fan.css"> + <link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> </head> <body> <main class="container"> diff --git a/src/login.php b/src/login.php index 36226605185a77cf1fdfc3dde2ac6336bd00c343..24c8afdd430ec241fa4e7c63e4a9aae943539e24 100644 --- a/src/login.php +++ b/src/login.php @@ -4,9 +4,10 @@ <meta charset="utf-8"> <title>Login</title> <link rel="stylesheet" href="css/styles.css"> + <link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> </head> <body> - <div class="container"> + <div class="container login"> <div class="box"> <h1 class="no-background"> <span><b>LOGIN</b></span> diff --git a/src/order-ojek.php b/src/order-ojek.php index 77e2ef1dd3315010f9c8de4fec4cb97799f9dec5..8430f489fe9673f4689d66745d70a87c7b39f3c7 100644 --- a/src/order-ojek.php +++ b/src/order-ojek.php @@ -1,9 +1,33 @@ <!DOCTYPE html> +<?php + require_once 'dbconfig.php'; + $sqlconn = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); + if (!$sqlconn) { + die('mySQL connection failed'); + } + + // Menyiapkan statement SELECT + $sqlquery = 'SELECT username, fullname, email, phoneno, isdriver, avg_vote, n_voters, img_name FROM userinfo WHERE id=?'; + $stmt = mysqli_prepare($sqlconn, $sqlquery); + + // Bind variables + mysqli_stmt_bind_param($stmt, "i", $_GET['id_active']); + + if(mysqli_stmt_execute($stmt)){ + // Simpan Hasil query + mysqli_stmt_store_result($stmt); + // username exist + mysqli_stmt_bind_result($stmt, $username, $fullname, $email, $phoneno, $isdriver, $avg_vote, $n_voters, $img_name); + + mysqli_stmt_fetch($stmt); + } +?> <html> <head> <title>Order Ojek</title> <link rel="stylesheet" href="css/fan2.css"/> + <link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> </head> <body> @@ -12,9 +36,7 @@ <div class="rowflex"> <div class="flexone"> <div> - <span class="font-header" style="color: green;">PR</span> - - - <span class="font-header" style="color: red;">OJEK</span> + <span class="font-header" style="color: green;">PR-</span><span class="font-header" style="color: red;">OJEK</span> </div> <div style="color: green;"> wushh... wushh... ngeeeeeeenggg... @@ -23,16 +45,16 @@ <div class="mtop10 flexone textright"> <span>Hi, </span> - <span id="username">pikapikachu</span> + <span id="username"><?php echo $username ?> !</span> <br /> <a href="#">Logout</a> </div> </div> <div class="mtop10 rowflex"> - <div class="flexone box font-header selected-navbar">ORDER</div> - <div class="flexone box font-header">HISTORY</div> - <div class="flexone box font-header">MY PROFILE</div> + <div class="flexone box font-navbar selected-navbar"><a href="#">ORDER</a></div> + <div class="flexone box font-navbar"><a href="history.php?id_active=<?php echo $_GET['id_active'] ?>">HISTORY</a></div> + <div class="flexone box font-navbar"><a href="profile.php?id_active=<?php echo $_GET['id_active'] ?>">MY PROFILE</a></div> </div> @@ -41,33 +63,33 @@ </div> <div class="mtop10 rowflex"> - <div class="rowflex order-step flexone box font-order selected-order"> - <div class="number mr20 lh40"> - 1 - </div> - <div class="lh40"> - Select Destination - </div> - </div> - <div class="rowflex order-step flexone box font-order "> - <div class="number mr20 lh40"> - 2 - </div> - <div class="lh40"> - Select a Driver - </div> - </div> - <div class="rowflex order-step flexone box font-order"> - <div class="number mr20 lh40"> - 3 - </div> - <div class="lh40"> - Complete your order - </div> - </div> + <div class="rowflex order-step flexone box font-order selected-order"> + <div class="number mr12"> + 1 + </div> + <div class="left-align"> + Select Destination + </div> + </div> + <div class="rowflex order-step flexone box font-order "> + <div class="number mr12 "> + 2 + </div> + <div class="left-align"> + Select a Driver + </div> + </div> + <div class="rowflex order-step flexone box font-order"> + <div class="number mr12"> + 3 + </div> + <div class="left-align"> + Complete your order + </div> + </div> </div> - <form method="post" onsubmit="return isFilled()" action="<?php echo 'select-driver.php?id_active='.$_GET['id_active'];?>" > > + <form method="post" onsubmit="return isFilled()" action="select-driver.php?id_active='<?php echo $_GET['id_active'];?>'"> <div class="rowflex mtop30"> <div class="labels mlauto"> Picking Point @@ -90,7 +112,7 @@ </div> <div class="textcenter"> - <input class="mtop30 button " type="submit" value="Complete Order" /> + <input class="mtop30 button " type="submit" value="NEXT" /> </div> </form> diff --git a/src/profile.php b/src/profile.php index cac3a3496db20a4c00fd37d7624408d68dbdccc4..9e5ff5c393cd0de7a50ad809de5e069ef8285c83 100644 --- a/src/profile.php +++ b/src/profile.php @@ -30,6 +30,7 @@ require_once 'dbconfig.php'; <html> <head> <title>Profile</title> + <link href="https://fonts.googleapis.com/css?family=Oswald|Roboto" rel="stylesheet"> <link rel="stylesheet" href="css/fan2.css"/> </head> @@ -56,8 +57,8 @@ require_once 'dbconfig.php'; </div> <div class="mtop10 rowflex"> - <div class="flexone box font-navbar"><a href="">ORDER</a></div> - <div class="flexone box font-navbar"><a href="">HISTORY</a></div> + <div class="flexone box font-navbar"><a href="order-ojek.php?id_active=<?php echo $_GET['id_active'] ?>">ORDER</a></div> + <div class="flexone box font-navbar"><a href="history.php?id_active=<?php echo $_GET['id_active'] ?>">HISTORY</a></div> <div class="flexone box font-navbar selected-navbar"><a href="">MY PROFILE</a></div> </div> diff --git a/src/register.php b/src/register.php index c6add5d35b19837af04b18f7f8800096d340cb15..443fe979ff4a8767d7d3d68b2be5bcb39b8aa14b 100644 --- a/src/register.php +++ b/src/register.php @@ -5,6 +5,7 @@ <title>Sign Up</title> <link rel="stylesheet" href="css/styles.css"> <script src="js/register.js" charset="utf-8"></script> + <link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> </head> <body> <div class="container register"> diff --git a/src/select-driver.php b/src/select-driver.php index 41a725281e8aded5ede4c549172e05e5f22911e2..ee3b1575fe99682f0e4f01e7c29e69fdea7492e7 100644 --- a/src/select-driver.php +++ b/src/select-driver.php @@ -10,17 +10,32 @@ die("Connection failed: " . $conn->connect_error); } - $sql = "SELECT * FROM userinfo, prefloc WHERE userinfo.id = prefloc.id"; + /* GET USER INFO */ + // Menyiapkan statement SELECT + $sqlquery = 'SELECT username, fullname, email, phoneno, isdriver, avg_vote, n_voters, img_name FROM userinfo WHERE id=?'; + $stmt = mysqli_prepare($conn, $sqlquery); + // Bind variables + mysqli_stmt_bind_param($stmt, "i", $_GET['id_active']); + if(mysqli_stmt_execute($stmt)){ + // Simpan Hasil query + mysqli_stmt_store_result($stmt); + // username exist + mysqli_stmt_bind_result($stmt, $username, $fullname, $email, $phoneno, $isdriver, $avg_vote, $n_voters, $img_name); + mysqli_stmt_fetch($stmt); + } + + /* SELECT DRIVER */ + $sql = "SELECT * FROM userinfo, prefloc WHERE userinfo.id = prefloc.id"; ?> <html> <head> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Select Driver</title> <link rel="stylesheet" type="text/css" href="css/fan.css"> + <link href="https://fonts.googleapis.com/css?family=Oswald|Roboto" rel="stylesheet"> </head> <body> <!-- Start Header --> @@ -28,25 +43,19 @@ <div class="row"> <div class="col-6"> <div class="title"><span class="green">PR-</span><span class="red">OJEK</span></div> - </div> - <div class="col-6 right-align"> - Hi, <b>username</b> !<br> - </div> - </div> - <div class="row"> - <div class="col-6"> <div class="green">wushh... wushh... ngeeeeeenggg...</div> </div> - <div class="col-6 right-align"> + <div class="col-6 right-align mt10"> + Hi, <b><?php echo $username ?> !</b><br> <a href=""><span class="blue">Logout</span></a> </div> </div> <!-- Start Navigation --> <nav class="mt10"> <ul> - <li><a href="">Order</a></li> - <li><a href="">History</a></li> - <li><a href="">My Profile</a></li> + <li><a href="order-ojek.php?id_active=<?php echo $_GET['id_active'] ?>">Order</a></li> + <li><a href="#" class="active">History</a></li> + <li><a href="profile.php?id_active=<?php echo $_GET['id_active'] ?>">My Profile</a></li> </ul> </nav> <!-- End Navigation --> @@ -57,17 +66,17 @@ <h1 class="uppercase">Make An Order</h1> <!-- Start Status --> <div class="row status"> - <div class="col-3 border mr67"> + <div class="col-3 border mr25"> <div class="col-4 numb"><div class="round-numb center-center">1</div></div> - <div class="col-8">Select Destination</div> + <div class="col-8 p5">Select Destination</div> </div> - <div class="col-3 border mr67 active"> + <div class="col-3 border mr25 active"> <div class="col-4 numb"><span class="round-numb center-center">2</span></div> - <div class="col-8">Select a Driver</div> + <div class="col-8 p5">Select a Driver</div> </div> <div class="col-3 border"> <div class="col-4 numb"><span class="round-numb center-center">3</span></div> - <div class="col-8">Complete your order</div> + <div class="col-8 p5">Complete your order</div> </div> </div> <!-- End Status --> @@ -98,7 +107,7 @@ '<input type="hidden" name="destination" value="'. $_POST['destination'] . '"/>'. '<input type="hidden" name="u_driver" value="'. $row['id']. '"/>'. '<div class="right-align mt25">'. - '<input class="uppercase btn green-bg" type="submit" value="I choose you"/>'. + '<input class="uppercase btn green-bg" type="submit" value="I choose you!"/>'. '</div>'. '</form>'. '</div>'.