diff --git a/config.php b/config.php
index b40c3b6..bd740e6 100644
--- a/config.php
+++ b/config.php
@@ -15,4 +15,4 @@ $rhein_config = array( array(config_ids::SYS_CONFIG_ERRORREPORTING,
array(config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, '../system/'),
array(config_ids::SYS_CONFIG_LANGS, array('deDE')),
array(config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'),
- array(config_ids::WEBCRAFT_BILLING_TOKEN, 'DANUBEdhasda3afdsjadfa3'));
\ No newline at end of file
+ array(config_ids::WEBCRAFT_BILLING_TOKEN, 'RHEINadasdbcahdscjhd213'));
\ No newline at end of file
diff --git a/rhein/sai/autoload.inc.php b/rhein/sai/autoload.inc.php
index 5768849..eaf57b4 100644
--- a/rhein/sai/autoload.inc.php
+++ b/rhein/sai/autoload.inc.php
@@ -1,5 +1,5 @@
'');
+ 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/rhein/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl b/rhein/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl
new file mode 100644
index 0000000..19c9124
--- /dev/null
+++ b/rhein/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/rhein/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl b/rhein/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl
new file mode 100644
index 0000000..db4cc28
--- /dev/null
+++ b/rhein/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/rhein/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl b/rhein/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl
new file mode 100644
index 0000000..e05372f
--- /dev/null
+++ b/rhein/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
diff --git a/rhein/sai/saimod_webcraft_billing_satelite/sql/webcraft_billing_satelite_api.sql b/rhein/sai/saimod_webcraft_billing_satelite/sql/webcraft_billing_satelite_api.sql
new file mode 100644
index 0000000..5e8010d
--- /dev/null
+++ b/rhein/sai/saimod_webcraft_billing_satelite/sql/webcraft_billing_satelite_api.sql
@@ -0,0 +1 @@
+INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (100, 42, 2, 3, 'getpdf', 'billid', 'UINT');
\ No newline at end of file