diff --git a/css/color_scheme.jpg b/css/color_scheme.jpg new file mode 100755 index 0000000000000000000000000000000000000000..59a714d5f071528a5223c5b1ccaa94b0394d756b Binary files /dev/null and b/css/color_scheme.jpg differ diff --git a/css/color_scheme.txt b/css/color_scheme.txt new file mode 100755 index 0000000000000000000000000000000000000000..068986f10062517f5c3cb7de6bea201b1a4d1947 --- /dev/null +++ b/css/color_scheme.txt @@ -0,0 +1,5 @@ +plum: rgb(65,62,119) +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) \ No newline at end of file diff --git a/css/default_style.css b/css/default_style.css index 4305a148bab37b9d4c3cfce21013ac893014a08c..f19d8ffca646ddcb4b3a65b5bf97141d2f5490bd 100755 --- a/css/default_style.css +++ b/css/default_style.css @@ -4,8 +4,8 @@ body { } .frame { - border: 7px solid rgb(65,62,119); - border-radius: 25px; + border: 6px solid rgb(65,62,119); + border-radius: 10px; background-color: rgb(92,88,138); margin: 50px auto; } @@ -13,12 +13,27 @@ body { .frame h1,h2 { text-align: center; } - +.button { + background: rgb(65,62,119); + color: rgb(250, 250, 250); + border: 1px solid rgb(250, 250, 250); + border-radius: 20px; + text-shadow:none; + width: 60px; + height: 33px; +} +.button:hover { + background: rgb(191,216,255); + color: #fff; + border: 1px solid rgb(250, 250, 250); + border-radius: 20px; + text-shadow:none; + +} input{ width: 90%; margin: 1px auto 15px; } - a:link, a:visited { color: rgb(250,250,250); text-decoration: none; diff --git a/css/header.css b/css/header.css new file mode 100644 index 0000000000000000000000000000000000000000..599ff653f18f9c6c49bd82d158f878e8dfc8895c --- /dev/null +++ b/css/header.css @@ -0,0 +1,31 @@ +.header { + border-bottom-style: solid; + height: 10%; +} +.logo { + float: left; + height: 50px; +} +.logo h1 { + text-align: left; + margin: 0 ; +} +.logo p { + text-align: left; + margin: 0 auto; + font-size: 0.8em; +} +.greeting { + float: right; + font-size: 0.8em; +} +.greeting p { + text-align: right; + margin: 0 ; + margin-top: 10px; +} +.menu { + text-align: center; + background-color: rgb(65,62,119); + height: 20px; +} diff --git a/css/login.css b/css/login.css index 94aa02419da9dedefc260e60307e4b732ca6db2b..2e504a136b87e92a4660cc57ec7823ad8859bf0f 100755 --- a/css/login.css +++ b/css/login.css @@ -19,6 +19,7 @@ border : none; cursor : pointer; margin: 0 auto 15px; + color: rgb(92,88,138); } #login_frame input[type="submit"]:hover { @@ -26,8 +27,8 @@ } #sign_up_frame { + height: 550px; width: 400px; - height: 550px; } #sign_up_frame input[type="submit"] { diff --git a/css/profile.css b/css/profile.css index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..497b442ee445c17724db962ac0d432f8e2c4d342 100755 --- a/css/profile.css +++ b/css/profile.css @@ -0,0 +1,91 @@ +#profile_frame { + height: 550px; + width: 400px; +} +#profile_frame h1 { + text-align: left; + margin-top: 0; +} +.profile_subtitle { + height: 10%; +} +.profile_title { + float: left; +} +.profile_title h1 { + text-align: left; + margin: 0 ; +} +.edit_profile_button { + float: right; + margin-top: 0; + margin-right: 10 px; +} +.image_frame { + width: 100px; + height: 100px; + overflow: auto; + border-radius: 50%; + margin-left: auto; + margin-right: auto; +} +.image_frame img { + display: inline; + margin: 0 auto; + height: 100%; + width: 100%; +} +.myprofile { + text-align: center; + margin-left: auto; + margin-right: auto; +} +#edit_profile_page { + height: 550px; + width: 400px; + overflow-y: scroll; +} +#edit_profile_page h1 { + text-align: left; + margin-top: 0; +} +#edit_profile_page input[type="text"] { + width: 180px; +} +.edit_profile_frame { + text-align: left; + overflow-y: scroll; + height: 415px; +} +.edit_image_frame { + float: left; + width: 100px; + height: 100px; + overflow: auto; + border-radius: 50%; +} +.edit_image_frame img { + height: 100%; + width: 100%; +} +.select_pict { + display: flex; + position: relative; + top: 35px; + left: 5px; +} +.browse_file { + display: flex; + position: absolute; + top: 37px; + left: 300px; +} +input.upload_file { + display: flex; + position: relative; + display: inline; + text-align: right; + left: 0px; + height: 17px; + width: 100px; +} diff --git a/css/switch.css b/css/switch.css new file mode 100644 index 0000000000000000000000000000000000000000..f14ace18e595d432e6ff615cd1b43cd091915e76 --- /dev/null +++ b/css/switch.css @@ -0,0 +1,54 @@ +.switch { + position: relative; + display: inline-block; + width: 40px; + height: 20px; +} + +.switch input {display:none;} + +.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: 18px; + width: 18px; + left: 1px; + bottom: 1px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked + .slider { + background-color: #2196F3; +} + +input:focus + .slider { + box-shadow: 0 0 1px #2196F3; +} + +input:checked + .slider:before { + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); +} + +.slider.round { + border-radius: 34px; +} + +.slider.round:before { + border-radius: 50%; +} diff --git a/database/.DS_Store b/database/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 Binary files /dev/null and b/database/.DS_Store differ diff --git a/profile_page/edit_identity.html b/history/history.html similarity index 100% rename from profile_page/edit_identity.html rename to history/history.html diff --git a/img/default_profile.jpeg b/img/default_profile.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..9805553c60066b53089bd40a8722b6a23c2999fe Binary files /dev/null and b/img/default_profile.jpeg differ diff --git a/login/login.html b/login/login.html index 821a4413b7941e38c260acbd9fd8dc9d275a2614..546409238fc322f2864366f21b045267e083e081 100755 --- a/login/login.html +++ b/login/login.html @@ -7,7 +7,7 @@ </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> + <h2>Welcome to OneHundred<img src="../img/logo.png" style="width: 70px;height: 50px;float: right"></h2> <p style="text-align: center">"An ojek for anything you need"</p> <br/><br/> <h2>--- Login ---</h2> diff --git a/login/login.php b/login/login.php index 6c740789dd7c28eff14a3cc907d83d194cdff2f5..ae396437253f914d025eb916188050b2f19e5966 100755 --- a/login/login.php +++ b/login/login.php @@ -17,7 +17,9 @@ if($user == $dbusername && $pass == $dbpassword) { - header("Location: ../order/order.html"); + session_start(); + $_SESSION['user'] = $user; + header("Location: ../order/order.php"); } } else { include("login.html"); diff --git a/login/sign_up.php b/login/sign_up.php index f4dd99b4390a800df57a3632c1d502dbec629e33..2ee9ff3cdd6fbfc98cf916564d876482aec107d3 100644 --- a/login/sign_up.php +++ b/login/sign_up.php @@ -9,7 +9,7 @@ { include '../database/dbconnect.php'; $fullname = $_POST['full_name']; - $username = $_POST['user_name']; + $username = $_POST['username']; $email = $_POST['user_email']; $password = $_POST['user_password']; $phone = $_POST['user_phone']; @@ -26,10 +26,12 @@ $query = mysql_query("INSERT INTO user (name,email,phone,username,password,status,pict) VALUES ('$fullname', '$email', '$phone', '$username', '$password', '$status',DEFAULT)") or die(mysql_error()); if($query) { + session_start(); + $_SESSION['user'] = $username; if ($status == "customer") { - header("Location: ../order/order.html"); + header("Location: ../order/order.php"); } else { - header("Location: ../profile_page/profile.html"); + header("Location: ../profile_page/profile.php"); } } mysql_close(); diff --git a/order/order.html b/order/order.php similarity index 89% rename from order/order.html rename to order/order.php index fd7af2c6fad42de77261b3b05c58fa869e94311e..d0ff404f5c2af8b92753bdfe486619248cb05828 100644 --- a/order/order.html +++ b/order/order.php @@ -1,3 +1,4 @@ +<?php if (!isset($_SESSION['user'])) die("<br /><br />You must be logged in to view this page");?> <!DOCTYPE html> <html> <head> diff --git a/profile_page/.DS_Store b/profile_page/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 Binary files /dev/null and b/profile_page/.DS_Store differ diff --git a/profile_page/browse.png b/profile_page/browse.png new file mode 100644 index 0000000000000000000000000000000000000000..096065635aa31d1f51e34c61742d439bfb00c2be Binary files /dev/null and b/profile_page/browse.png differ diff --git a/profile_page/edit_profile.php b/profile_page/edit_profile.php new file mode 100755 index 0000000000000000000000000000000000000000..15a673dd3220097da8f83371bfd745095fa29390 --- /dev/null +++ b/profile_page/edit_profile.php @@ -0,0 +1,75 @@ +<?php //if (!isset($_SESSION['user'])) die("<br /><br />You must be logged in to view this page");?> +<html> +<head> + <title>U Wanna Call Me Beibh?</title> + <link rel="stylesheet" type="text/css" href="../css/default_style.css"> + <link rel="stylesheet" type="text/css" href="../css/profile.css"> + <link rel="stylesheet" type="text/css" href="../css/header.css"> + <link rel="stylesheet" type="text/css" href="../css/switch.css"> +</head> +<body> + <div class="frame" id="edit_profile_page"> + <div class="header"> + <?php include '../template/header.php';?> + </div> + <div class="menu"> + <?php include '../template/menu.php';?> + </div> + <h1>Edit Profile</h1> + <div class="edit_profile_frame"> + <form name="edit_identity" method="POST" action="" > + <div> + <div style="display: inline-block; position: relative; margin-left: 20px; height: 100px; width: 300px;"> + <div class="edit_image_frame"> + <img id="edit_profile_pict" src="default_profile.jpeg"> + </div> + <div class="select_pict"> + <input id="file_name" type="text" readonly="readonly"> + </div> + <div class="browse_file"> + <input type="file" class="upload_file" onchange="showFileName(this);"> + </div> + </div> + <div style="display: inline; position: relative; margin-left: 20px; top: 20px;"> + <div style="display: inline-block; position: relative; height: 100px; width: 100px;"> + <div style="height: 30px;"> + Your Name + </div> + <div style="height: 30px;"> + Phone + </div> + <div style="height: 30px;"> + Status Driver + </div> + </div> + <div style="display: inline-block; position: absolute; height: 100px; width: 250px;"> + <div style="height: 30px; margin-left: 10px;"> + <input name="edit_name" type="text" placeholder="New name" style="height: 20px; width: 260px;"> + </div> + <div style="height: 30px; margin-left: 10px;"> + <input name="edit_phone" type="text" placeholder="New email" style="height: 20px; width: 260px;"> + </div> + <div style="height: 30px; margin-left: 10px;"> + <label class="switch" style="float: right;"> + <input type="checkbox" value="Yes"> + <span class="slider round"></span> + </label> + </div> + </div> + </div> + </div> + <div> + <button class="button" style="float: left;"><a href="profile.php">BACK</a></button> + <input type="submit" value="SAVE" style="float: right;" class="button"> + </div> + </form> + </div> + </div> + <script> + function showFileName(inputFile) { + var arrTemp = inputFile.value.split('\\'); + document.getElementById("file_name").value = arrTemp[arrTemp.length - 1]; + } + </script> +</body> +</html> diff --git a/profile_page/pencil.png b/profile_page/pencil.png new file mode 100644 index 0000000000000000000000000000000000000000..617ae6a6e0d0cadcd56883374a00bdf5149044da Binary files /dev/null and b/profile_page/pencil.png differ diff --git a/profile_page/profile.html b/profile_page/profile.html deleted file mode 100755 index 8c0cb78fcd7a822c65f11c7d324a28a6b97096bc..0000000000000000000000000000000000000000 --- a/profile_page/profile.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> -<body> -<h1> Profile </h1> -</body> -</html> diff --git a/profile_page/profile.php b/profile_page/profile.php new file mode 100755 index 0000000000000000000000000000000000000000..150ea374cd3e6602e7ad1b3ea61ecf29cac0d28f --- /dev/null +++ b/profile_page/profile.php @@ -0,0 +1,52 @@ +<?php //if (!isset($_SESSION['user'])) die("<br /><br />You must be logged in to view this page");?> +<html> +<head> + <title>U Wanna Call Me Beibh?</title> + <link rel="stylesheet" type="text/css" href="../css/default_style.css"> + <link rel="stylesheet" type="text/css" href="../css/profile.css"> + <link rel="stylesheet" type="text/css" href="../css/header.css"> +</head> +<body> + <div class="frame" id="profile_frame"> + <div class="header"> + <?php include '../template/header.php';?> + </div> + <div class="menu"> + <?php include '../template/menu.php';?> + </div> + <div class="profile_subtitle"> + <div class="profile_title"><h1>My Profile</h1></div> + <div class="edit_profile_button"><a href="edit_profile.php">✎</a></div> + </div> + <div class="myprofile"> + <div class="image_frame"> + <img id="profile_pict" src="../img/default_profile.jpeg"> + </div> + <?php + include '../database/dbconnect.php'; + $user = "eHower"; + $query=mysql_query("SELECT * FROM user WHERE username='".$user."'") or die(mysql_error()); + + $numrows=mysql_num_rows($query); + if($numrows!=0) + { + while($row=mysql_fetch_assoc($query)) + { + echo "</br><strong>".$row['username']."</strong></br>"; + echo $row['name']."</br>"; + if ($row['status'] == "driver") { + echo "driver | Rating (xxx Votes)</br>"; + } + echo $row['email']."</br>"; + echo $row['phone']."</br>"; + /*if (isset($row['pict'])) { + echo "<script>document.getElementById('profile_pict').src = '../img/default_profile.jpeg'</script>"; + }*/ + } + } + mysql_close(); + ?> + </div> + </div> +</body> +</html> diff --git a/template/header.php b/template/header.php new file mode 100644 index 0000000000000000000000000000000000000000..cf59869662c20df6309d62a7410959121046da53 --- /dev/null +++ b/template/header.php @@ -0,0 +1,10 @@ +<?php + echo '<div class="logo"> + <h1>OneHundred</h1> + <p>"An ojek for anything you need"</p></br> + </div> + <div class="greeting"> + <p>Hello, "Eisenhower!"</p> + <p>Logout</p> + </div>'; +?> diff --git a/template/menu.php b/template/menu.php new file mode 100644 index 0000000000000000000000000000000000000000..1025a4052de67e249995bf35a0c0c27e3afc4127 --- /dev/null +++ b/template/menu.php @@ -0,0 +1,6 @@ +<?php + echo ' + <a href="../order/order.php">ORDER</a> + <a href="../history/history.php">HISTORY</a> + <a href="../profile_page/profile.php">PROFILE</a>'; +?>