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
Showing
with 449 additions and 0 deletions
<?php
spl_autoload_register(function ($class) {
$prefix = 'MotaRaido\\';
$base_dir = APPDIR;
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
return;
}
$relative_class = substr($class, $len);
$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
if (file_exists($file)) {
require_once $file;
}
});
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Tubes2" default="default" basedir=".">
<description>Builds, tests, and runs the project Tubes2.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying
Example of pluging an obfuscator after the compilation could look like
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.
-->
</project>
Manifest-Version: 1.0
File added
File added
File added
File added
File added
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<context-root>/</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
<div class="footer">
<div>Dayu <br /> 13500000</div>
<div>Marvin <br /> 1350000</div>
<div>Adrian HP <br /> 13515091</div>
</div>
</body>
</html>
<%--
Document : HeaderWithMenu
Created on : Nov 4, 2017, 11:23:12 AM
Author : nim_13515091
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/profile.css"/>
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div>
<header class="header-box">
<div class="col-header-left">
<div>
<span class='logo-title'>MotoRaido</span><br />
<span class='tagline'>Anata to issho ni noru mōtā</span>
</div>
</div>
<div class="col-header-right">
<div>
Hi, <b><?php echo $this->user; ?></b> !
</div>
<div>
<a href="/Login">Logout</a>
</div>
</div>
</header>
<div class='menu'>
<div class="menu-column"></div>
<div class="menu-column"></div>
<div class="menu-column"></div>
<div id="orderheader" class="menu-cell"><a href="/Order" class="text-link">ORDER</a></div>
<div id="historyheader" class="menu-cell"><a href="/History" class="text-link">HISTORY</a></div>
<div id="profileheader" class="menu-cell"><a href="/Profile" class="text-link">MY PROFILE</a></div>
</div>
</div>
\ No newline at end of file
<div class="edit-profile-header">
Make an order
</div>
<div class="progress-container">
<div class="progress">
<div class="progress-num">1</div> Select Destination
</div>
<div class="progress">
<div class="progress-num">2</div> Select a driver
</div>
<div class="progress selected">
<div class="progress-num selected">3</div> Complete your order
</div>
</div>
<div class="edit-profile-header">
How was it?
</div>
<form action="/order/<?php echo $this->user; ?>/completeorder/finish" method="post" name="completeorder-form">
<div class="completeorder-container">
<input type='hidden' name='driver' value='<?php echo $this->driver; ?>'>
<input type='hidden' name='from' value='<?php echo $this->from; ?>'>
<input type='hidden' name='dest' value='<?php echo $this->dest; ?>'>
<img class="driver-completeorder-pic" src="<?php echo $this->image; ?>" alt="">
<div class="driver-name-disp">@<?php echo $this->driver; ?></div>
<div class="driver-fullname-disp"><?php echo $this->drivername; ?></div>
<span class="starRating">
<input id="rating5" type="radio" name="rating" value="5">
<label for="rating5">5</label>
<input id="rating4" type="radio" name="rating" value="4">
<label for="rating4">4</label>
<input id="rating3" type="radio" name="rating" value="3">
<label for="rating3">3</label>
<input id="rating2" type="radio" name="rating" value="2">
<label for="rating2">2</label>
<input id="rating1" type="radio" name="rating" value="1">
<label for="rating1">1</label>
</span>
<textarea cols="5" placeholder="Your comment..." name="comment"></textarea>
</div>
<div class="right-align">
<input class="accept-button select-driver-btn completeorder-btn" type="submit" value="Complete&#13;&#10;Order">
</div>
</form>
\ No newline at end of file
<div class="container">
<h1 class="header"><?php echo $this->title; ?></h1>
<form action=<?php echo '/preferred-loc/' . $this->user . '/edit'; ?> method="post">
<table style="width:100%">
<tr>
<th>No</th>
<th>Location</th>
<th>Actions</th>
</tr>
<?php
$count = 0;
foreach($this->prefLoc as $loc) {
$count = $count + 1;
echo "<tr class='rows'>";
echo "<td id='count'>" . $count . "</td>";
echo "<td><div name='location'>" . $loc['location'] . "</div></td>";
echo "<td id='action'><img class=\"pref-button\" name=\"edit-button\" src='" . IMG . "/edit.png' /><a href='/preferred-loc/" . $this->user . "/delete/" . $loc['location'] . "'><img class=\"pref-button\" src='" . IMG . "/delete.png' /></td></a>";
echo "</tr>";
}
?>
</table>
</form>
<form action=<?php echo '/preferred-loc/' . $this->user . '/finish'; ?> method='post' enctype="multipart/form-data">
<div class="edit-profile-btm">
<h2 class="header">Add new Location:</h2>
<div class="form-input">
<input type="text" id="next-button-text" name="location" />
<input class="next-button" type="submit" value="Add" />
</div>
</div>
</form>
</div>
<script>
var edit = Array.prototype.slice.call(document.getElementsByName('edit-button'));
var locs = document.getElementsByName('location');
var rows = document.getElementsByClassName('rows');
edit.map(function(x, i) {
var loc = locs[i].innerHTML;
x.addEventListener('click', function (event) {
event.preventDefault();
rows[i].cells[1].innerHTML = '<input type="text" name="location_new" value="' + loc + '" /><input type="hidden" name="location_old" value="' + loc + '"/>';
rows[i].cells[2].innerHTML = '<input type="submit" value="Save" />';
});
});
</script>
\ No newline at end of file
<div class="edit-profile-container">
<form action='/editprofile/<?php echo $this->user; ?>/finish' method='post' onsubmit="return editProfileValidation();" enctype="multipart/form-data" name="editprofile-form">
<h1 class="edit-profile-header">Edit Profile Information</h1>
<img id="profile-pic" src="<?php echo $this->image; ?>" alt="">
<div class="img-chooser">
<p>Update profile picture</p>
<input type="file" name="image" accept="image/jpeg, image/png">
</div>
<div class="edit-profile-btm">
<div class="form-editprofile">
<label for="your-name">Your Name</label>
<input class="ep-textarea" type="text" name="your-name" value="<?php echo $this->name; ?>">
</div>
<div class="form-editprofile">
<label for="phone-number">Phone</label>
<input class="ep-textarea" type="text" name="phone-number" value="<?php echo $this->phone; ?>">
</div>
<div class="button-form">
<div>
Status driver
</div>
<label class="switch">
<input type="checkbox" name="is-driver" <?php echo $this->isDriver; ?>>
<span class="slider round"></span>
</label>
</div>
<a href='/profile/<?php echo $this->user; ?>'><input class="cancel-button" value="Back"></a>
<input class="accept-button" id="save-profile" type="submit" value="Save">
</div>
</form>
</div>
\ No newline at end of file
<div class="subtitle-cont subtitle-history">
TRANSACTION HISTORY
</div>
<div class="body-container">
<div class='menu'>
<div class="menu-column"></div>
<div class="menu-column"></div>
<div id="user-his" class="menu-cell" onclick="tabActive('user');">MY PREVIOUS ORDERS</div>
<div id="driver-his" class="menu-cell" onclick="tabActive('driver');">DRIVER HISTORY</div>
</div>
</div>
<div id="history-container">
<ol class="history-list order-list">
<?php foreach($this->historyUser as $history): ?>
<li class="list-text-his">
<div class="history-pic-div">
<img class="profile-pic-his" src=<?php echo $this->image . $history[1]; ?> alt="">
</div>
<span class="hide">
<a href=<?php echo "/history/". $history[0] . "/update/" . $history[1] . "/" . rawurlencode($history[4]); ?>>HIDE</a>
</span>
<div class="his-text">
<div class="date-his"><?php echo htmlentities($history[4]); ?></div>
<div class="name-his"><b><?php echo $history[1]; ?></b></div>
<div><?php echo $history[5]; ?> - <?php echo $history[6]; ?></div>
<div>
You rated : ?<?php echo $history[2]; ?>
<div>
<div>
You commented:
<div class="comment">
<?php echo $history[3]; ?>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ol>
<ol class="history-list driver-list">
<?php foreach($this->historyDriver as $history): ?>
<li class="list-text-his">
<div class="history-pic-div">
<img class="profile-pic-his" src=<?php echo $this->image . $history[0]; ?> alt="" />
</div>
<span class="hide">
<a href=<?php echo "/history/". $history[0] . "/update/" . $history[1] . "/" . rawurlencode($history[4]); ?>>HIDE</a>
</span>
<div class="his-text">
<div class="date-his"><?php echo $history[4]; ?></div>
<div><b><?php echo $history[0]; ?></b></div>
<div><?php echo $history[5]; ?> - <?php echo $history[6]; ?></div>
<div>
gave <span><?php echo $history[2]; ?></span> stars for this order
<div>
<div>
and left comment:
<div class="comment">
<?php echo $history[3]; ?>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ol>
</div>
<script src=<?php echo $this->script; ?>></script>
\ No newline at end of file
<section class="content-layout">
<header class="title">
<div>
<hr>
<h1><?php echo $this->title; ?></h1>
<hr>
</div>
</header>
<section class="form-layout">
<form action="/Profile" method="post" name="loginform" onsubmit="return loginValidation();">
<div class="form-input">
<div>Username</div>
<input id="username" type="text" name="username">
</div>
<div class="form-input">
<div>Password</div>
<input type="password" name="password">
</div>
<div id="button-layout">
<div>
<a href="/Signup">Don't have an account?</a>
</div>
<input id="register-button" type="submit" value="GO!">
</div>
</form>
</section>
</section>
\ No newline at end of file
<div class="container">
<div class="edit-profile-header">
Make an order
</div>
<div class="progress-container">
<div class="progress selected">
<div class="progress-num">1</div> Select Destination
</div>
<div class="progress">
<div class="progress-num">2</div> Select a driver
</div>
<div class="progress">
<div class="progress-num">3</div> Complete your order
</div>
</div>
<form action="/SelectDriver" method='post'>
<div class="edit-profile-btm">
<div class="form-input">
<label for="pick-point">Picking point</label>
<input class="ep-textarea" type="text" name="pick-point" />
</div>
<div class="form-input">
<label for="destination">Destination</label>
<input class="ep-textarea" type="text" name="destination" />
</div>
<div class="form-input">
<label for="pref-driver">Preferred Driver</label>
<input class="ep-textarea" type="text" name="pref-driver" placeholder="(Optional)"/>
</div>
<div class="right-align">
<input class="accept-button select-driver-btn" id="save-profile" type="submit" value="Next" />
</div>
</div>
</form>
</div>
\ No newline at end of file
<div id="info-profile">
<div class="subtitle-cont">
<div class="subtitle-profile">
MY PROFILE
</div>
<a href="/EditProfile" >
<div id="edit-pen-div">
<img class="edit-pen" src=<?php echo $this->edit; ?>>
</div>
</a>
</div>
<div id="profile-pic-div">
<img class="profile-picture" src=<?php echo $this->image; ?>>
</div>
<div id="info-text">
<ol id="list-info">
<li><b><?php echo $this->username; ?></b></li>
<li><?php echo $this->name; ?></li>
<?php if($this->isdriver == 'Driver'): ?>
<li><?php echo $this->isdriver; ?> | <?php for($i = 0; $i<floor($this->rating); $i++) { echo "?"; } ?> (<?php echo $this->rating; ?> rating from <?php echo $this->votes; ?> votes)</li>
<?php endif; ?>
<li><?php echo $this->email; ?></i></li>
<li><?php echo $this->phone; ?></i></li>
</ol>
</div>
</div>
<div>
<div class="subtitle-cont">
<?php if($this->isdriver == 'Driver'): ?>
<div id="prefer-loc-title" class="subtitle-profile">
PREFERRED LOCATIONS:
</div>
<a href="/EditPrefLoc">
<div id="edit-pen-div">
<img class="edit-pen" src=<?php echo $this->edit; ?>>
</div>
</a>
</div>
<?php foreach ($this->preferredloc as $loc): ?>
<div id="info-pref-text">
<span class="loc-list"><?php echo " " . $loc[1] ?><span>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
\ No newline at end of file