Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (70)
Showing with 1609 additions and 0 deletions
{
"version": "0.1.0",
"command": "explorer",
"windows": {
"command": "explorer.exe"
},
"args": ["orderojek.html"]
}
\ No newline at end of file
<?php
require('includes/config.php');
if(isset($_POST["submit"])) {
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Make an order</title>
<link rel="stylesheet" type="text/css" href="css/orderojek.css">
<script src="js/order.js"></script>
</head>
<body>
<div class="contentBox">
<div class="mainHeader">
<div class="header1">
<div class="title"><span class="title green">PR</span>-<span class=" title red">OJEK</span></div>
<div class="subtitle">wush... wush... ngeeeeeenggg...</div>
</div>
<div class="header2">
<div class="username">Hi, <span class="username bold">pikachu!</span></div>
<div class="logout">Logout</div>
</div>
</div>
<div>
<div class="menu active">ORDER</div>
<div class="menu">HISTORY</div>
<div class="menu">MY PROFILE</div>
</div>
<h1>MAKE AN ORDER</h1>
<div id="box_aktif">
<div class="stepBox">
<div class="number">1</div>
<div class="step">Select Destination</div>
</div>
<div class="stepBox">
<span class="number">2</span>
<div class="step">Select a Driver</div>
</div>
<div class="stepBox active">
<span class="number">3</span>
<div class="step">Complete your order</div>
</div>
<form>
<div class="star">
<span class="star-rating star-5">
<input type="radio" name="rating" value="1"><i></i>
<input type="radio" name="rating" value="2"><i></i>
<input type="radio" name="rating" value="3"><i></i>
<input type="radio" name="rating" value="4"><i></i>
<input type="radio" name="rating" value="5"><i></i>
</span>
</div>
<input class="commentBox" type="text" name="comment" placeholder="Your comment...">
<input type="submit" name="submit" value="COMPLETE ORDER">
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
body {
font-family: 'Roboto', sans-serif;
color: #02702C;
margin-top: 40px;
}
.apps {
width: 380px;
height: 440px;
margin: 0 auto;
background: #8BBD3C;
border: 10px solid #02702C;
border-radius: 60px;
}
.form-heading {
margin: 0 auto;
display: flex;
}
.heading-left {
display: inline-block;
width: 25%;
padding: 45px 15px 45px 25px;
}
.heading-right {
display: inline-block;
width: 25%;
padding: 45px 25px 45px 15px;
}
.heading-title {
width: 40%;
padding: 5px;
text-align: center;
margin: auto;
font-size: 2.3em;
font-weight: 700;
line-height: 30px;
transform: scaleY(1.6);
}
.heading-left hr, .heading-right hr {
display: block;
height: 2px;
border: 0;
border-top: 2px solid #02702C;
margin: 0;
padding: 0 5px;
}
.form-login {
margin-top: 60px;
padding: 0 20px;
font-size: 1.5em;
}
.form-login .form-group {
margin-bottom: 10px;
}
.form-login .form-group label {
width: 30%;
display: inline-block;
}
.form-login .form-group input {
width: 60%;
}
.form-login .form-group input[type=text], .form-login .form-group input[type=password] {
height: 30px;
border: 1px solid black;
margin-left: 15px;
padding-left: 10px;
}
.form-login .action {
flex-wrap: wrap;
margin-top: 45px;
}
.form-login .action .register {
float: left;
}
.form-login .action .register a {
font-size: 0.6em;
color: #453333;
}
.form-login .action .submit {
float: right;
}
.form-login .action .submit input[type=submit] {
padding: 4px 28px;
background: #82D800;
border: 3px solid black;
font-family: 'Roboto', sans-serif;
font-size: 1em;
color: #453333;
border-radius: 10px;
width: 100%;
}
.form-signup {
padding: 0 10px;
font-size: 1em;
}
.form-signup .form-group {
margin-bottom: 3px;
display: flex;
flex-wrap: wrap;
}
.form-signup .form-group label {
width: 40%;
display: inline-block;
}
.form-signup .form-group input {
width: 53%;
}
.form-signup .form-group input[type=text], .form-signup .form-group input[type=password] {
height: 23px;
border: 1px solid black;
padding-left: 10px;
}
.form-signup .form-group input#username, .form-signup .form-group input#email {
width: 47%;
}
.form-signup .form-group span i {
display: none;
}
.form-signup .form-group span i:nth-of-type(2) {
color: #B33A3A;
}
.form-signup input[type=checkbox] {
margin-top: 15px;
}
.form-signup .action {
margin-top: 30px;
}
.form-signup .action .login {
float: left;
}
.form-signup .action .login a {
font-size: 0.8em;
color: #453333;
}
.form-signup .action .submit {
float: right;
margin-right: 10px;
}
.form-signup .action .submit input[type=submit] {
padding: 10px 5px;
background: #82D800;
border: 3px solid black;
font-family: 'Roboto', sans-serif;
font-size: 1em;
color: #453333;
border-radius: 10px;
width: 100%;
}
.mainHeader {
width: 500px;
height: 50px;
}
.header1 {
float: left;
}
.header2 {
float: right;
font-family: "Trebuchet MS";
}
.title {
font-family: "Hoefler Text";
font-size: 31px;
font-weight: bold;
color: black;
height: 27px;
}
.title.red {
color: #cb0a1d;
}
.title.green {
color : #066422;
}
.subtitle {
color: #4f9500;
font-size: 16px;
font-family: "Hoefler Text"
}
.username {
padding-top: 10px;
}
.username.bold {
font-weight: bold;
}
.logout {
text-align: right;
text-decoration: underline;
color: blue;
}
h1 {
color: #494949;
font-size: 35px;
font-family: "Trebuchet MS";
margin-top: 10px;
margin-bottom: 15px;
}
.contentBox {
width: 550px;
height: 480px;
margin: 0 auto;
background: white;
font-family: "Trebuchet MS";
}
.menu {
margin: 20px;
width: 165px;
height: 45px;
display: table-cell;
border: 1px solid black;
text-align: center;
vertical-align: middle;
line-height: 45px;
font-family: "Trebuchet MS";
font-weight: bold;
font-size: 24px;
}
.menu:not(:last-child) {
border-right : none;
}
.menu.active {
background: #3a563f;
border: 1px solid #253828;
color: white;
}
.submenu {
margin: 10px;
width: 245px;
height: 45px;
display: table-cell;
border: 0.5px solid black;
text-align: center;
vertical-align: middle;
line-height: 40px;
font-family: "Trebuchet MS";
font-size: 20px;
float : center;
}
.submenu:not(:last-child) {
border-right : none;
}
.submenu.active {
background: #41e06b;
}
.listBox {
height: auto;
width: 500px;
margin:40px 20px 20px 20px;
}
.thumbnail {
border: none;
width: 100px;
height: auto;
display: inline-block;
float: left;
margin-right: 20px;
}
.date {
font-family: "Trebuchet MS";
font-size: 14px;
margin-left: 15px;
}
.name {
font-family: "Trebuchet MS";
font-size: 18px;
margin-left: 15px;
}
.route {
font-family: "Trebuchet MS";
font-size: 12px;
margin-left: 15px;
}
.rating {
font-family: "Trebuchet MS";
font-size: 12px;
margin-left: 15px;
}
.comment {
font-family: "Trebuchet MS";
font-size: 12px;
margin-left: 15px;
}
.buttonHide {
background: red;
border: 0.5px solid black;
border-radius: 5px;
display: inline-block;
height: 20px;
width: 50px;
font-size: 16px;
text-align: center;
vertical-align: middle;
float : right;
margin-right: 40px;
}
\ No newline at end of file
.mainHeader {
width: 500px;
height: 50px;
}
.header1 {
float: left;
}
.header2 {
float: right;
font-family: "Trebuchet MS";
}
.header3 {
font-family: "Trebuchet MS";
font-size: 24px;
}
.header3.paragraph {
font-size: 18px;
text-align: center;
color: grey;
}
.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 {
font-family: "Hoefler Text";
font-size: 31px;
font-weight: bold;
color: black;
height: 27px;
}
.title.red {
color: #cb0a1d;
}
.title.green {
color : #066422;
}
.subtitle {
color: #4f9500;
font-size: 16px;
}
.username {
padding-top: 10px;
}
.username.bold {
font-weight: bold;
}
.logout {
text-align: right;
text-decoration: underline;
color: blue;
}
.menu{
margin: 10px;
width: 165px;
height: 45px;
display: table-cell;
border: 1px solid black;
text-align: center;
vertical-align: middle;
line-height: 45px;
font-family: "Trebuchet MS";
font-weight: bold;
font-size: 24px;
}
.menu:hover {
background-color: #3a563f;
color: white;
}
.menu.active {
background: #3a563f;
border: 1px solid #253828;
color: white;
}
.contentBox {
width: 530px;
height: 480px;
margin: 0 auto;
background: white;
}
h1 {
color: #494949;
font-size: 35px;
font-family: "Trebuchet MS";
margin-top: 10px;
margin-bottom: 15px;
}
.stepBox {
color: #414141;
display: inline-block;
border: 1px solid black;
width: 135px;
height: auto;
padding: 3px;
margin-right: 30px;
margin-bottom: 30px;
font-family: "Arial";
font-size: 15px;
}
.stepBox.active {
background: #ffff97;
}
.number {
width: 30px;
height: 30px;
border-radius: 50%;
font-size: 20px;
color: black;
line-height: 30px;
text-align: center;
background: #d1d1d1;
float: left;
margin: 5px;
margin-right: 8px;
}
.step {
margin: 2px;
}
.form {
width: 450px;
display: table;
margin-left: 10px;
}
.formBox {
width: 470px;
}
.labelBox {
float: left;
clear: left;
margin: 10px;
font-family: Arial;
color: #414141;
font-size: 20px;
}
.inputBox {
width: 250px;
height: 25px;
float: right;
clear: right;
margin: 2px;
font-size: 17px;
}
.roundedBox {
color: #414141;
display: inline-block;
border-radius: 10px;
border: 1px solid black;
width: 500px;
padding: 3px;
margin-right: 30px;
margin-bottom: 30px;
font-family: "Arial";
font-size: 15px;
}
.roundedBox.preferred {
}
.roundedBox.others {
}
.gambar{
float: left;
border: 1px solid black;
margin-left: 25px;
width: 100px;
height: 100px;
}
input[name=next] {
display: table;
margin: 0 auto;
margin-top: 185px;
cursor: pointer;
width: 110px;
height: 50px;
border-radius: 10px;
border: 1px solid black;
background: #82d504;
font-size: 22px;
font-weight: bold;
font-family: Garamond;
}
input[name=choosen] {
display: table;
text-align: center;
margin-right: 10px;
float: right;
cursor: pointer;
width: 150px;
height: 35px;
border-radius: 10px;
border: 1px solid black;
background: #82d504;
font-size: 14px;
font-family: Garamond;
}
input[name=submit] {
display: table;
margin: 0 auto;
margin-top: 185px;
cursor: pointer;
width: 110px;
height: 50px;
border-radius: 10px;
border: 1px solid black;
background: #82d504;
font-size: 14px;
font-weight: bold;
font-family: Garamond;
white-space: normal;
}
.star {
width: 300px;
height: 50px;
background: repeating-linear-gradient(
45deg,
#d6d6d6,
#d6d6d6 2px,
white 2px,
white 10px
);
margin: 0 auto;
text-align: center;
}
.star-rating {
opacity: 0.8;
font-size: 0;
white-space: nowrap;
display: inline-block;
/* width: 250px; remove this */
height: 50px;
overflow: hidden;
position: relative;
background: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDIwIDIwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cG9seWdvbiBmaWxsPSIjREREREREIiBwb2ludHM9IjEwLDAgMTMuMDksNi41ODMgMjAsNy42MzkgMTUsMTIuNzY0IDE2LjE4LDIwIDEwLDE2LjU4MyAzLjgyLDIwIDUsMTIuNzY0IDAsNy42MzkgNi45MSw2LjU4MyAiLz48L3N2Zz4=');
background-size: contain;
}
.star-rating i {
opacity: 0;
position: absolute;
left: 0;
top: 0;
height: 100%;
/* width: 20%; remove this */
z-index: 1;
background: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDIwIDIwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cG9seWdvbiBmaWxsPSIjRkZERjg4IiBwb2ludHM9IjEwLDAgMTMuMDksNi41ODMgMjAsNy42MzkgMTUsMTIuNzY0IDE2LjE4LDIwIDEwLDE2LjU4MyAzLjgyLDIwIDUsMTIuNzY0IDAsNy42MzkgNi45MSw2LjU4MyAiLz48L3N2Zz4=');
background-size: contain;
}
.star-rating input {
-moz-appearance: none;
-webkit-appearance: none;
opacity: 0;
display: inline-block;
/* width: 20%; remove this */
height: 100%;
margin: 0;
padding: 0;
z-index: 2;
position: relative;
}
.star-rating input:hover + i,
.star-rating input:checked + i {
opacity: 1;
}
.star-rating i ~ i {
width: 40%;
}
.star-rating i ~ i ~ i {
width: 60%;
}
.star-rating i ~ i ~ i ~ i {
width: 80%;
}
.star-rating i ~ i ~ i ~ i ~ i {
width: 100%;
}
::after,
::before {
height: 100%;
padding: 0;
margin: 0;
box-sizing: border-box;
text-align: center;
vertical-align: middle;
}
.star-rating.star-5 {width: 250px;}
.star-rating.star-5 input,
.star-rating.star-5 i {width: 20%;}
.star-rating.star-5 i ~ i {width: 40%;}
.star-rating.star-5 i ~ i ~ i {width: 60%;}
.star-rating.star-5 i ~ i ~ i ~ i {width: 80%;}
.star-rating.star-5 i ~ i ~ i ~ i ~i {width: 100%;}
body {
font-family: 'Roboto', sans-serif;
margin-top: 40px;
}
.apps {
width: 500px;
height: 480px;
margin: 0 auto;
background: white;
border: 10px solid #02702C;
border-radius: 60px;
}
.heading {
padding: 20px 20px 0 20px;
}
.edit-img {
padding: 0 20px 20px 20px;
display: flex;
}
.profile-img {
width: 150px;
height: 170px;
display: inline-block;
}
.update-img {
display: inline-block;
padding: 30px;
}
.thumbnail {
border: 1px solid black;
max-width: 150px;
max-height: 170px;
height: auto;
}
.edit-data {
padding: 0 20px;
font-size: 1.3em;
}
.edit-data .form-group {
margin-bottom: 3px;
}
.edit-data .form-group label {
width: 40%;
display: inline-block;
}
.edit-data .form-group .switch {
width: 12%;
float: right;
margin-right: 20px;
}
.edit-data .form-group input {
width: 53%;
}
.edit-data .form-group input[type=text], .edit-data .form-group input[type=password] {
height: 30px;
border: 1px solid gray;
padding-left: 10px;
}
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 28px;
}
/* Hide default HTML checkbox */
.switch input {
display:none;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #117D11;
}
input:focus + .slider {
box-shadow: 0 0 1px #117D11;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
.submit {
margin-top: 30px;
}
.submit input {
border: 1px solid black;
border-radius: 5px;
padding: 5px 15px;
}
.submit .cancel {
background: red;
float: left;
}
.submit .save {
background: green;
float: right;
margin-right: 15px;
}
.uploadFile {
float: left;
}
.fileUpload {
position: relative;
overflow: hidden;
margin: 0 10px;
float: right;
}
.fileUpload input.upload {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0;
font-size: 20px;
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
}
.fileUpload span {
font-size: 0.5em;
background: #D7D7D7;
padding: 5px;
border: 1px solid gray;
border-bottom: 1px solid gray;
}
table.data-location {
margin: 20px;
border-collapse: collapse;
width: 92%;
}
th:nth-of-type(1) {
width: 10%;
}
th:nth-of-type(2) {
width: 70%;
}
th, td {
height: 25px;
}
td:nth-of-type(2n-1) {
padding-left: 10px;
}
.add-location {
margin: 20px;
}
.add-location input[type=text] {
width: 75%;
height: 24px;
}
.add-location input[type=submit] {
background: #82D800;
padding: 5px 20px;
border: 1px solid black;
font-family: 'Roboto', sans-serif;
font-size: 1em;
color: #453333;
border-radius: 10px;
margin-left: 20px;
}
.back {
margin: 40px 0 0 20px;
}
.back a {
padding: 5px 20px;
background: red;
font-size: 1em;
color: #453333;
border-radius: 10px;
border: 1px solid black;
font-family: 'Roboto', sans-serif;
text-decoration: none;
}
.data-location td input {
font-size: 1em;
border: 0;
width: 100%;
padding: 5px 10px;
margin: 0px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
background: inherit;
}
.data-location .edit {
color: orange;
float: left;
cursor: pointer;
margin-left: 3px;
margin-top: 2px;
}
.data-location .delete {
color: red;
font-weight: bold;
float: right;
margin-right: 10px;
cursor: pointer;
margin-top: 2px;
}
\ No newline at end of file
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 06, 2017 at 08:57 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `pr-ojek`
--
-- --------------------------------------------------------
--
-- Table structure for table `drivers`
--
CREATE TABLE `drivers` (
`ID` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`total_rating` int(11) NOT NULL DEFAULT '0',
`total_passangers` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `drivers`
--
INSERT INTO `drivers` (`ID`, `name`, `total_rating`, `total_passangers`) VALUES
(2, 'Adya Naufal Fikri', 0, 0),
(3, 'Vigor Akbar', 0, 0),
(4, 'Turfa Auliarachman', 0, 0),
(5, 'Fildah Ananda Amalia', 0, 0);
-- --------------------------------------------------------
--
-- Table structure for table `driver_locations`
--
CREATE TABLE `driver_locations` (
`ID` int(11) NOT NULL,
`location` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `driver_locations`
--
INSERT INTO `driver_locations` (`ID`, `location`) VALUES
(2, 'Cisitu'),
(3, 'Cisitu'),
(3, 'Tubagus Ismail'),
(4, 'Tubagus Ismail'),
(4, 'Pelesiran'),
(2, 'Pelesiran'),
(5, 'Tubagus Ismail'),
(5, 'Tamansari'),
(5, 'Cisitu');
-- --------------------------------------------------------
--
-- Table structure for table `transaction`
--
CREATE TABLE `transaction` (
`ID` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`id_driver` int(11) NOT NULL,
`rating` int(11) NOT NULL,
`comment` varchar(1024) NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`picking_point` varchar(50) NOT NULL,
`destination` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `transaction`
--
INSERT INTO `transaction` (`ID`, `id_user`, `id_driver`, `rating`, `comment`, `time`, `picking_point`, `destination`) VALUES
(1, 1, 2, 4, 'Nebeng teross', '2017-10-06 18:00:30', 'tubagus ismail', 'pasar baru'),
(2, 3, 4, 3, 'Lamban banget euy', '2017-10-06 18:00:30', 'stasiun bandung', 'dipatiukur');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`ID` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`username` varchar(25) NOT NULL,
`email` varchar(30) NOT NULL,
`password` varchar(50) NOT NULL,
`phone_number` varchar(15) NOT NULL,
`driver` tinyint(1) NOT NULL,
`image` varchar(50) NOT NULL DEFAULT './img/profile-placeholder.png'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`ID`, `name`, `username`, `email`, `password`, `phone_number`, `driver`, `image`) VALUES
(1, 'Jehian', 'reiva5', 'jehiannormansaviero@gmail.com', '1arext1ar', '081382525626', 0, './img/HMIF-Jehian.jpg'),
(2, 'Adya Naufal Fikri', 'adyanf', 'adyanf@gmail.com', 'opsrtisuc', '089510149602', 1, './img/HMIF-Adya.jpg'),
(3, 'Vigor Akbar', 'vigorakbar', 'vigorakbar@gmail.com', 'bsuigasum', '08812387183', 1, './img/HMIF-Vigor.jpg'),
(4, 'Turfa Auliarachman', 'kingfalcon', 'nangisdarah@gmail.com', 'thtorhrot', '082132400651', 1, './img/HMIF-Turfa.jpg'),
(5, 'Fildah Ananda Amalia', 'fildahfreeze', 'fildahanandaamalia@gmail.com', 'nadlsshhsd', '081381767784', 1, './img/HMIF-Fildah.jpg');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `drivers`
--
ALTER TABLE `drivers`
ADD PRIMARY KEY (`ID`);
--
-- Indexes for table `driver_locations`
--
ALTER TABLE `driver_locations`
ADD KEY `ID` (`ID`);
--
-- Indexes for table `transaction`
--
ALTER TABLE `transaction`
ADD PRIMARY KEY (`ID`),
ADD KEY `id_driver` (`id_driver`),
ADD KEY `id_user` (`id_user`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `drivers`
--
ALTER TABLE `drivers`
ADD CONSTRAINT `drivers_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `users` (`ID`);
--
-- Constraints for table `driver_locations`
--
ALTER TABLE `driver_locations`
ADD CONSTRAINT `driver_locations_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `drivers` (`ID`);
--
-- Constraints for table `transaction`
--
ALTER TABLE `transaction`
ADD CONSTRAINT `transaction_ibfk_1` FOREIGN KEY (`id_driver`) REFERENCES `drivers` (`ID`),
ADD CONSTRAINT `transaction_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `users` (`ID`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<?php
require("includes/config.php");
if (isset($_GET["delete"])){
$id = $_GET["id_active"];
$location = $_GET["delete"];
$sql = "DELETE FROM driver_locations WHERE ID = $id AND location = '$location'";
if ($conn->query($sql) === TRUE) {
header("Refresh:0; url=editpreferredlocations.php?id_active=" . $id);
exit;
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
if (isset($_GET["update"])){
$id = $_GET["id_active"];
$location = $_GET["location"];
$update = $_GET["update"];
$sql = "UPDATE driver_locations SET location='$update' WHERE ID=$id AND location='$location'";
if ($conn->query($sql) === TRUE) {
header("Refresh:0; url=editpreferredlocations.php?id_active=" . $id);
exit;
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
?>
\ No newline at end of file
<?php
require('includes/config.php');
$id_active = $_GET["id_active"];
$sql = "SELECT driver FROM users WHERE ID=$id_active LIMIT 1";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)) {
$driver = $row["driver"];
}
if ($driver == 0){
header('Location: profile.php?id_active=' . $id_active);
echo "<script>console.log(" . $driver . ")</script>";
exit;
}
if(isset($_POST["back"])){
header('Location: profile.php?id_active=' . $id_active);
echo "<script>console.log('back')</script>";
exit;
}
if(isset($_POST["submit"])) {
$location = $_POST["location"];
$sql = "INSERT INTO driver_locations (ID, location)
VALUES ('$id_active', '$location')";
if ($conn->query($sql) === TRUE) {
header('Location: editpreferredlocations.php?id_active=' . $id_active);
echo "<script>console.log('get in')</script>";
exit;
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
$sql = "SELECT location FROM driver_locations WHERE ID=$id_active";
$result = mysqli_query($conn, $sql);
echo "<script>var id = " . $id_active . ";</script>"
?>
<!DOCTYPE html>
<html>
<head>
<title>Edit Profile</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="css/profile.css">
</head>
<body>
<div class="apps">
<div class="heading">
<h2>EDIT PREFERRED LOCATIONS</h2>
</div>
<table border="1" class="data-location">
<thead>
<tr>
<th>No</th>
<th>Location</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
while($row = mysqli_fetch_assoc($result)) {
$location = $row["location"];
echo "
<tr>
<td>". $i ."</td>
<td><input type='text' value='". $location ."' disabled></td>
<td><span class='edit'><i class='material-icons' onclick='editLocation(this)'>mode_edit</i></span><span class='delete'><i class='material-icons' onclick='deleteLocation(this)'>delete</i></span></td>
</tr>
";
$i += 1;
} ?>
</tbody>
</table>
<div class="add-location">
<h3>ADD NEW LOCATION</h3>
<form action="" method="post">
<input type="text" name="location" required>
<input type="submit" name="submit" value="ADD">
</form>
</div>
<div class="back">
<a href="<?php echo 'profile.php?id_active=' . $id_active ?>">BACK</a>
</div>
</div>
<script src="js/editlocation.js"></script>
</body>
</html>
<?php
require('includes/config.php');
$id_active = $_GET["id_active"];
$sql = "SELECT name, phone_number, driver, image FROM users WHERE ID=$id_active LIMIT 1";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)) {
$name = $row["name"];
$phone_number = $row["phone_number"];
$driver = $row["driver"];
$image = $row["image"];
}
if(isset($_POST["back"])){
header('Location: profile.php?id_active=' . $id_active);
}
if(isset($_POST["submit"])) {
$name = $_POST["name"];
$phone_number = $_POST["phone"];
$driver = (!isset($_POST["driver"])) ? 0 : 1;
$target_dir = "img/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
if($check !== false) {
//echo "File is an image - " . $check["mime"] . ".";
$uploadOk = 1;
} else {
//echo "File is not an image.";
$uploadOk = 0;
}
// Check if file already exists
if (file_exists($target_file)) {
//echo "Sorry, file already exists.";
$uploadOk = 0;
}
// Check file size
if ($_FILES["fileToUpload"]["size"] > 2000000) {
//echo "Sorry, your file is too large.";
$uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
&& $imageFileType != "gif" ) {
//echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";
$uploadOk = 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
//echo "Sorry, your file was not uploaded.";
$sql = "UPDATE users SET name='$name', phone_number='$phone_number', driver=$driver WHERE ID=$id_active";
// if everything is ok, try to upload file
} else {
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
//echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";
$image = './' . $target_file;
$sql = "UPDATE users SET name='$name', phone_number='$phone_number', driver=$driver, image='$image' WHERE ID=$id_active";
} else {
//echo "Sorry, there was an error uploading your file.";
$sql = "UPDATE users SET name='$name', phone_number='$phone_number', driver=$driver WHERE ID=$id_active";
}
}
if ($conn->query($sql) === TRUE) {
//echo "Record updated successfully";
} else {
//echo "Error updating record: " . $conn->error;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Edit Profile</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
<link rel="stylesheet" href="css/profile.css">
</head>
<body>
<div class="apps">
<div class="heading">
<h3>EDIT PROFILE INFORMATION</h3>
</div>
<form action="" method="post" enctype="multipart/form-data">
<div class="edit-img">
<div class="profile-img">
<img src="<?php echo $image ?>" alt="profile image" class="thumbnail">
</div>
<div class="update-img">
<h4>Update profile picture</h4>
<input id="uploadFile" type="text" disabled="disabled">
<div class="fileUpload">
<span>Browse...</span>
<input id="uploadBtn" name="fileToUpload" type="file" class="upload">
</div>
</div>
</div>
<div class="edit-data">
<div class="form-group">
<label for="name">Your Name</label>
<input id="name" type="text" name="name" placeholder="your name" value="<?php echo $name ?>" required>
</div>
<div class="form-group">
<label for="phone">Phone</label>
<input id="phone" type="text" name="phone" placeholder="your phone" value="<?php echo $phone_number?>" required>
</div>
<div class="form-group">
<label for="driver">Status Driver</label>
<label class="switch">
<?php if ($driver == 1){ ?>
<input name="driver" type="checkbox" checked>
<?php } else { ?>
<input name="driver" type="checkbox">
<?php } ?>
<span class="slider round"></span>
</label>
</div>
<div class="submit">
<input type="submit" class="cancel" name="back" value="BACK">
<input type="submit" class="save" name="submit" value="SAVE">
</div>
</div>
</form>
</div>
<script src="js/profile.js"></script>
</body>
</html>
<?php
require('includes/config.php');
$id_active = 2;
?>
<!DOCTYPE html>
<html>
<head>
<title>History</title>
<link rel="stylesheet" href="css/history.css">
</head>
<body>
<div class="contentBox">
<div class="mainHeader">
<div class="header1">
<div class="title"><span class="title green">PR</span>-<span class=" title red">OJEK</span></div>
<div class="subtitle">wush... wush... ngeeeeeenggg...</div>
</div>
<div class="header2">
<div class="username">Hi, <span class="username bold">pikachu!</span></div>
<div class="logout">Logout</div>
</div>
</div>
<div>
<div class="menu">ORDER</div>
<div class="menu active">HISTORY</div>
<div class="menu">MY PROFILE</div>
</div>
<h1>TRANSACTION HISTORY</h1>
<div>
<div class="submenu">MY PREVIOUS ORDERS</div>
<div class="submenu active">DRIVER HISTORY</div>
</div>
<?php
$sql = "SELECT * FROM transaction JOIN users ON (transaction.id_user=users.ID) WHERE transaction.id_driver=". $id_active;
$result = mysqli_query($conn,$sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo '<div class="listBox">';
$image = '<img src="' . $row['image'] . '" class="thumbnail">';
echo $image.'<div class="date">' . $row['time'] . '</div>';
echo '<div class="name"> ' . $row['name'];
echo '<div class="route"> ' . $row['picking_point'] . '-' . $row['destination'];
echo '<div class="rating"> Gave ' . $row['rating'] . ' stars';
echo '<br><br><br>';
'</div>';
}
} else {
echo "0 results";
}
$conn->close();
?>
<div class="listBox" id="lisbox1">
<img src="img/profile-placeholder.png" alt="profile image" class="thumbnail">
<button class="buttonHide" onclick="hideElement('lisbox1')">HIDE</button>
<div class="date">5 October 2017</div>
<div class="name">Elmo</div>
<div class="route">Magetan-Maospati</div>
<div class="rating">Gave star</div>
<div class="comment">
<div>and left comment:</div>
<div>tralalalala senang sekali ya kali semuanya bisa ikutan kan kuotanya cuma dikit tapi kalo emang kepengen banget paling bisa nebeng sama ojek yang lain kan udah fren ya</div>
</div>
</div>
<div class="listBox" id="lisbox2">
<img src="img/profile-placeholder.png" alt="profile image" class="thumbnail">
<button class="buttonHide" onclick="hideElement('lisbox2')">HIDE</button>
<div class="date">3 October 2017</div>
<div class="name">Bert</div>
<div class="route">Magetan-Madiun</div>
<div class="rating">Gave star</div>
<div class="comment">and left comment:</div>
</div>
</div>
<script src="js/history.js" type="text/javascript"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>History</title>
<link rel="stylesheet" href="css/history.css">
</head>
<body>
<div class="contentBox">
<div class="mainHeader">
<div class="header1">
<div class="title"><span class="title green">PR</span>-<span class=" title red">OJEK</span></div>
<div class="subtitle">wush... wush... ngeeeeeenggg...</div>
</div>
<div class="header2">
<div class="username">Hi, <span class="username bold">pikachu!</span></div>
<div class="logout">Logout</div>
</div>
</div>
<div>
<div class="menu">ORDER</div>
<div class="menu active">HISTORY</div>
<div class="menu">MY PROFILE</div>
</div>
<h1>TRANSACTION HISTORY</h1>
<div>
<div class="submenu active">MY PREVIOUS ORDERS</div>
<div class="submenu">DRIVER HISTORY</div>
</div>
<div class="listBox" id="lisbox1">
<img src="img/profile-placeholder.png" alt="profile image" class="thumbnail">
<button class="buttonHide" onclick="hideElement('lisbox1')">HIDE</button>
<div class="date">5 October 2017</div>
<div class="name">Elmo</div>
<div class="route">Magetan-Maospati</div>
<div class="rating">You rated: </div>
<div class="comment">
<div>You commented:
tralalalala senang sekali</div>
</div>
</div>
<div class="listBox" id="lisbox2">
<img src="img/profile-placeholder.png" alt="profile image" class="thumbnail">
<button class="buttonHide" onclick="hideElement('lisbox2')">HIDE</button>
<div class="date">3 October 2017</div>
<div class="name">Bert</div>
<div class="route">Magetan-Madiun</div>
<div class="rating">You rated:</div>
<div class="comment">You commented:</div>
</div>
</div>
<script src="js/history.js" type="text/javascript"></script>
</body>
</html>
\ No newline at end of file
img/HMIF-Adya.jpg

6.32 KiB

img/HMIF-Agung.jpg

73.1 KiB

img/HMIF-Aziz.jpg

7.51 KiB

img/HMIF-Fildah.jpg

147 KiB

img/HMIF-Jehian.jpg

6.87 KiB

img/HMIF-Turfa.jpg

8.1 KiB

img/HMIF-Vigor.jpg

6.98 KiB

img/profile-placeholder.png

1.31 KiB