From 27e6002d3cc71e1360b2cf4170e0cd7a85f54bb7 Mon Sep 17 00:00:00 2001 From: freedomfeather <fadlurohmanakmal@rocketmail.com> Date: Sat, 30 Sep 2017 13:26:35 +0700 Subject: [PATCH] Menambahkan login.php --- PR-Ojek.sql | 51 +++++++++++++++++++ css/.DS_Store | Bin 0 -> 6148 bytes css/default_style.css | 34 +++++++++++++ css/history.css | 0 css/login.css | 53 +++++++++++++++++++ css/main.css | 87 ++++++++++++++++++++++++++++++++ css/order.css | 0 css/profile.css | 0 history/driver_history.html | 0 history/order_history.html | 0 img/Logo.png | Bin 0 -> 4789 bytes index.php | 5 ++ login/login.html | 48 ++++++++++++++++++ login/login.php | 44 ++++++++++++++++ login/sign_up.html | 34 +++++++++++++ order/complete_order.html | 0 order/select_driver.html | 0 order/select_location.html | 0 profile_page/edit_identity.html | 0 profile_page/edit_location.html | 0 profile_page/profile.html | 5 ++ root/.DS_Store | Bin 10244 -> 14340 bytes root/css/.DS_Store | Bin 0 -> 6148 bytes root/css/color_scheme.txt | 7 +++ root/css/login.css | 39 ++++++++++---- root/login/login.html | 2 +- 26 files changed, 397 insertions(+), 12 deletions(-) create mode 100644 PR-Ojek.sql create mode 100644 css/.DS_Store create mode 100644 css/default_style.css create mode 100644 css/history.css create mode 100644 css/login.css create mode 100644 css/main.css create mode 100644 css/order.css create mode 100644 css/profile.css create mode 100644 history/driver_history.html create mode 100644 history/order_history.html create mode 100644 img/Logo.png create mode 100644 index.php create mode 100644 login/login.html create mode 100644 login/login.php create mode 100644 login/sign_up.html create mode 100644 order/complete_order.html create mode 100644 order/select_driver.html create mode 100644 order/select_location.html create mode 100644 profile_page/edit_identity.html create mode 100644 profile_page/edit_location.html create mode 100644 profile_page/profile.html create mode 100644 root/css/.DS_Store diff --git a/PR-Ojek.sql b/PR-Ojek.sql new file mode 100644 index 00000000..f1d90595 --- /dev/null +++ b/PR-Ojek.sql @@ -0,0 +1,51 @@ +-- Database PR-Ojek + +CREATE TABLE IF NOT EXISTS `user` ( + `user_id` INT NOT NULL, + `name` VARCHAR(50) NOT NULL, + `email` VARCHAR(50) NOT NULL, + `phone` VARCHAR(20) NOT NULL, + `username` VARCHAR(50) NOT NULL, + `password` VARCHAR(20) NOT NULL, + `status` VARCHAR(10) NOT NULL, + `pict` MEDIUMBLOB DEFAULT NULL, + + PRIMARY KEY (`user_id`) +); + +LOCK TABLES `user` WRITE; + +INSERT INTO `user` VALUES ('1','Donald Trump','donaldducktrump@gmail.com','08136','donaldduck','123456','Not_Driver',DEFAULT); +UNLOCK TABLES; + +CREATE TABLE IF NOT EXISTS `driver` ( + `driver_id` INT NOT NULL, + `total_score` DOUBLE(50,1) NOT NULL, + `votes` DOUBLE(50,1) NOT NULL, + + PRIMARY KEY (`driver_id`), + CONSTRAINT `driver_ibfk_1` FOREIGN KEY (`driver_id`) REFERENCES `user` (`user_id`) +); + +CREATE TABLE IF NOT EXISTS `driver_prefloc` ( + `driver_id` INT NOT NULL, + `pref_loc` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`driver_id`), + CONSTRAINT `driver_prefloc_ibfk_1` FOREIGN KEY (`driver_id`) REFERENCES `driver` (`driver_id`) +); + +CREATE TABLE IF NOT EXISTS `order` ( + `order_id` INT NOT NULL, + `dest_city` VARCHAR(50) NOT NULL, + `pick_city` VARCHAR(50) NOT NULL, + `score` DOUBLE(50,1) NOT NULL, + `comment` VARCHAR(140) NOT NULL, + `driver_id` INT NOT NULL, + `cust_id` INT NOT NULL, + `date` DATE NOT NULL, + + PRIMARY KEY (`order_id`), + CONSTRAINT `order_ibfk_1` FOREIGN KEY (`cust_id`) REFERENCES `user` (`user_id`), + CONSTRAINT `order_ibfk_2` FOREIGN KEY (`driver_id`) REFERENCES `driver` (`driver_id`) +); diff --git a/css/.DS_Store b/css/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**<q8>++&mCkOWA81W14cNZ<zv;LbK1Poaz?KmsK2CSc!( z0ynLxE!0092;Krf2c+FF_Fe*7ECH>lEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0<F0fCPF1$Cyrb|F7^5{eNG?83~ZUUlGt@xh*qZDeu<Z%US-OSsOPv j)R!Z4KLME7ReXlK;d!wEw5GODWMKRea10D2@KpjYNUI8I literal 0 HcmV?d00001 diff --git a/css/default_style.css b/css/default_style.css new file mode 100644 index 00000000..85ddefe1 --- /dev/null +++ b/css/default_style.css @@ -0,0 +1,34 @@ +body { + background-color: rgb(210,210,210); + color: rgb(250,250,250); +} + +.frame { + border: 7px solid rgb(65,62,119); + border-radius: 25px; + background-color: rgb(92,88,138); + margin: 50px auto; +} + +.frame h1,h2 { + text-align: center; +} + +input{ + width: 100%; + margin: 1px auto 15px; +} + +input[type="checkbox"]{ + width: 0; + margin-right: 10px; +} + +a:link, a:visited { + color: rgb(250,250,250); + text-decoration: none; +} + +a:hover { + color: rgb(167,180,4); +} diff --git a/css/history.css b/css/history.css new file mode 100644 index 00000000..e69de29b diff --git a/css/login.css b/css/login.css new file mode 100644 index 00000000..94aa0241 --- /dev/null +++ b/css/login.css @@ -0,0 +1,53 @@ +#login_frame { + height: 550px; + width: 400px; +} + +#login_frame > div { + left: 10%; + width: 80%; + height: auto; + position: relative; +} + +#login_frame input[type="submit"] { + border-radius: 40px; + background-color: rgb(191,216,255); + padding: 5px 3px; + display: block; + width: 30%; + border : none; + cursor : pointer; + margin: 0 auto 15px; +} + +#login_frame input[type="submit"]:hover { + opacity: 0.6; +} + +#sign_up_frame { + width: 400px; + height: 550px; +} + +#sign_up_frame input[type="submit"] { + border-radius: 40px; + background-color: rgb(191,216,255); + padding: 5px 3px; + display: block; + width: 30%; + border : none; + cursor : pointer; + margin: 0 auto 15px; +} + +#sign_up_frame input[type="submit"]:hover { + opacity : 0.6; +} + +#sign_up_frame > div { + left: 10%; + width: 80%; + height: auto; + position: relative; +} diff --git a/css/main.css b/css/main.css new file mode 100644 index 00000000..cda46d4e --- /dev/null +++ b/css/main.css @@ -0,0 +1,87 @@ +body { + background-color: rgb(210,210,210); + color: rgb(250,250,250); +} + +.frame { + border: 7px solid rgb(65,62,119); + border-radius: 25px; + background-color: rgb(92,88,138); + margin: 50px auto; +} + +#login_frame { + height: 550px; + width: 400px; +} + +.frame > h1 { + text-align: center; +} + +#login_frame > div { + left: 10%; + width: 80%; + height: auto; + position: relative; +} + +input{ + width: 100%; + margin: 1px auto 15px; +} + +#login_frame input[type="submit"] { + border-radius: 40px; + background-color: rgb(191,216,255); + padding: 5px 3px; + display: block; + width: 30%; + border : none; + cursor : pointer; + margin: 0 auto 15px; +} + +#login_frame input[type="submit"]:hover { + opacity: 0.6; +} + +#sign_up_frame { + width: 400px; + height: 550px; +} + +input[type="checkbox"]{ + width: 0; + margin-right: 10px; +} + +#sign_up_frame input[type="submit"] { + border-radius: 40px; + background-color: rgb(191,216,255); + padding: 5px 3px; + display: block; + width: 30%; + border : none; + cursor : pointer; + margin: 0 auto 15px; +} + +#sign_up_frame input[type="submit"]:hover { + opacity : 0.6; +} + +#sign_up_frame > div { + left: 10%; + width: 80%; + height: auto; + position: relative; +} + +a:link, a:visited { + color: rgb(250,250,250); +} + +a:hover { + color: rgb(167,180,4); +} diff --git a/css/order.css b/css/order.css new file mode 100644 index 00000000..e69de29b diff --git a/css/profile.css b/css/profile.css new file mode 100644 index 00000000..e69de29b diff --git a/history/driver_history.html b/history/driver_history.html new file mode 100644 index 00000000..e69de29b diff --git a/history/order_history.html b/history/order_history.html new file mode 100644 index 00000000..e69de29b diff --git a/img/Logo.png b/img/Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..3849b27530de90b627ec0113d548082c84322b64 GIT binary patch literal 4789 zcmbuD^;Z*)_r^z!a<rox86~N7H%N$p3}MnDN~bgv6qIhIQxJ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zYPc=ca*NXj(elmO0eeQexIYj8|A=G zKz!M%O+`e5gkaocHL_=a&WX23Q;Lh)u2V@bUp1qZA^iYNKa~N26VlNSHyr2(kNgMe z4ww~oc-$j-y?%BmAqI@Pj~#62O*g7hhQ!~KBN8P)7s}b6?=I@MSh$lrbsozx2)1u7 zFx}i$215<6mmDcBuewv*y^dA!>8H|tWkVRv7Vma`{U_wA<na+)?<2%w&vBUEi(QNX zavOtPy)95E;k~Xf_QT&pJ>Ti$gF`5ru{|UB=2RHp`ZIdHQh_cP$7zC@nM|(_ejv%_ z?->#WJA<6i?{41-!($uPRu2{&j#s(9G{2aS_fUU-fH!4<OiQo7;0PLnZTJ5ouJU{i z-bMv(>G&8`_$4@#?GdSTvBaJaS}ZIJ%)h>QR^;tO6-ZaLv!rYwUfRVOj(lpq`3TLq zUReA!sbRZc<?s<}1GRi3GO*&0;-CHWn2g&AG^CIb9BdlGy5p2E#`Bmp9l=QuSrSx3 z(X7PnD8#*B_PeM*WKm2D^8`PNK)DalyfhXo4)05Jf^(biy*iWqHW)+Gw}Q+*e6X8m z`Iv;e6!W2uPYr~(MbQd-is1*9-@<UkmgD}*?#twBgkrY7z+c%;;+y5Q`f)sBNMHSn zvdpBBr(;@Ywqt75Oz(fG&vPG@D^N8a_e&Di<jDt(F<q+;W9Y~`8=W#xdrqC;E*5#< z8A$A6g%5wvUI~bJ_52HBh(E}YCK=6a_dS)Vqo2im(E@KQL-ac?|AP-+q+Pru<N^~^ u`-wT%-K+PO2CeS@gUb9zbeytpNT8W+)YluH7XP>tz(B`DyH?Zw_5T2B9TTzu literal 0 HcmV?d00001 diff --git a/index.php b/index.php new file mode 100644 index 00000000..0fc24dd3 --- /dev/null +++ b/index.php @@ -0,0 +1,5 @@ +<?php + + header( 'Location: login/login.html' ) ; + +?> diff --git a/login/login.html b/login/login.html new file mode 100644 index 00000000..12818487 --- /dev/null +++ b/login/login.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html> + <head> + <title>Login to OneHundred</title> + <link rel="stylesheet" type="text/css" href="../css/default_style.css"> + <link rel="stylesheet" type="text/css" href="../css/login.css"> + </head> + <body> + <div id="login_frame" class="frame"> + <h1>Welcome to PR-Ojek<img src="../img/logo.png" style="width: 70px;height: 50px;float: right"></h1> + <p style="text-align: center">"An ojek for anything you need"</p> + <br/><br/> + <h2>--- Login ---</h2> + <p id="error_credential" style="text-align: center;"></p> + <div> + <form name="login" method="POST" action="login.php" onsubmit="return validate();"> + Username + <input type="text" name="user_name"><br/> + + Password + <input type="Password" name="user_password"><br/> + + <input type="submit" value="Login" > + </form> + + <a href="sign_up.html">Don't have an account?</a><br/> + </div> + </div> + <script> + function validate() + { + var username = document.login.user_name.value; + var password = document.login.user_password.value; + if (username==null || username=="") + { + window.alert("Username can't be blank"); + return false; + } + else if (password==null || password=="") + { + window.alert("Password can't be blank"); + return false; + } + } + </script> + + </body> +</html> diff --git a/login/login.php b/login/login.php new file mode 100644 index 00000000..50c7e2a6 --- /dev/null +++ b/login/login.php @@ -0,0 +1,44 @@ +<?php + if ($_SERVER["REQUEST_METHOD"] == "POST") { + if (!empty($_POST['user_name']) && !empty($_POST['user_password'])) { + $user = $_POST['user_name']; + $pass = $_POST['user_password']; + + $dbhost = '127.0.0.1:3306'; + $dbuser = 'root'; + $dbpass = ''; + $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error()); + mysql_select_db('PR_Ojek') or die('Could not select database '.mysql_error()); + $query=mysql_query("SELECT * FROM user WHERE username='".$user."' AND password='".$pass."'") or die(mysql_error()); + + $numrows=mysql_num_rows($query); + if($numrows!=0) + { + while($row=mysql_fetch_assoc($query)) + { + $dbusername=$row['username']; + $dbpassword=$row['password']; + } + + if($user == $dbusername && $pass == $dbpassword) + { + header("Location: ../profile_page/profile.html"); + } + } else { + include("login.html"); + echo "<script> + document.getElementById('error_credential').innerHTML = 'Invalid username or password!'; + </script>"; + header("Location: login.html"); + } + mysql_close($conn); + } + } + + function clean_input($data) { + $data = trim($data); + $data = stripslashes($data); + $data = htmlspecialchars($data); + return $data; + } +?> diff --git a/login/sign_up.html b/login/sign_up.html new file mode 100644 index 00000000..b73e8172 --- /dev/null +++ b/login/sign_up.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>Sign Up</title> + <link rel="stylesheet" type="text/css" href="../css/main.css"> +</head> +<body> + <div id="sign_up_frame" class="frame"> + <h1>-- Sign up --</h1> + + <div> + <form method="post"> + Your name + <input type="text" name="real_name"><br/> + Username + <input type="text" name="real_name"><br/> + Email + <input type="Email" name="real_name"><br/> + Password + <input type="Password" name="real_name"><br/> + Confirm password + <input type="Password" name="real_name"><br/> + Phone number + <input type="text" name="real_name"><br/> + + <input type="checkbox" name="is_driver" value="true">Also sign me up as a driver<br/> + + <input type="submit" value="REGISTER"> + </form> + </div> + </div> + +</body> +</html> \ No newline at end of file diff --git a/order/complete_order.html b/order/complete_order.html new file mode 100644 index 00000000..e69de29b diff --git a/order/select_driver.html b/order/select_driver.html new file mode 100644 index 00000000..e69de29b diff --git a/order/select_location.html b/order/select_location.html new file mode 100644 index 00000000..e69de29b diff --git a/profile_page/edit_identity.html b/profile_page/edit_identity.html new file mode 100644 index 00000000..e69de29b diff --git a/profile_page/edit_location.html b/profile_page/edit_location.html new file mode 100644 index 00000000..e69de29b diff --git a/profile_page/profile.html b/profile_page/profile.html new file mode 100644 index 00000000..8c0cb78f --- /dev/null +++ b/profile_page/profile.html @@ -0,0 +1,5 @@ +<html> +<body> +<h1> Profile </h1> +</body> +</html> diff --git a/root/.DS_Store b/root/.DS_Store index 87611abf29f628dd34791f9a54a1fd1ff143196a..28d70032ffb8020ad55473821aa2576f5d095cee 100644 GIT binary patch delta 1533 zcmb`He{54#6vxlEKiGTQWqWPct$o|t&W+9C*t#E%Eeh_ZY_JKs5sOTqT`PH^YfE1@ zkg1z-2{D3^+-Ly(hY&T02A6_Af<%omL1T=O8q`GpAR7KejmBSz@xH!|EDDK#c$53i zx#ygF&b{w^a_6_qr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zN2kbqd%MW&!!iDz!;j;fDYg0ROQ@O^8kBoni;0#O$!3%~EIZ(X*-rOQxXF1!cCX#M qU9d>Vf#r|!Lin1Mm(&i47nsOmKG&Uw&QrBVvVXXP;Q#RmBYy*6v0^0v delta 219 zcmZoEXbF&DU|?W$DortDU{C-uIe-{M3-C-V6q~3gIoZI3MHt9u0ILIvGZ+RZ=jRq| z-Y6Bty0O8ZiIWi|3)ILB6cT6Itj_a<nNec$YXz0b25Rn`d)1T~+0D##6by|mCa+PD zn|xK>ezE|I<Yp<w*-Vr91;jQVS59Kuyj_Tuaq>D5oyqc2*_-!B`2&sq#3;xNF<OBe uNV|gEv{{hjJM(0I6VJ*1JRAZ{5a()uQ~_OKFge3y;wBYMrpeodZUF$Zk}y61 diff --git a/root/css/.DS_Store b/root/css/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**<q8>++&mCkOWA81W14cNZ<zv;LbK1Poaz?KmsK2CSc!( z0ynLxE!0092;Krf2c+FF_Fe*7ECH>lEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0<F0fCPF1$Cyrb|F7^5{eNG?83~ZUUlGt@xh*qZDeu<Z%US-OSsOPv j)R!Z4KLME7ReXlK;d!wEw5GODWMKRea10D2@KpjYNUI8I literal 0 HcmV?d00001 diff --git a/root/css/color_scheme.txt b/root/css/color_scheme.txt index 2a381024..531e3123 100644 --- a/root/css/color_scheme.txt +++ b/root/css/color_scheme.txt @@ -3,3 +3,10 @@ lighter plum: rgb(92,88,138) pale cobalt blue: rgb(191,216,255) lime green: rgb(167,180,4) winter white: rgb(250, 250, 250) +<?php + if (headers_sent()) { + echo "<script> + document.getElementById('error_msg').innerHTML = 'Invalid username or password!'; + </script>"; + } + ?> \ No newline at end of file diff --git a/root/css/login.css b/root/css/login.css index 22bc8dc8..94aa0241 100644 --- a/root/css/login.css +++ b/root/css/login.css @@ -1,9 +1,8 @@ #login_frame { - height: 300px; - width: 400px; + height: 550px; + width: 400px; } - #login_frame > div { left: 10%; width: 80%; @@ -12,9 +11,18 @@ } #login_frame input[type="submit"] { - display: block; - width: 40px; - margin: 0 auto 15px; + border-radius: 40px; + background-color: rgb(191,216,255); + padding: 5px 3px; + display: block; + width: 30%; + border : none; + cursor : pointer; + margin: 0 auto 15px; +} + +#login_frame input[type="submit"]:hover { + opacity: 0.6; } #sign_up_frame { @@ -22,10 +30,19 @@ height: 550px; } -#sign_up_frame input[type="submit"]{ - display: block; - width: 80px; - margin: 15px auto; +#sign_up_frame input[type="submit"] { + border-radius: 40px; + background-color: rgb(191,216,255); + padding: 5px 3px; + display: block; + width: 30%; + border : none; + cursor : pointer; + margin: 0 auto 15px; +} + +#sign_up_frame input[type="submit"]:hover { + opacity : 0.6; } #sign_up_frame > div { @@ -33,4 +50,4 @@ width: 80%; height: auto; position: relative; -} \ No newline at end of file +} diff --git a/root/login/login.html b/root/login/login.html index 0c9b0066..8098f729 100644 --- a/root/login/login.html +++ b/root/login/login.html @@ -25,4 +25,4 @@ </div> </div> </body> -</html> \ No newline at end of file +</html> -- GitLab