From 75db57fd127fe4c866ec16ad0d5a881ae61dd4a5 Mon Sep 17 00:00:00 2001 From: aldrichvalentino <aldrich.vh97@gmail.com> Date: Sat, 7 Oct 2017 08:43:03 +0700 Subject: [PATCH] deleted dashboard.php, minor changes in routig for register.php --- controller/register.php | 6 +++- view/dashboard.php | 75 ----------------------------------------- 2 files changed, 5 insertions(+), 76 deletions(-) delete mode 100644 view/dashboard.php diff --git a/controller/register.php b/controller/register.php index 249b9a4f..c1a60943 100644 --- a/controller/register.php +++ b/controller/register.php @@ -51,5 +51,9 @@ if(isset($_POST["register"])) { while($row = mysqli_fetch_array($result)) { $id = $row['id']; } - header('Location: ../view/dashboard.php?id=' . $id); + if($isDriver){ + header('Location: ../view/profile.php?id=' . $id); + } else { + header('Location: ../view/order.php?id=' . $id); + } } diff --git a/view/dashboard.php b/view/dashboard.php deleted file mode 100644 index b38a36db..00000000 --- a/view/dashboard.php +++ /dev/null @@ -1,75 +0,0 @@ -<html> -<head> - <title>User Dashboard</title> - <link href="../css/primary.css" type="text/css" rel="stylesheet" /> - <link href="../css/dashboard.css" type="text/css" rel="stylesheet" /> - <link href="../css/history.css" type="text/css" rel="stylesheet" /> - <link href="../css/order.css" type="text/css" rel="stylesheet" /> - <script> - //send session id to JS files - var sessionid = "<?php echo $_GET['id']; ?>"; - </script> - <script src="../js/dashboard.js"></script> - <script src="../js/profile.js"></script> - <script src="../js/history.js"></script> - <script src="../js/order.js"></script> -</head> -<body onpageshow="getUserProfile()"> - <div class="container"> - <div class="header"> - <div class="logo"><img src="../img/logo.png" /></div> - <div class="logout-panel"> - <div id="username"></div> - <a href="index.php">Logout</a> - </div> - </div> - <div class="menu"> - <div class="submenu" id="order" onclick="order_clicked()">ORDER</div> - <div class="submenu" id="history" onclick="history_clicked(); getAllTransaction(1)">HISTORY</div> - <div class="submenu selected" id="profile" onclick="getUserProfile(); profile_clicked();">PROFILE</div> - </div> - - <section class="order-wrapper"> - <?php include "order.php"; ?> - </section> - - <section class="history-wrapper"> - <div class="sub-header"> - <div class="sub-header-heading"><h1>TRANSACTION HISTORY</h1></div> - </div> - <div class="menu"> - <div class="submenu-two" id="previous-order" onclick="getAllTransaction(0); previousOrderClicked()"> - MY PREVIOUS ORDER</div> - <div class="submenu-two selected-order" id="driver-history" onclick="getAllTransaction(1); driverHistoryClicked()"> - DRIVER HISTORY</div> - </div> - <div class="driver-info" id="driver-info"></div> - </section> - - <section class="profile-wrapper"> - <div class="sub-header"> - <div class="sub-header-heading"><h1>MY PROFILE</h1></div> - <div class="edit-icon"> - <a href="../view/edit-profile.php?id=<?php echo $_GET['id'] ?>"><img src="../img/pencil.png" /></a> - </div> - </div> - <div class="user-profile"> - <div id="user-image"></div> - <h1 id="profile-username"></h1> - <div id="name"></div> - <div id="driver"></div> - <div id="driver-stats"></div> - <img src="../img/mail.png" /><div id="email"></div><br /> - <img src="../img/phone.png" /><div id="phone"></div><br /> - </div> - <div class="sub-header" id="preferred-location"> - <div class="sub-header-heading"><h1>PREFERRED LOCATION</h1></div> - <div class="edit-icon"> - <a href="../view/edit-prefered-locations.php"><img src="../img/pencil.png" /></a> - </div> - </div> - <div class="user-location"><ul id="user-location"></ul></div> - </section> - </div> -</body> -</html> \ No newline at end of file -- GitLab