From d2440af8de9f09467dc088cb122dec257959c110 Mon Sep 17 00:00:00 2001 From: hartmut Date: Wed, 25 Jan 2017 09:52:08 +0000 Subject: Statistik-Produkte und Korrektur Kreditkartennummer-Prüfziffernalgorithmus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6030 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_creditcard/paymenthint.phtml | 5 +- .../mods/mod_statistics/produkt_edit_sidebar.phtml | 136 +++++++++++++++++++++ views/mods/mod_statistics/settings_edit.phtml | 2 + views/mods/mod_statistics/statisticProduct.phtml | 46 +++++++ 4 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 views/mods/mod_statistics/produkt_edit_sidebar.phtml create mode 100644 views/mods/mod_statistics/statisticProduct.phtml diff --git a/views/mods/mod_creditcard/paymenthint.phtml b/views/mods/mod_creditcard/paymenthint.phtml index 5ffda92..d9cbbf2 100644 --- a/views/mods/mod_creditcard/paymenthint.phtml +++ b/views/mods/mod_creditcard/paymenthint.phtml @@ -138,7 +138,10 @@ jQuery("#wpsg_mod_creditcard_knr").on("input", function () { ai = parseInt(knr.substr(15, 1), 10); if (!(((a1 === "4") && (typ === "VISA")) || ((a1 === "5") && (typ === "MasterCard")))) { bb = false; } for (i = 14; i >= 0; i--) { - sum = sum + k * parseInt(knr.substr(i, 1), 10); + dig = k * parseInt(knr.substr(i, 1), 10); + if (dig > 9) { dig = dig - 9;} + sum = sum + dig; + //sum = sum + k * parseInt(knr.substr(i, 1), 10); if (k === 2) { k = 1; } else { k = 2; } } sum = sum % 10; diff --git a/views/mods/mod_statistics/produkt_edit_sidebar.phtml b/views/mods/mod_statistics/produkt_edit_sidebar.phtml new file mode 100644 index 0000000..517ed62 --- /dev/null +++ b/views/mods/mod_statistics/produkt_edit_sidebar.phtml @@ -0,0 +1,136 @@ + +
+
+

+ +

+
+
+ + get_option('wpsg_mod_statistics_productinterval'); + + $st_von = Date('d.m.Y', strtotime('-'.$int.' days')); + $st_bis = Date('d.m.Y'); + } + ?> + + + + + + + + +

+ +
+ view['odata']['sum'] == 0) { + echo __('Keine Daten', 'wpsg'); + } else { + ?> + + view['odata']['sum'] ?>

+ + + + + + + + + + + + + + view['odata']['sum']); + foreach ($this->view['odata'] as $pa) { ?> + + + + + + + + + + + +
+ + +
+ +
+
+ + diff --git a/views/mods/mod_statistics/settings_edit.phtml b/views/mods/mod_statistics/settings_edit.phtml index 44180d1..ac7f7e9 100644 --- a/views/mods/mod_statistics/settings_edit.phtml +++ b/views/mods/mod_statistics/settings_edit.phtml @@ -132,6 +132,8 @@ echo wpsg_drawForm_Input('wpsg_mod_statistics_bar_chart_height', __('Balkendiagramm (Höhe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_bar_chart_height'), array('help' => 'wpsg_mod_statistics_bar_chart_height')); echo wpsg_drawForm_Input('wpsg_mod_statistics_topproductcount', __('Anzeige Top-Produkte', 'wpsg'), $this->get_option('wpsg_mod_statistics_topproductcount'), array('help' => 'wpsg_mod_statistics_topproductcount')); + + echo wpsg_drawForm_Input('wpsg_mod_statistics_productinterval', __('Intervall-Zeitraum für Produktstatistik', 'wpsg'), $this->get_option('wpsg_mod_statistics_productinterval'), array('help' => 'wpsg_mod_statistics_productinterval')); ?>
diff --git a/views/mods/mod_statistics/statisticProduct.phtml b/views/mods/mod_statistics/statisticProduct.phtml new file mode 100644 index 0000000..d29f490 --- /dev/null +++ b/views/mods/mod_statistics/statisticProduct.phtml @@ -0,0 +1,46 @@ + + + view['odata']['sum'] == 0) { + echo __('Keine Daten', 'wpsg'); + } else { + ?> + + view['odata']['sum'] ?>

+ + + + + + + + + + + + + + + + view['odata']['sum']); + foreach ($this->view['odata'] as $pa) { ?> + + + + + + + + + + + +
+ -- cgit v1.2.3