From 4a807067987749af3232ce8e0ab741db29d1768f Mon Sep 17 00:00:00 2001
From: "fariz.tumbuan" <13515050@std.stei.itb.ac.id>
Date: Fri, 6 Oct 2017 21:08:59 +0800
Subject: [PATCH] Selesai membuat tampilan awal halaman history dan membuat
 'sublink'nya. Juga membuat driver_history.php yang isinya masih sama dengan
 transaction_history

---
 history/driver_history.php      | 50 +++++++++++++++++++++++++++++++++
 history/transaction_history.php | 13 +++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 history/driver_history.php

diff --git a/history/driver_history.php b/history/driver_history.php
new file mode 100644
index 00000000..5d2fe7d1
--- /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 382bb296..73ca6f40 100644
--- a/history/transaction_history.php
+++ b/history/transaction_history.php
@@ -31,6 +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>
-- 
GitLab