Commit c033571e authored by Ton's avatar Ton

Onnodige files/folders verwijdered, site structuur verbeterd, paar comments in...

Onnodige files/folders verwijdered, site structuur verbeterd, paar comments in de code, login pagina aangemaakt die past met onze thema.
parent 39f6ab18
/nbproject/private/
\ No newline at end of file
Explanation of the file structure.
===============================================
PAD2016IRP04
|
|->WebContent
|
|->structure.txt (this file)
|->watchdad
|
|->activiteiten.php
|->inbox.php
|->index.php
|->leefpatroon.php
|->livefeed.php
|->status.php
|->bower_components
|->dist
|->js
|->modules
|
|->footer.php
|->functions.php
|->header.php
|->navigation.php
|->site_components
|
|->leefpatroon_ochtend.php
===============================================
All site parts are located within the watchdad folder because the site address (stienos.nl/watchdad/) makes it so that on the
server apache2 looks within the directory given in the config and adds /watchdad/ to that directory.
===============================================
Files within the *modules* folder are loaded in the main files. This takes away the neccessaty to edit navigation etc in
every main file on its own.
===============================================
livefeed.php is not loaded in navigation module atm.
===============================================
<?php
include('modules/backend/authentication.php'); // Includes Login Script
if(isset($_SESSION['login_user'])){
header("location: index.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Login Form in PHP with Session</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="main">
<h1>PHP Login Session Example</h1>
<div id="login">
<h2>Login Form</h2>
<form action="" method="post">
<label>UserName :</label>
<input id="name" name="username" placeholder="username" type="text">
<label>Password :</label>
<input id="password" name="password" placeholder="**********" type="password">
<input name="submit" type="submit" value=" Login ">
<span><?php echo $error; ?></span>
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
In de root komen de daadwerkelijke pagina's terecht van de website, dus de dingen waar de user bij mag en gaat komen.
De folder "dist" bevat de stylesheet, javascript en images van de template die we gebruiken (SB Admin v2).
+Als je foto's wil uploaden, deze graag dan in "dist/img" plaatsen.
+Als je zelf CSS classes wil aanmaken/passen, werk dan in het bestand "sb-admin-2.css".
-Graag wel een comment plaatsen bij de dingen die je hebt aangemaakt/gepast!
De folder "framework" bevat de nodige dependicies (Bootstrap, jQuery, etc.) om de website goed te laten functioneren.
+Hoeven we in principe nooit in te werken, tenzij we echt weten wat we doen en waarom we het doen.
De folder "modules" bevat componenten van de website, anders gezegd wel 'stukjes' van de website.
+De folder "modules/main" bevat alle componenten die wel bijna op alle pagina's wel worden geladen.
-Dus de footer, header, etc.
+Modules die speciaal voor een pagina worden gebruikt horen in de folder gestopt te worden met dezelfde naam als de pagina.
-Bijvoorbeeld: in de folder "modules/leefpatroon" zitten alleen de modules die worden gebruikt door "leefpatroon.php"
+De folder "modules/backend" bevat alle scripts/methodes die worden uitgevoerd in de back-end.
-Dus het authenticeren van de user, mail ophalen van de database, etc.
\ No newline at end of file
<!--
In activiteiten.php kan de user de kijken naar de activiteiten die zijn geregistreerd door het systeem.
Welke activiteiten er moeten worden waargenomen (of juist niet) wordt ingesteld door de user d.m.v leefpatroon (leefpatroon.php).
Momenteel statisch voor de show, zal in de toekomst dynamisch gemaakt worden wanneer nodig.
-->
<?php
include 'modules/sec_components/authentication.php';
include 'modules/backend/authentication.php';
$the_title = 'Activiteiten';
?>
<!DOCTYPE html>
<html lang="en">
<?php include 'modules/header.php'; ?>
<?php include 'modules/main/header.php'; ?>
<body>
<div id="wrapper">
<?php include 'modules/navigation/navigation.php'; ?>
<?php include 'modules/main/navigation.php'; ?>
<div id="page-wrapper">
<div class="row">
......@@ -173,7 +179,7 @@ $the_title = 'Activiteiten';
</div>
</div>
</div>
<?php include 'modules/footer.php'; ?>
<?php include 'modules/main/footer.php'; ?>
</div>
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* jquery.flot.tooltip
*
* description: easy-to-use tooltips for Flot charts
* version: 0.8.5
* authors: Krzysztof Urbas @krzysu [myviews.pl],Evan Steinkerchner @Roundaround
* website: https://github.com/krzysu/flot.tooltip
*
* build on 2015-05-11
* released under MIT License, 2012
*/
!function(a){var b = {tooltip:{show:!1, cssClass:"flotTip", content:"%s | X: %x | Y: %y", xDateFormat:null, yDateFormat:null, monthNames:null, dayNames:null, shifts:{x:10, y:20}, defaultTheme:!0, lines:!1, onHover:function(a, b){}, $compat:!1}}; b.tooltipOpts = b.tooltip; var c = function(a){this.tipPosition = {x:0, y:0}, this.init(a)}; c.prototype.init = function(b){function c(a){var c = {}; c.x = a.pageX, c.y = a.pageY, b.setTooltipPosition(c)}function d(c, d, f){var g = function(a, b, c, d){return Math.sqrt((c - a) * (c - a) + (d - b) * (d - b))}, h = function(a, b, c, d, e, f, h){if (!h || (h = function(a, b, c, d, e, f){if ("undefined" != typeof c)return{x:c, y:b}; if ("undefined" != typeof d)return{x:a, y:d}; var g, h = - 1 / ((f - d) / (e - c)); return{x:g = (e * (a * h - b + d) + c * (a * - h + b - f)) / (h * (e - c) + d - f), y:h * g - h * a + b}}(a, b, c, d, e, f), h.x >= Math.min(c, e) && h.x <= Math.max(c, e) && h.y >= Math.min(d, f) && h.y <= Math.max(d, f))){var i = d - f, j = e - c, k = c * f - d * e; return Math.abs(i * a + j * b + k) / Math.sqrt(i * i + j * j)}var l = g(a, b, c, d), m = g(a, b, e, f); return l > m?m:l}; if (f)b.showTooltip(f, d); else if (e.plotOptions.series.lines.show && e.tooltipOptions.lines === !0){var i = e.plotOptions.grid.mouseActiveRadius, j = {distance:i + 1}; a.each(b.getData(), function(a, c){for (var e = 0, f = - 1, i = 1; i < c.data.length; i++)c.data[i - 1][0] <= d.x && c.data[i][0] >= d.x && (e = i - 1, f = i); if ( - 1 === f)return void b.hideTooltip(); var k = {x:c.data[e][0], y:c.data[e][1]}, l = {x:c.data[f][0], y:c.data[f][1]}, m = h(c.xaxis.p2c(d.x), c.yaxis.p2c(d.y), c.xaxis.p2c(k.x), c.yaxis.p2c(k.y), c.xaxis.p2c(l.x), c.yaxis.p2c(l.y), !1); if (m < j.distance){var n = g(k.x, k.y, d.x, d.y) < g(d.x, d.y, l.x, l.y)?e:f, o = (c.datapoints.pointsize, [d.x, k.y + (l.y - k.y) * ((d.x - k.x) / (l.x - k.x))]), p = {datapoint:o, dataIndex:n, series:c, seriesIndex:a}; j = {distance:m, item:p}}}), j.distance < i + 1?b.showTooltip(j.item, d):b.hideTooltip()} else b.hideTooltip()}var e = this, f = a.plot.plugins.length; if (this.plotPlugins = [], f)for (var g = 0; f > g; g++)this.plotPlugins.push(a.plot.plugins[g].name); b.hooks.bindEvents.push(function(b, f){if (e.plotOptions = b.getOptions(), "boolean" == typeof e.plotOptions.tooltip && (e.plotOptions.tooltipOpts.show = e.plotOptions.tooltip, e.plotOptions.tooltip = e.plotOptions.tooltipOpts, delete e.plotOptions.tooltipOpts), e.plotOptions.tooltip.show !== !1 && "undefined" != typeof e.plotOptions.tooltip.show){e.tooltipOptions = e.plotOptions.tooltip, e.tooltipOptions.$compat?(e.wfunc = "width", e.hfunc = "height"):(e.wfunc = "innerWidth", e.hfunc = "innerHeight"); e.getDomElement(); a(b.getPlaceholder()).bind("plothover", d), a(f).bind("mousemove", c)}}), b.hooks.shutdown.push(function(b, e){a(b.getPlaceholder()).unbind("plothover", d), a(e).unbind("mousemove", c)}), b.setTooltipPosition = function(b){var c = e.getDomElement(), d = c.outerWidth() + e.tooltipOptions.shifts.x, f = c.outerHeight() + e.tooltipOptions.shifts.y; b.x - a(window).scrollLeft() > a(window)[e.wfunc]() - d && (b.x -= d), b.y - a(window).scrollTop() > a(window)[e.hfunc]() - f && (b.y -= f), e.tipPosition.x = b.x, e.tipPosition.y = b.y}, b.showTooltip = function(a, c){var d = e.getDomElement(), f = e.stringFormat(e.tooltipOptions.content, a); "" !== f && (d.html(f), b.setTooltipPosition({x:c.pageX, y:c.pageY}), d.css({left:e.tipPosition.x + e.tooltipOptions.shifts.x, top:e.tipPosition.y + e.tooltipOptions.shifts.y}).show(), "function" == typeof e.tooltipOptions.onHover && e.tooltipOptions.onHover(a, d))}, b.hideTooltip = function(){e.getDomElement().hide().html("")}}, c.prototype.getDomElement = function(){var b = a("." + this.tooltipOptions.cssClass); return 0 === b.length && (b = a("<div />").addClass(this.tooltipOptions.cssClass), b.appendTo("body").hide().css({position:"absolute"}), this.tooltipOptions.defaultTheme && b.css({background:"#fff", "z-index":"1040", padding:"0.4em 0.6em", "border-radius":"0.5em", "font-size":"0.8em", border:"1px solid #111", display:"none", "white-space":"nowrap"})), b}, c.prototype.stringFormat = function(a, b){var c, d, e, f, g = /%p\.{0,1}(\d{0,})/, h = /%s/, i = /%c/, j = /%lx/, k = /%ly/, l = /%x\.{0,1}(\d{0,})/, m = /%y\.{0,1}(\d{0,})/, n = "%x", o = "%y", p = "%ct"; if ("undefined" != typeof b.series.threshold?(c = b.datapoint[0], d = b.datapoint[1], e = b.datapoint[2]):"undefined" != typeof b.series.lines && b.series.lines.steps?(c = b.series.datapoints.points[2 * b.dataIndex], d = b.series.datapoints.points[2 * b.dataIndex + 1], e = ""):(c = b.series.data[b.dataIndex][0], d = b.series.data[b.dataIndex][1], e = b.series.data[b.dataIndex][2]), null === b.series.label && b.series.originSeries && (b.series.label = b.series.originSeries.label), "function" == typeof a && (a = a(b.series.label, c, d, b)), "boolean" == typeof a && !a)return""; if ("undefined" != typeof b.series.percent?f = b.series.percent:"undefined" != typeof b.series.percents && (f = b.series.percents[b.dataIndex]), "number" == typeof f && (a = this.adjustValPrecision(g, a, f)), a = "undefined" != typeof b.series.label?a.replace(h, b.series.label):a.replace(h, ""), a = "undefined" != typeof b.series.color?a.replace(i, b.series.color):a.replace(i, ""), a = this.hasAxisLabel("xaxis", b)?a.replace(j, b.series.xaxis.options.axisLabel):a.replace(j, ""), a = this.hasAxisLabel("yaxis", b)?a.replace(k, b.series.yaxis.options.axisLabel):a.replace(k, ""), this.isTimeMode("xaxis", b) && this.isXDateFormat(b) && (a = a.replace(l, this.timestampToDate(c, this.tooltipOptions.xDateFormat, b.series.xaxis.options))), this.isTimeMode("yaxis", b) && this.isYDateFormat(b) && (a = a.replace(m, this.timestampToDate(d, this.tooltipOptions.yDateFormat, b.series.yaxis.options))), "number" == typeof c && (a = this.adjustValPrecision(l, a, c)), "number" == typeof d && (a = this.adjustValPrecision(m, a, d)), "undefined" != typeof b.series.xaxis.ticks){var q; q = this.hasRotatedXAxisTicks(b)?"rotatedTicks":"ticks"; var r = b.dataIndex + b.seriesIndex; for (var s in b.series.xaxis[q])if (b.series.xaxis[q].hasOwnProperty(r) && !this.isTimeMode("xaxis", b)){var t = this.isCategoriesMode("xaxis", b)?b.series.xaxis[q][r].label:b.series.xaxis[q][r].v; t === c && (a = a.replace(l, b.series.xaxis[q][r].label))}}if ("undefined" != typeof b.series.yaxis.ticks)for (var s in b.series.yaxis.ticks)if (b.series.yaxis.ticks.hasOwnProperty(s)){var u = this.isCategoriesMode("yaxis", b)?b.series.yaxis.ticks[s].label:b.series.yaxis.ticks[s].v; u === d && (a = a.replace(m, b.series.yaxis.ticks[s].label))}return"undefined" != typeof b.series.xaxis.tickFormatter && (a = a.replace(n, b.series.xaxis.tickFormatter(c, b.series.xaxis).replace(/\$/g, "$$"))), "undefined" != typeof b.series.yaxis.tickFormatter && (a = a.replace(o, b.series.yaxis.tickFormatter(d, b.series.yaxis).replace(/\$/g, "$$"))), e && (a = a.replace(p, e)), a}, c.prototype.isTimeMode = function(a, b){return"undefined" != typeof b.series[a].options.mode && "time" === b.series[a].options.mode}, c.prototype.isXDateFormat = function(a){return"undefined" != typeof this.tooltipOptions.xDateFormat && null !== this.tooltipOptions.xDateFormat}, c.prototype.isYDateFormat = function(a){return"undefined" != typeof this.tooltipOptions.yDateFormat && null !== this.tooltipOptions.yDateFormat}, c.prototype.isCategoriesMode = function(a, b){return"undefined" != typeof b.series[a].options.mode && "categories" === b.series[a].options.mode}, c.prototype.timestampToDate = function(b, c, d){var e = a.plot.dateGenerator(b, d); return a.plot.formatDate(e, c, this.tooltipOptions.monthNames, this.tooltipOptions.dayNames)}, c.prototype.adjustValPrecision = function(a, b, c){var d, e = b.match(a); return null !== e && "" !== RegExp.$1 && (d = RegExp.$1, c = c.toFixed(d), b = b.replace(a, c)), b}, c.prototype.hasAxisLabel = function(b, c){return - 1 !== a.inArray(this.plotPlugins, "axisLabels") && "undefined" != typeof c.series[b].options.axisLabel && c.series[b].options.axisLabel.length > 0}, c.prototype.hasRotatedXAxisTicks = function(b){return - 1 !== a.inArray(this.plotPlugins, "tickRotor") && "undefined" != typeof b.series.xaxis.rotatedTicks}; var d = function(a){new c(a)}; a.plot.plugins.push({init:d, options:b, name:"tooltip", version:"0.8.5"})}(jQuery);
\ No newline at end of file
This diff is collapsed.
## Contributing to Flot ##
We welcome all contributions, but following these guidelines results in less
work for us, and a faster and better response.
### Issues ###
Issues are not a way to ask general questions about Flot. If you see unexpected
behavior but are not 100% certain that it is a bug, please try posting to the
[forum](http://groups.google.com/group/flot-graphs) first, and confirm that
what you see is really a Flot problem before creating a new issue for it. When
reporting a bug, please include a working demonstration of the problem, if
possible, or at least a clear description of the options you're using and the
environment (browser and version, jQuery version, other libraries) that you're
running under.
If you have suggestions for new features, or changes to existing ones, we'd
love to hear them! Please submit each suggestion as a separate new issue.
If you would like to work on an existing issue, please make sure it is not
already assigned to someone else. If an issue is assigned to someone, that
person has already started working on it. So, pick unassigned issues to prevent
duplicated effort.
### Pull Requests ###
To make merging as easy as possible, please keep these rules in mind:
1. Submit new features or architectural changes to the *&lt;version&gt;-work*
branch for the next major release. Submit bug fixes to the master branch.
2. Divide larger changes into a series of small, logical commits with
descriptive messages.
3. Rebase, if necessary, before submitting your pull request, to reduce the
work we need to do to merge it.
4. Format your code according to the style guidelines below.
### Flot Style Guidelines ###
Flot follows the [jQuery Core Style Guidelines](http://docs.jquery.com/JQuery_Core_Style_Guidelines),
with the following updates and exceptions:
#### Spacing ####
Use four-space indents, no tabs. Do not add horizontal space around parameter
lists, loop definitions, or array/object indices. For example:
```js
for ( var i = 0; i < data.length; i++ ) { // This block is wrong!
if ( data[ i ] > 1 ) {
data[ i ] = 2;
}
}
for (var i = 0; i < data.length; i++) { // This block is correct!
if (data[i] > 1) {
data[i] = 2;
}
}
```
#### Comments ####
Use [jsDoc](http://usejsdoc.org) comments for all file and function headers.
Use // for all inline and block comments, regardless of length.
All // comment blocks should have an empty line above *and* below them. For
example:
```js
var a = 5;
// We're going to loop here
// TODO: Make this loop faster, better, stronger!
for (var x = 0; x < 10; x++) {}
```
#### Wrapping ####
Block comments should be wrapped at 80 characters.
Code should attempt to wrap at 80 characters, but may run longer if wrapping
would hurt readability more than having to scroll horizontally. This is a
judgement call made on a situational basis.
Statements containing complex logic should not be wrapped arbitrarily if they
do not exceed 80 characters. For example:
```js
if (a == 1 && // This block is wrong!
b == 2 &&
c == 3) {}
if (a == 1 && b == 2 && c == 3) {} // This block is correct!
```
## Frequently asked questions ##
#### How much data can Flot cope with? ####
Flot will happily draw everything you send to it so the answer
depends on the browser. The excanvas emulation used for IE (built with
VML) makes IE by far the slowest browser so be sure to test with that
if IE users are in your target group (for large plots in IE, you can
also check out Flashcanvas which may be faster).
1000 points is not a problem, but as soon as you start having more
points than the pixel width, you should probably start thinking about
downsampling/aggregation as this is near the resolution limit of the
chart anyway. If you downsample server-side, you also save bandwidth.
#### Flot isn't working when I'm using JSON data as source! ####
Actually, Flot loves JSON data, you just got the format wrong.
Double check that you're not inputting strings instead of numbers,
like [["0", "-2.13"], ["5", "4.3"]]. This is most common mistake, and
the error might not show up immediately because Javascript can do some
conversion automatically.
#### Can I export the graph? ####
You can grab the image rendered by the canvas element used by Flot
as a PNG or JPEG (remember to set a background). Note that it won't
include anything not drawn in the canvas (such as the legend). And it
doesn't work with excanvas which uses VML, but you could try
Flashcanvas.
#### The bars are all tiny in time mode? ####
It's not really possible to determine the bar width automatically.
So you have to set the width with the barWidth option which is NOT in
pixels, but in the units of the x axis (or the y axis for horizontal
bars). For time mode that's milliseconds so the default value of 1
makes the bars 1 millisecond wide.
#### Can I use Flot with libraries like Mootools or Prototype? ####
Yes, Flot supports it out of the box and it's easy! Just use jQuery
instead of $, e.g. call jQuery.plot instead of $.plot and use
jQuery(something) instead of $(something). As a convenience, you can
put in a DOM element for the graph placeholder where the examples and
the API documentation are using jQuery objects.
Depending on how you include jQuery, you may have to add one line of
code to prevent jQuery from overwriting functions from the other
libraries, see the documentation in jQuery ("Using jQuery with other
libraries") for details.
#### Flot doesn't work with [insert name of Javascript UI framework]! ####
Flot is using standard HTML to make charts. If this is not working,