From 30c3731b7bd3357c68188f09573fbcbd52982229 Mon Sep 17 00:00:00 2001 From: rylon Date: Tue, 17 Jun 2014 20:38:19 +0200 Subject: [PATCH] friseurteam init commit --- api.php | 13 ++ config.php | 18 ++ friseurteam/api/autoload.inc.php | 2 + friseurteam/autoload.inc.php | 9 + friseurteam/config/autoload.inc.php | 2 + friseurteam/config/config_ids.php | 4 + friseurteam/dbd/autoload.inc.php | 3 + friseurteam/dbd/sql/webcraft_api.sql | 7 + friseurteam/dbd/sql/webcraft_page.sql | 2 + friseurteam/dbd/tbl/locale_string.php | 6 + friseurteam/files/autoload.inc.php | 3 + friseurteam/files/register_files.php | 2 + friseurteam/page/autoload.inc.php | 3 + .../page/default_page/default_page.css | 65 ++++++ friseurteam/page/default_page/default_page.js | 209 ++++++++++++++++++ .../page/default_page/default_page.php | 21 ++ friseurteam/page/default_page/webcraft.tpl | 47 ++++ friseurteam/page/page_friseurteam.php | 6 + friseurteam/path/PAPI.php | 5 + friseurteam/path/PLIB.php | 5 + friseurteam/path/PPAGE.php | 5 + friseurteam/path/autoload.inc.php | 2 + friseurteam/sai/autoload.inc.php | 2 + friseurteam/sai/register_modules.php | 2 + .../saimod_webcraft_billing_satelite.css | 3 + .../saimod_webcraft_billing_satelite.js | 3 + .../saimod_webcraft_billing_satelite.php | 43 ++++ .../saimod_webcraft_billing_satelite.tpl | 66 ++++++ ...craft_billing_satelite_content_billing.tpl | 8 + ...craft_billing_satelite_content_project.tpl | 9 + .../sql/webcraft_billing_satelite_api.sql | 2 + index.php | 13 ++ sai.php | 13 ++ system | 1 + 34 files changed, 604 insertions(+) create mode 100644 api.php create mode 100644 config.php create mode 100644 friseurteam/api/autoload.inc.php create mode 100644 friseurteam/autoload.inc.php create mode 100644 friseurteam/config/autoload.inc.php create mode 100644 friseurteam/config/config_ids.php create mode 100644 friseurteam/dbd/autoload.inc.php create mode 100644 friseurteam/dbd/sql/webcraft_api.sql create mode 100644 friseurteam/dbd/sql/webcraft_page.sql create mode 100644 friseurteam/dbd/tbl/locale_string.php create mode 100644 friseurteam/files/autoload.inc.php create mode 100644 friseurteam/files/register_files.php create mode 100644 friseurteam/page/autoload.inc.php create mode 100644 friseurteam/page/default_page/default_page.css create mode 100644 friseurteam/page/default_page/default_page.js create mode 100644 friseurteam/page/default_page/default_page.php create mode 100644 friseurteam/page/default_page/webcraft.tpl create mode 100644 friseurteam/page/page_friseurteam.php create mode 100644 friseurteam/path/PAPI.php create mode 100644 friseurteam/path/PLIB.php create mode 100644 friseurteam/path/PPAGE.php create mode 100644 friseurteam/path/autoload.inc.php create mode 100644 friseurteam/sai/autoload.inc.php create mode 100644 friseurteam/sai/register_modules.php create mode 100644 friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.css create mode 100644 friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.js create mode 100644 friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.php create mode 100644 friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl create mode 100644 friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl create mode 100644 friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl create mode 100644 friseurteam/sai/saimod_webcraft_billing_satelite/sql/webcraft_billing_satelite_api.sql create mode 100644 index.php create mode 100644 sai.php create mode 160000 system diff --git a/api.php b/api.php new file mode 100644 index 0000000..f20bd6c --- /dev/null +++ b/api.php @@ -0,0 +1,13 @@ +webcraft, © WebCraft Media 2013'), + array(config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'system/'), + array(config_ids::SYS_CONFIG_LANGS, array('deDE', 'enUS')), + array(config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE')); + //array(config_ids::WEBCRAFT_BILLING_TOKEN, 'DANUBEdhasda3afdsjadfa3')); \ No newline at end of file diff --git a/friseurteam/api/autoload.inc.php b/friseurteam/api/autoload.inc.php new file mode 100644 index 0000000..d94a324 --- /dev/null +++ b/friseurteam/api/autoload.inc.php @@ -0,0 +1,2 @@ += limit) + { + return null; + } + else + { + x = ((x % limit) + limit) % limit; + + return this.url + z + "/" + x + "/" + y + "." + this.type; + } +} + +function showSidebar() { + $('#toggle-sidebar i').removeClass('icon-chevron-left').addClass('icon-chevron-right'); + $('#navigation-right-wrapper').show(350); + //$('#navigation-right-wrapper').animate({right: '200px'}, 'slow'); + $('#toggle-sidebar').animate({right: '38%'}, 'slow'); +} + +/* +* Hides the left navigation bar with a slide effect +*/ +function hideSidebar() { + $('#toggle-sidebar i').removeClass('icon-chevron-right').addClass('icon-chevron-left'); + $('#navigation-right-wrapper').hide(350); + //$('#navigation-right-wrapper').animate({right: '-200px'}, 'slow'); + $('#toggle-sidebar').animate({right: '0px'}, 'slow'); +} + +function toggleSidebar() { + if($('#navigation-right-wrapper').is(':visible')){ + hideSidebar(); + } else { + showSidebar();} +} + +function loadPageDetails(projectid){ + $('#navigation-right-wrapper').load('./?page=details&projectid='+projectid); +} + +function loadPage(page){ + $('#navigation-left-wrapper').load('./?page='+page,function(){ + switch(page){ + case 'start': + showSidebar(); + showMainbar(); + break; + } + }); +} + +function showMainbar() { + $('#toggle-mainbar i').removeClass('icon-chevron-right').addClass('icon-chevron-left'); + $('#navigation-left-wrapper').show(350); + //$('#navigation-right-wrapper').animate({right: '200px'}, 'slow'); + $('#toggle-mainbar').animate({left: '62%'}, 'slow'); +} + +/* +* Hides the left navigation bar with a slide effect +*/ +function hideMainbar() { + $('#toggle-mainbar i').removeClass('icon-chevron-left').addClass('icon-chevron-right'); + $('#navigation-left-wrapper').hide(350); + //$('#navigation-right-wrapper').animate({right: '-200px'}, 'slow'); + $('#toggle-mainbar').animate({left: '0px'}, 'slow'); +} + +function toggleMainbar() { + if($('#navigation-left-wrapper').is(':visible')){ + hideMainbar(); + } else { + showMainbar();} +} \ No newline at end of file diff --git a/friseurteam/page/default_page/default_page.php b/friseurteam/page/default_page/default_page.php new file mode 100644 index 0000000..0e1e7c8 --- /dev/null +++ b/friseurteam/page/default_page/default_page.php @@ -0,0 +1,21 @@ + + + + '; + } + public function html() { + $vars = array(); + $vars['js'] = self::js(); + $vars['css'] = self::css(); + $vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_TEXT)); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_page/webcraft.tpl'), $vars); + } + + public static function css(){ + return ''; + } +} \ No newline at end of file diff --git a/friseurteam/page/default_page/webcraft.tpl b/friseurteam/page/default_page/webcraft.tpl new file mode 100644 index 0000000..facd809 --- /dev/null +++ b/friseurteam/page/default_page/webcraft.tpl @@ -0,0 +1,47 @@ + + + + + WebCraft-Media + ${js} + ${css} + + + + + + +
+ +
+
+ +
+ +
+ + + \ No newline at end of file diff --git a/friseurteam/page/page_friseurteam.php b/friseurteam/page/page_friseurteam.php new file mode 100644 index 0000000..3e2f50f --- /dev/null +++ b/friseurteam/page/page_friseurteam.php @@ -0,0 +1,6 @@ + ''); + 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/friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl b/friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl new file mode 100644 index 0000000..19c9124 --- /dev/null +++ b/friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite.tpl @@ -0,0 +1,66 @@ +

    Verwaltung

    +
    +
    + +
    +
    + + + + + + + + + + ${content_billing} +
    RechnungsnummerProjektDatumPDFBetragBezahlt am
    +
    +
    + + + + + + + + + + + ${content_project} +
    IDNutzerFirmaseitURLServerpfadtoken
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nutzer ID${ID}
    Firma${company}
    Vorname${name}
    Nachname${name_last}
    Addresse${address}
    Beigetreten${join}
    +
    +
    +
    diff --git a/friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl b/friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_billing.tpl new file mode 100644 index 0000000..db4cc28 --- /dev/null +++ b/friseurteam/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/friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl b/friseurteam/sai/saimod_webcraft_billing_satelite/saimod_webcraft_billing_satelite_content_project.tpl new file mode 100644 index 0000000..e05372f --- /dev/null +++ b/friseurteam/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/friseurteam/sai/saimod_webcraft_billing_satelite/sql/webcraft_billing_satelite_api.sql b/friseurteam/sai/saimod_webcraft_billing_satelite/sql/webcraft_billing_satelite_api.sql new file mode 100644 index 0000000..d4e9f04 --- /dev/null +++ b/friseurteam/sai/saimod_webcraft_billing_satelite/sql/webcraft_billing_satelite_api.sql @@ -0,0 +1,2 @@ +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5300, 42, 0, 0, 'saimod_webcraft_billing', 'action', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5301, 42, 2, 3, 'getpdf', 'billid', 'UINT'); \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..19f03cc --- /dev/null +++ b/index.php @@ -0,0 +1,13 @@ +html(); +new \SYSTEM\LOG\COUNTER("Page was called sucessfully."); \ No newline at end of file diff --git a/sai.php b/sai.php new file mode 100644 index 0000000..276c092 --- /dev/null +++ b/sai.php @@ -0,0 +1,13 @@ +html(); \ No newline at end of file diff --git a/system b/system new file mode 160000 index 0000000..9c10bfc --- /dev/null +++ b/system @@ -0,0 +1 @@ +Subproject commit 9c10bfc1be6c74930d6f572ed88ce53fbbf4af6a