diff --git a/content/backend.php b/backend/index.php
similarity index 91%
rename from content/backend.php
rename to backend/index.php
index 6c4f69b..5b9b5d9 100644
--- a/content/backend.php
+++ b/backend/index.php
@@ -23,7 +23,7 @@
* Bootstrap entrypoint, just calls Frontcontroller::run()
*/
-include '../init.php'; // initialize environment (error handling, configuration, class autoloading)
+include 'init.php'; // initialize environment (error handling, configuration, class autoloading)
try {
$fc = new FrontController(); // spawn frontcontroller
diff --git a/init.php b/backend/init.php
similarity index 89%
rename from init.php
rename to backend/init.php
index 1799231..d42adc5 100644
--- a/init.php
+++ b/backend/init.php
@@ -49,15 +49,13 @@ function __autoload($className) {
'/^(.*Controller)$/' => 'controller/$1'
);
- $include = preg_replace(array_keys($mapping), array_values($mapping), $className);
+ $include = $libs . strtolower(preg_replace(array_keys($mapping), array_values($mapping), $className)) . '.php';
if (empty($include)) {
throw new CustomException('Cannot load class ' . $className . '! Name not mapped.');
}
-
- $include = $libs . strtolower($include) . '.php';
- if (file_exists($include)) {
+ if (!file_exists($include)) {
throw new CustomException('Cannot load class ' . $className . '! File does not exist: ' . $include);
}
@@ -71,10 +69,10 @@ error_reporting(E_ALL);
set_error_handler(array('CustomErrorException', 'errorHandler'));
// load configuration into registry
-if (!file_exists('volkszaehler.conf.php')) {
+if (!file_exists(__DIR__ . '/volkszaehler.conf.php')) {
throw new CustomException('No configuration available! Use volkszaehler.conf.default.php as an template');
}
-include 'volkszaehler.conf.php';
+include __DIR__ . '/volkszaehler.conf.php';
?>
\ No newline at end of file
diff --git a/lib/controller/channelcontroller.php b/backend/lib/controller/channelcontroller.php
similarity index 100%
rename from lib/controller/channelcontroller.php
rename to backend/lib/controller/channelcontroller.php
diff --git a/lib/controller/controller.php b/backend/lib/controller/controller.php
similarity index 100%
rename from lib/controller/controller.php
rename to backend/lib/controller/controller.php
diff --git a/lib/controller/frontcontroller.php b/backend/lib/controller/frontcontroller.php
similarity index 100%
rename from lib/controller/frontcontroller.php
rename to backend/lib/controller/frontcontroller.php
diff --git a/lib/model/channel.php b/backend/lib/model/channel.php
similarity index 100%
rename from lib/model/channel.php
rename to backend/lib/model/channel.php
diff --git a/lib/model/channel/meter.php b/backend/lib/model/channel/meter.php
similarity index 100%
rename from lib/model/channel/meter.php
rename to backend/lib/model/channel/meter.php
diff --git a/lib/model/channel/meter/powermeter.php b/backend/lib/model/channel/meter/powermeter.php
similarity index 100%
rename from lib/model/channel/meter/powermeter.php
rename to backend/lib/model/channel/meter/powermeter.php
diff --git a/lib/model/channel/sensor.php b/backend/lib/model/channel/sensor.php
similarity index 100%
rename from lib/model/channel/sensor.php
rename to backend/lib/model/channel/sensor.php
diff --git a/lib/model/channel/sensor/onewiresensor.php b/backend/lib/model/channel/sensor/onewiresensor.php
similarity index 100%
rename from lib/model/channel/sensor/onewiresensor.php
rename to backend/lib/model/channel/sensor/onewiresensor.php
diff --git a/lib/model/database.php b/backend/lib/model/database.php
similarity index 100%
rename from lib/model/database.php
rename to backend/lib/model/database.php
diff --git a/lib/model/databaseobject.php b/backend/lib/model/databaseobject.php
similarity index 100%
rename from lib/model/databaseobject.php
rename to backend/lib/model/databaseobject.php
diff --git a/lib/model/db/mysql.php b/backend/lib/model/db/mysql.php
similarity index 100%
rename from lib/model/db/mysql.php
rename to backend/lib/model/db/mysql.php
diff --git a/lib/model/db/pgsql.php b/backend/lib/model/db/pgsql.php
similarity index 100%
rename from lib/model/db/pgsql.php
rename to backend/lib/model/db/pgsql.php
diff --git a/lib/model/db/sqlite.php b/backend/lib/model/db/sqlite.php
similarity index 100%
rename from lib/model/db/sqlite.php
rename to backend/lib/model/db/sqlite.php
diff --git a/lib/model/group.php b/backend/lib/model/group.php
similarity index 100%
rename from lib/model/group.php
rename to backend/lib/model/group.php
diff --git a/lib/model/user.php b/backend/lib/model/user.php
similarity index 100%
rename from lib/model/user.php
rename to backend/lib/model/user.php
diff --git a/lib/util/exceptions.php b/backend/lib/util/exceptions.php
similarity index 100%
rename from lib/util/exceptions.php
rename to backend/lib/util/exceptions.php
diff --git a/lib/util/registry.php b/backend/lib/util/registry.php
similarity index 100%
rename from lib/util/registry.php
rename to backend/lib/util/registry.php
diff --git a/lib/view/http/httphandle.php b/backend/lib/view/http/httphandle.php
similarity index 100%
rename from lib/view/http/httphandle.php
rename to backend/lib/view/http/httphandle.php
diff --git a/lib/view/http/httprequest.php b/backend/lib/view/http/httprequest.php
similarity index 100%
rename from lib/view/http/httprequest.php
rename to backend/lib/view/http/httprequest.php
diff --git a/lib/view/http/httpresponse.php b/backend/lib/view/http/httpresponse.php
similarity index 100%
rename from lib/view/http/httpresponse.php
rename to backend/lib/view/http/httpresponse.php
diff --git a/lib/view/jsonview.php b/backend/lib/view/jsonview.php
similarity index 100%
rename from lib/view/jsonview.php
rename to backend/lib/view/jsonview.php
diff --git a/lib/view/view.php b/backend/lib/view/view.php
similarity index 100%
rename from lib/view/view.php
rename to backend/lib/view/view.php
diff --git a/volkszaehler.conf.default.php b/backend/volkszaehler.conf.default.php
similarity index 100%
rename from volkszaehler.conf.default.php
rename to backend/volkszaehler.conf.default.php
diff --git a/content/images/ladebild.gif b/frontend/images/ladebild.gif
similarity index 100%
rename from content/images/ladebild.gif
rename to frontend/images/ladebild.gif
diff --git a/content/index.html b/frontend/index.html
similarity index 93%
rename from content/index.html
rename to frontend/index.html
index cf5c555..aa451a0 100644
--- a/content/index.html
+++ b/frontend/index.html
@@ -197,7 +197,7 @@ $(document).ready(function() {
// load channel list
// load json data
- $.getJSON("backend.php",{uuid: myUUID, controller: 'channel', action: 'get', data: 'channels'}, function(j){
+ $.getJSON("../backend/index.php",{uuid: myUUID, controller: 'channel', action: 'get', data: 'channels'}, function(j){
$('#channelList').empty();
@@ -262,10 +262,10 @@ function getData() {
// calcMyWindowStart
myWindowStart = calcMyWindowStart();
- //$('#debug').append('json');
+ //$('#debug').append('json');
// load json data with given time window
- //$.getJSON("backend.php",{uuid: myUUID,mode: 'getPulses', ids: ids_parameter, windowEnd: myWindowEnd, windowSize: f.window.value.substring(0,1), windowInterval: f.window.value.substring(1)}, function(j){
- $.getJSON("backend.php",{uuid: myUUID, controller: 'channel', action: 'get', data: 'pulses', ids: ids_parameter, from: myWindowStart, to: myWindowEnd, groupBy: f.grouping.value}, function(j){
+ //$.getJSON("../backend/index.php",{uuid: myUUID,mode: 'getPulses', ids: ids_parameter, windowEnd: myWindowEnd, windowSize: f.window.value.substring(0,1), windowInterval: f.window.value.substring(1)}, function(j){
+ $.getJSON("../backend/index.php",{uuid: myUUID, controller: 'channel', action: 'get', data: 'pulses', ids: ids_parameter, from: myWindowStart, to: myWindowEnd, groupBy: f.grouping.value}, function(j){
data = j;
//$('#debug').empty().append(data.toSource());
// then show/reload the chart
diff --git a/content/javascript/jqplot/MIT-LICENSE.txt b/frontend/javascript/jqplot/MIT-LICENSE.txt
similarity index 100%
rename from content/javascript/jqplot/MIT-LICENSE.txt
rename to frontend/javascript/jqplot/MIT-LICENSE.txt
diff --git a/content/javascript/jqplot/README.txt b/frontend/javascript/jqplot/README.txt
similarity index 100%
rename from content/javascript/jqplot/README.txt
rename to frontend/javascript/jqplot/README.txt
diff --git a/content/javascript/jqplot/changes.txt b/frontend/javascript/jqplot/changes.txt
similarity index 100%
rename from content/javascript/jqplot/changes.txt
rename to frontend/javascript/jqplot/changes.txt
diff --git a/content/javascript/jqplot/copyright.txt b/frontend/javascript/jqplot/copyright.txt
similarity index 100%
rename from content/javascript/jqplot/copyright.txt
rename to frontend/javascript/jqplot/copyright.txt
diff --git a/content/javascript/jqplot/excanvas.js b/frontend/javascript/jqplot/excanvas.js
similarity index 100%
rename from content/javascript/jqplot/excanvas.js
rename to frontend/javascript/jqplot/excanvas.js
diff --git a/content/javascript/jqplot/excanvas.min.js b/frontend/javascript/jqplot/excanvas.min.js
similarity index 100%
rename from content/javascript/jqplot/excanvas.min.js
rename to frontend/javascript/jqplot/excanvas.min.js
diff --git a/content/javascript/jqplot/gpl-2.0.txt b/frontend/javascript/jqplot/gpl-2.0.txt
similarity index 100%
rename from content/javascript/jqplot/gpl-2.0.txt
rename to frontend/javascript/jqplot/gpl-2.0.txt
diff --git a/content/javascript/jqplot/jqPlotCssStyling.txt b/frontend/javascript/jqplot/jqPlotCssStyling.txt
similarity index 100%
rename from content/javascript/jqplot/jqPlotCssStyling.txt
rename to frontend/javascript/jqplot/jqPlotCssStyling.txt
diff --git a/content/javascript/jqplot/jqPlotOptions.txt b/frontend/javascript/jqplot/jqPlotOptions.txt
similarity index 100%
rename from content/javascript/jqplot/jqPlotOptions.txt
rename to frontend/javascript/jqplot/jqPlotOptions.txt
diff --git a/content/javascript/jqplot/jquery-1.3.2.min.js b/frontend/javascript/jqplot/jquery-1.3.2.min.js
similarity index 100%
rename from content/javascript/jqplot/jquery-1.3.2.min.js
rename to frontend/javascript/jqplot/jquery-1.3.2.min.js
diff --git a/content/javascript/jqplot/jquery.jqplot.css b/frontend/javascript/jqplot/jquery.jqplot.css
similarity index 100%
rename from content/javascript/jqplot/jquery.jqplot.css
rename to frontend/javascript/jqplot/jquery.jqplot.css
diff --git a/content/javascript/jqplot/jquery.jqplot.js b/frontend/javascript/jqplot/jquery.jqplot.js
similarity index 100%
rename from content/javascript/jqplot/jquery.jqplot.js
rename to frontend/javascript/jqplot/jquery.jqplot.js
diff --git a/content/javascript/jqplot/jquery.jqplot.min.css b/frontend/javascript/jqplot/jquery.jqplot.min.css
similarity index 100%
rename from content/javascript/jqplot/jquery.jqplot.min.css
rename to frontend/javascript/jqplot/jquery.jqplot.min.css
diff --git a/content/javascript/jqplot/jquery.jqplot.min.js b/frontend/javascript/jqplot/jquery.jqplot.min.js
similarity index 100%
rename from content/javascript/jqplot/jquery.jqplot.min.js
rename to frontend/javascript/jqplot/jquery.jqplot.min.js
diff --git a/content/javascript/jqplot/optionsTutorial.txt b/frontend/javascript/jqplot/optionsTutorial.txt
similarity index 100%
rename from content/javascript/jqplot/optionsTutorial.txt
rename to frontend/javascript/jqplot/optionsTutorial.txt
diff --git a/content/javascript/jqplot/plugins/jqplot.barRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.barRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.barRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.barRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.barRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.barRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.barRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.barRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.canvasTextRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.canvasTextRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.canvasTextRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.canvasTextRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.canvasTextRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.canvasTextRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.canvasTextRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.canvasTextRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.categoryAxisRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.cursor.js b/frontend/javascript/jqplot/plugins/jqplot.cursor.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.cursor.js
rename to frontend/javascript/jqplot/plugins/jqplot.cursor.js
diff --git a/content/javascript/jqplot/plugins/jqplot.cursor.min.js b/frontend/javascript/jqplot/plugins/jqplot.cursor.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.cursor.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.cursor.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.dateAxisRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.dateAxisRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.dateAxisRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.dateAxisRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.dateAxisRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.dateAxisRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.dateAxisRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.dateAxisRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.dragable.js b/frontend/javascript/jqplot/plugins/jqplot.dragable.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.dragable.js
rename to frontend/javascript/jqplot/plugins/jqplot.dragable.js
diff --git a/content/javascript/jqplot/plugins/jqplot.dragable.min.js b/frontend/javascript/jqplot/plugins/jqplot.dragable.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.dragable.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.dragable.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.highlighter.js b/frontend/javascript/jqplot/plugins/jqplot.highlighter.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.highlighter.js
rename to frontend/javascript/jqplot/plugins/jqplot.highlighter.js
diff --git a/content/javascript/jqplot/plugins/jqplot.highlighter.min.js b/frontend/javascript/jqplot/plugins/jqplot.highlighter.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.highlighter.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.highlighter.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.logAxisRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.logAxisRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.logAxisRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.logAxisRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.logAxisRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.logAxisRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.logAxisRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.logAxisRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.mekkoRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.mekkoRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.mekkoRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.mekkoRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.mekkoRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.mekkoRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.mekkoRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.mekkoRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.ohlcRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.ohlcRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.ohlcRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.ohlcRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.ohlcRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.ohlcRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.ohlcRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.ohlcRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.pieRenderer.js b/frontend/javascript/jqplot/plugins/jqplot.pieRenderer.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.pieRenderer.js
rename to frontend/javascript/jqplot/plugins/jqplot.pieRenderer.js
diff --git a/content/javascript/jqplot/plugins/jqplot.pieRenderer.min.js b/frontend/javascript/jqplot/plugins/jqplot.pieRenderer.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.pieRenderer.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.pieRenderer.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.pointLabels.js b/frontend/javascript/jqplot/plugins/jqplot.pointLabels.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.pointLabels.js
rename to frontend/javascript/jqplot/plugins/jqplot.pointLabels.js
diff --git a/content/javascript/jqplot/plugins/jqplot.pointLabels.js.orig b/frontend/javascript/jqplot/plugins/jqplot.pointLabels.js.orig
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.pointLabels.js.orig
rename to frontend/javascript/jqplot/plugins/jqplot.pointLabels.js.orig
diff --git a/content/javascript/jqplot/plugins/jqplot.pointLabels.min.js b/frontend/javascript/jqplot/plugins/jqplot.pointLabels.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.pointLabels.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.pointLabels.min.js
diff --git a/content/javascript/jqplot/plugins/jqplot.trendline.js b/frontend/javascript/jqplot/plugins/jqplot.trendline.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.trendline.js
rename to frontend/javascript/jqplot/plugins/jqplot.trendline.js
diff --git a/content/javascript/jqplot/plugins/jqplot.trendline.min.js b/frontend/javascript/jqplot/plugins/jqplot.trendline.min.js
similarity index 100%
rename from content/javascript/jqplot/plugins/jqplot.trendline.min.js
rename to frontend/javascript/jqplot/plugins/jqplot.trendline.min.js
diff --git a/content/javascript/jqplot/usage.txt b/frontend/javascript/jqplot/usage.txt
similarity index 100%
rename from content/javascript/jqplot/usage.txt
rename to frontend/javascript/jqplot/usage.txt
diff --git a/content/javascript/jquery-1.4.2.min.js b/frontend/javascript/jquery-1.4.2.min.js
similarity index 100%
rename from content/javascript/jquery-1.4.2.min.js
rename to frontend/javascript/jquery-1.4.2.min.js
diff --git a/content/javascript/smartmeter.js b/frontend/javascript/smartmeter.js
similarity index 100%
rename from content/javascript/smartmeter.js
rename to frontend/javascript/smartmeter.js
diff --git a/share/tools/import.php b/share/tools/import.php
index b3060f9..a6f5635 100644
--- a/share/tools/import.php
+++ b/share/tools/import.php
@@ -23,7 +23,7 @@
* simple script to import demo pulses
*/
-include '../include/init.php';
+include '../../backend/init.php';
$dbh = Database::getConnection();
diff --git a/share/tools/tests.php b/share/tools/tests.php
index 0f27b14..2a50720 100644
--- a/share/tools/tests.php
+++ b/share/tools/tests.php
@@ -19,7 +19,7 @@
* http://www.gnu.org/copyleft/gpl.html
*/
-include '../../init.php';
+include '../../backend/init.php';
$user = User::getByEMail($_GET['email']);
$groups = $user->getGroups(true);