diff --git a/config.php b/config.php
index 403cb6f..cf297b5 100644
--- a/config.php
+++ b/config.php
@@ -15,4 +15,5 @@ $danube_config = array( array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREP
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_COPYRIGHT, 'danube, © WebCraft Media 2013'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, '../system/'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, array('deDE', 'enUS', 'huHU')),
- array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'));
\ No newline at end of file
+ array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'),
+ array(config_ids::WEBCRAFT_BILLING_TOKEN, 'DANUBEdhasda3afdsjadfa3'));
\ No newline at end of file
diff --git a/danube/autoload.inc.php b/danube/autoload.inc.php
index adad2dd..477cd42 100644
--- a/danube/autoload.inc.php
+++ b/danube/autoload.inc.php
@@ -7,4 +7,5 @@ require_once dirname(__FILE__).'/dbd/autoload.inc.php';
require_once dirname(__FILE__).'/api/autoload.inc.php';
-require_once dirname(__FILE__).'/files/autoload.inc.php';
\ No newline at end of file
+require_once dirname(__FILE__).'/files/autoload.inc.php';
+require_once dirname(__FILE__).'/config/autoload.inc.php';
\ No newline at end of file
diff --git a/danube/config/autoload.inc.php b/danube/config/autoload.inc.php
new file mode 100644
index 0000000..8fd92c5
--- /dev/null
+++ b/danube/config/autoload.inc.php
@@ -0,0 +1,2 @@
+
-
-
-
- da_sense | Quality management
-
-
-
-
-
-
-
Quality management
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/danube/sai/saimod_dasense_quality_management/qualitymanagement.js b/danube/sai/saimod_dasense_quality_management/qualitymanagement.js
deleted file mode 100644
index 5646bfe..0000000
--- a/danube/sai/saimod_dasense_quality_management/qualitymanagement.js
+++ /dev/null
@@ -1,50 +0,0 @@
-
-function init_saimod_dasense_quality_management(){
-
- // auto-completion stuff
- $('#search').typeahead({
- source: function (query, process) {
- return $.get('./api.php?call=analysis&action=data&get=locality&by=name', { query: query, limit: 8, options: {flag:0} }, function (data) {
- //console.log(data);
- var source = new Backbone.Collection(data.result).models;
-
- // passing an array of objects
- process( _.map(source, function (locality) {
- return {
- id: locality.get('localityid'),
- full_name: locality.get('de_name') + ' (' + locality.get('en_name') + ')',
- // these functions allows Bootstrap typehead to use this item in places where it was expecting a string
- toString: function () {
- return JSON.stringify(this);
- },
- toLowerCase: function () {
- return this.full_name.toLowerCase();
- },
- indexOf: function () {
- return String.prototype.indexOf.apply(this.full_name, arguments);
- },
- replace: function () {
- return String.prototype.replace.apply(this.full_name, arguments);
- }
- };
- }));
- });
- },
- display: 'full_name',
- updater: function(itemString){
- var item = JSON.parse(itemString);
- refreshMap(item.id);
- return item.full_name;
- }
- });
-
-}
-
-function refreshMap(localityID){
- $.get('./api.php?call=analysis&action=data&get=locality&by=id', { locality_id: localityID, include_geometry: 1, include_children: 1 }, function (data) {
- console.log(data);
- // @todo: refresh map -> current locality + children geometries
- });
-}
-
-function destroy(){}
\ No newline at end of file
diff --git a/danube/sai/saimod_dasense_quality_management/saimod_dasense_quality_management.php b/danube/sai/saimod_dasense_quality_management/saimod_dasense_quality_management.php
deleted file mode 100644
index 8f4de3e..0000000
--- a/danube/sai/saimod_dasense_quality_management/saimod_dasense_quality_management.php
+++ /dev/null
@@ -1,12 +0,0 @@
-Quality Management';}
- public static function right_public(){return false;}
- public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
- public static function sai_mod_saimod_dasense_quality_management_flag_js(){return \SYSTEM\LOG\JsonResult::toString(
- array( \SYSTEM\WEBPATH(new \PSAI(),'saimod_dasense_quality_management/qualitymanagement.js')
- ));}
- public static function sai_mod_saimod_dasense_quality_management_flag_css(){}
-}
\ No newline at end of file
diff --git a/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.css b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.css
new file mode 100644
index 0000000..31be0e1
--- /dev/null
+++ b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.css
@@ -0,0 +1,3 @@
+td.customer_details {
+ font-weight: bold;
+}
\ No newline at end of file
diff --git a/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.js b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.js
new file mode 100644
index 0000000..803fd74
--- /dev/null
+++ b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.js
@@ -0,0 +1,3 @@
+function init_saimod_webcraft_billing_satelite() {
+ $('#billingtab a').click(function (e) {e.preventDefault(); $(this).tab('show');});
+}
\ No newline at end of file
diff --git a/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.php b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.php
new file mode 100644
index 0000000..eddb1c8
--- /dev/null
+++ b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.php
@@ -0,0 +1,43 @@
+ '');
+ if($project['status']){
+ foreach($project['result'] as $row){
+ $row['customer_company'] = $row['customer_company'] == "" ? $row['customer_company'] = "" : $row['customer_company'] .= " - ";
+ $vars['content_project'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl'), $row);}
+ }
+
+ $vars['content_billing'] = '';
+ if($billing['status']){
+ foreach($billing['result'] as $row){
+ $row['pdf_link'] = './sai.php?sai_mod=saimod_webcraft_billing_satelite&action=getpdf&billid='.$row['ID'];
+ $row['state'] = $row['payed_date'] == "0000-00-00 00:00:00" ? "important" : "success";
+ $vars['content_billing'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl'), $row);}
+ }
+
+ if($customer['status']){
+ $vars = array_merge($vars,$customer['result']);}
+ return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl'), $vars);}
+
+ public static function sai_mod_saimod_webcraft_billing_satelite_action_getpdf($billid){
+ $token = \SYSTEM\CONFIG\config::get(config_ids::WEBCRAFT_BILLING_TOKEN);
+ header("Content-type: application/pdf");
+ return file_get_contents('http://mojotrollz.eu/web/webcraft/api.php?call=billing&action=bill&token='.$token.'&ID='.$billid);}
+
+ public static function html_li_menu(){return 'Rechnungen';}
+ public static function right_public(){return false;}
+ public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
+ public static function sai_mod_saimod_webcraft_billing_satelite_flag_js(){
+ return \SYSTEM\LOG\JsonResult::toString(
+ array( \SYSTEM\WEBPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.js')));}
+ public static function sai_mod_saimod_webcraft_billing_satelite_flag_css(){
+ return \SYSTEM\LOG\JsonResult::toString(
+ array( \SYSTEM\WEBPATH(new PSAI(),'saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.css')));}
+
+}
diff --git a/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl
new file mode 100644
index 0000000..19c9124
--- /dev/null
+++ b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl
@@ -0,0 +1,66 @@
+Verwaltung
+
+
+
+
+
+
+
+ | Rechnungsnummer |
+ Projekt |
+ Datum |
+ PDF |
+ Betrag |
+ Bezahlt am |
+
+ ${content_billing}
+
+
+
+
+
+ | ID |
+ Nutzer |
+ Firma |
+ seit |
+ URL |
+ Serverpfad |
+ token |
+
+ ${content_project}
+
+
+
+
+
+ | Nutzer ID |
+ ${ID} |
+
+
+ | Firma |
+ ${company} |
+
+
+ | Vorname |
+ ${name} |
+
+
+ | Nachname |
+ ${name_last} |
+
+
+ | Addresse |
+ ${address} |
+
+
+ | Beigetreten |
+ ${join} |
+
+
+
+
+
diff --git a/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl
new file mode 100644
index 0000000..db4cc28
--- /dev/null
+++ b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl
@@ -0,0 +1,8 @@
+
+ | ${ID} |
+ ${project_name} |
+ ${date} |
+ PDF |
+ ${balance} € |
+ ${payed_date} |
+
\ No newline at end of file
diff --git a/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl
new file mode 100644
index 0000000..e05372f
--- /dev/null
+++ b/danube/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl
@@ -0,0 +1,9 @@
+
+ | ${ID} |
+ ${customer_company}${customer_name} ${customer_name_last} |
+ ${name} |
+ ${date} |
+ ${url} |
+ ${path} |
+ ${token} |
+
\ No newline at end of file