diff --git a/css/orderojek.css b/css/orderojek.css index 191afb3033eae2e56e58a6bf0d1bbb8d4c5cbb04..7498a5e4ca72cdc2ececb025cfbbf790f97109ce 100644 --- a/css/orderojek.css +++ b/css/orderojek.css @@ -21,7 +21,20 @@ font-size: 18px; text-align: center; color: grey; - text-align: center; +} + +.header3.lain{ + font-size: 25px; + text-align: left; + color: black; + margin-left: 140px; +} + +.header3.lain2{ + font-size: 12px; + text-align: left; + color: black; + margin-left: 140px; } .title { @@ -183,6 +196,14 @@ h1 { } +.gambar{ + float: left; + border: 1px solid black; + margin-left: 25px; + width: 100px; + height: 100px; +} + input[name=next] { display: table; margin: 0 auto; @@ -198,18 +219,18 @@ input[name=next] { font-family: Garamond; } -input[name=next2] { +input[name=choosen] { display: table; - margin: 0 auto; - margin-top: 10px; + text-align: center; + margin-right: 10px; + float: right; cursor: pointer; - width: 110px; - height: 50px; + width: 150px; + height: 35px; border-radius: 10px; border: 1px solid black; background: #82d504; - font-size: 22px; - font-weight: bold; + font-size: 14px; font-family: Garamond; } diff --git a/img/HMIF-Adya.jpg b/img/HMIF-Adya.jpg new file mode 100644 index 0000000000000000000000000000000000000000..18373ca42cc08ab041be711625c4a04e21cb9177 Binary files /dev/null and b/img/HMIF-Adya.jpg differ diff --git a/img/HMIF-Agung.jpg b/img/HMIF-Agung.jpg new file mode 100644 index 0000000000000000000000000000000000000000..55f03c52d209b6f55a98a49f6ff11f2efcae842f Binary files /dev/null and b/img/HMIF-Agung.jpg differ diff --git a/img/HMIF-Aziz.jpg b/img/HMIF-Aziz.jpg new file mode 100644 index 0000000000000000000000000000000000000000..080fe1bd0180f8cf220c330211058df288660682 Binary files /dev/null and b/img/HMIF-Aziz.jpg differ diff --git a/img/HMIF-Fildah.jpg b/img/HMIF-Fildah.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cb9b4286a73c9bc211c604de83e3e35f36f67ad0 Binary files /dev/null and b/img/HMIF-Fildah.jpg differ diff --git a/img/HMIF-Jehian.jpg b/img/HMIF-Jehian.jpg new file mode 100644 index 0000000000000000000000000000000000000000..904eff74471509f743f31c5e6462a7dada2e4f39 Binary files /dev/null and b/img/HMIF-Jehian.jpg differ diff --git a/img/HMIF-Turfa.jpg b/img/HMIF-Turfa.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b60825d6ee11fac9ce39e7d90b002576aad370b4 Binary files /dev/null and b/img/HMIF-Turfa.jpg differ diff --git a/img/HMIF-Vigor.jpg b/img/HMIF-Vigor.jpg new file mode 100644 index 0000000000000000000000000000000000000000..036dd89fa9099c94685ede25a7b398dc40928a61 Binary files /dev/null and b/img/HMIF-Vigor.jpg differ diff --git a/selectdriver.php b/selectdriver.php index 3a51c492871b9169d49394e8a290228b52577b42..8b0ffd191a3d39c557a2a0f0c15a6a3e5fa9be7b 100644 --- a/selectdriver.php +++ b/selectdriver.php @@ -1,8 +1,5 @@ <?php require('includes/config.php'); - if(isset($_POST["submit"])) { - - } ?> <!DOCTYPE html> @@ -48,16 +45,30 @@ <br><br> <div class="header3 paragraph"> <?php + $con = mysqli_connect('127.0.0.1','root','','pr-ojek'); $prefer_driver = $_POST['preferredDriver']; - echo ($prefer_driver === "" ? "NOTHING TO DISPLAY :(" : $prefer_driver); + $query = "SELECT * FROM drivers NATURAL JOIN users WHERE name like '%".$prefer_driver."%' ORDER BY total_rating/total_passangers LIMIT 1"; + $tmp = mysqli_query($con, $query); + $exist = $prefer_driver !== "" && mysqli_num_rows($tmp) == 1; + $res = mysqli_fetch_assoc($tmp); + if ($exist){ + $image = '<img src="' . $res['image'] . '" class="gambar">'; + echo $image.'<div class="header3 lain">' . $res['name'] . '</div>'; + echo '<div class="header3 lain2">'. $res['total_rating']/($res['total_passangers'] > 0 ? $res['total_passangers'] : 1) . ' (' . $res['total_passangers'] . ' votes) </div><br>'; + echo '<form action="completeorder.php" id="menuDua" name="menuDua" method="POST">'; + echo '<div class="choosen">'; + echo '<input type="submit" name="choosen" value="I CHOOSE YOU!">'; + echo '</div>'; + echo '</form>'; + } else { + echo "NOTHING TO DISPLAY :("; + } ?> </div> </div> <div class="roundedBox others"> <span class="header3"><b>OTHER DRIVERS:</b></span> </div> - <input type="submit" name="next2" value="NEXT"> - </div> </div> </body> </html> \ No newline at end of file