diff --git a/src/webui/about.html b/src/webui/about.html new file mode 100644 index 00000000..74269c28 --- /dev/null +++ b/src/webui/about.html @@ -0,0 +1,25 @@ +

AC-Tube Manager V0.00001

+ +

+ AC-Tube is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +

+ +

+ + libcapwap is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +

+ +

+ You should have received a copy of the GNU General Public License + along with Foobar. If not, see + http://www.gnu.org/licenses/ + +

+ + diff --git a/src/webui/actube.php b/src/webui/actube.php new file mode 100644 index 00000000..c9ded72c --- /dev/null +++ b/src/webui/actube.php @@ -0,0 +1,26 @@ +open("../ac/ac.sqlite3"); + } + +} + + +$db = new DB(); + +$results = $db->query("SELECT acid as id, acname as name ,lastseen>datetime('now','-10 second') as active FROM acs;"); + +$r= array(); + +while ($row = $results->fetchArray()) { + array_push($r,$row); + +} +$j = json_encode ($r); +echo "$j"; + diff --git a/src/webui/app.js b/src/webui/app.js new file mode 100644 index 00000000..34a17dbf --- /dev/null +++ b/src/webui/app.js @@ -0,0 +1,48 @@ +'use strict'; + +angular.module('ACTubeManApp', ['ngAnimate', 'ngRoute']) + + .config(function($routeProvider) { + $routeProvider + .when('/', { templateUrl: 'articles.html' }) + .when('/wtps', { template: 'WTPs' }) + .when('/about', { templateUrl: 'about.html' }) + .otherwise({ redirectTo: '/'}); + }) + + + .directive('price', function(){ + return { + restrict: 'E', + scope: { + value: '=' + }, + template: 'kostenlos' + + '{{value | currency}}' + } + }) + .factory('Cart', function() { + var items = []; + return { + getItems: function() { + return items; + }, + addArticle: function(article) { + items.push(article); + }, + sum: function() { + return items.reduce(function(total, article) { + return total + article.price; + }, 0); + } + }; + }) + .controller('ArticlesCtrl', function($scope, $http, Cart){ + $scope.cart = Cart; + $http.get('./actube.php').then(function(articlesResponse) { + $scope.articles = articlesResponse.data; + }); + }) + .controller('CartCtrl', function($scope, Cart){ + $scope.cart = Cart; + }); diff --git a/src/webui/articles.html b/src/webui/articles.html new file mode 100644 index 00000000..b2f8ab2d --- /dev/null +++ b/src/webui/articles.html @@ -0,0 +1,34 @@ +
+ +

Du suchst gerade nach: {{search}}

+
+ + + + + + + + + +
{{article.id}}{{article.name}}{{article.active}}
+ + + diff --git a/src/webui/articles.json b/src/webui/articles.json new file mode 100644 index 00000000..49b95315 --- /dev/null +++ b/src/webui/articles.json @@ -0,0 +1,6 @@ +[ + {"id": "1", "name": "Pizza Vegetaria", "price": 5 }, + {"id": "2", "name": "Pizza Salami", "price": 5.5 }, + {"id": "3", "name": "Pizza Thunfisch", "price": 6 }, + {"id": "4", "name": "Aktueller Flyer", "price": 0 } +] diff --git a/src/webui/config.inc.php b/src/webui/config.inc.php new file mode 100644 index 00000000..7f752553 --- /dev/null +++ b/src/webui/config.inc.php @@ -0,0 +1,3 @@ + + + + AC-Tube Manager + + + + +
+ +

+ ACs | + WTPs | + About +

+
+ +
+ + + + + + + diff --git a/src/webui/style.css b/src/webui/style.css new file mode 100644 index 00000000..aad61403 --- /dev/null +++ b/src/webui/style.css @@ -0,0 +1,8 @@ +.cart-item.ng-enter { + -webkit-transition:0.5s linear all; + transition:0.5s linear all; + background-color: yellow; +} +.cart-item.ng-enter-active { + background-color: white; +} \ No newline at end of file