summaryrefslogtreecommitdiff
path: root/views/admin
diff options
context:
space:
mode:
Diffstat (limited to 'views/admin')
-rw-r--r--views/admin/access.phtml95
-rw-r--r--views/admin/blognetzwerk.phtml48
-rw-r--r--views/admin/customerpreset.phtml43
-rw-r--r--views/admin/debugInfo.phtml16
-rw-r--r--views/admin/deinstall.phtml80
-rw-r--r--views/admin/emailconf.phtml132
-rw-r--r--views/admin/extended.phtml62
-rw-r--r--views/admin/hilfe.phtml86
-rw-r--r--views/admin/includes.phtml50
-rw-r--r--views/admin/index.phtml43
-rw-r--r--views/admin/kalkulation.phtml91
-rw-r--r--views/admin/konfiguration.phtml167
-rw-r--r--views/admin/kundendaten.phtml88
-rw-r--r--views/admin/kundendaten_codeinfo.phtml26
-rw-r--r--views/admin/kundendaten_renderfield.phtml25
-rw-r--r--views/admin/kundendaten_tab1.phtml146
-rw-r--r--views/admin/kundendaten_tab2.phtml117
-rw-r--r--views/admin/laender.phtml244
-rw-r--r--views/admin/laender_edit.phtml29
-rw-r--r--views/admin/loadsavesettings.phtml48
-rw-r--r--views/admin/migratemwst.phtml62
-rw-r--r--views/admin/module.phtml137
-rw-r--r--views/admin/musterwiderruf.pdf.phtml60
-rw-r--r--views/admin/news.phtml42
-rw-r--r--views/admin/path.phtml37
-rw-r--r--views/admin/presentation.phtml50
-rw-r--r--views/admin/seiten.phtml41
-rw-r--r--views/admin/shopdata.phtml60
-rw-r--r--views/admin/ueber.phtml72
-rw-r--r--views/admin/versandzonen.phtml130
-rw-r--r--views/admin/versandzonen_list.phtml89
-rw-r--r--views/admin/widerrufsbelehrung.phtml73
32 files changed, 2489 insertions, 0 deletions
diff --git a/views/admin/access.phtml b/views/admin/access.phtml
new file mode 100644
index 0000000..89af85d
--- /dev/null
+++ b/views/admin/access.phtml
@@ -0,0 +1,95 @@
+<?php
+
+ /**
+ * Template für die Verwaltung der Berechtigunen
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction='.$_REQUEST['subaction'].'&noheader=1'); ?>">
+
+ <?php global $wpdb; $arRoles = get_option($wpdb->prefix."user_roles"); ?>
+
+ <table class="wpsg_access_table" cellpadding="0" cellspacing="0">
+ <tr>
+ <th class="wpsg_col_capname"></th>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <th class="wpsg_col_cap"><?php echo $r['name']; ?></th>
+ <?php } ?>
+ <th></th>
+ </tr>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Menüpunkt sichtbar', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_menu]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_menu']) && $r['capabilities']['wpsg_menu'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_menu]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Konfiguration', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_conf]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_conf']) && $r['capabilities']['wpsg_conf'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_conf]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Lizenzverwaltung', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_lizence]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_lizence']) && $r['capabilities']['wpsg_lizence'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_lizence]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Bestellverwaltung', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_order]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_order']) && $r['capabilities']['wpsg_order'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_order]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <tr>
+ <td class="wpsg_col_capname"><?php echo __('Produktverwaltung', 'wpsg'); ?></td>
+ <?php foreach ($arRoles as $role_key => $r) { ?>
+ <td class="wpsg_col_cap">
+ <input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_produkt]" value="0" />
+ <input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_produkt']) && $r['capabilities']['wpsg_produkt'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_produkt]" value="1" />
+ </td>
+ <?php } ?>
+ <td></td>
+ </tr>
+ <?php $this->callMods('admin_setcapabilities'); ?>
+ </table>
+
+ <br />
+ <input type="submit" value="<?php echo __('Berechtigungen Speichern', 'wpsg'); ?>" name="submit" id="submit" class="button-primary" />
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/blognetzwerk.phtml b/views/admin/blognetzwerk.phtml
new file mode 100644
index 0000000..78b1830
--- /dev/null
+++ b/views/admin/blognetzwerk.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template für die Einstellungen in einem Blognetzwerk
+ */
+
+?>
+
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+ <div class="wpsg_admin_box">
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Sie befinden sich in einer Multiblog Umgebung.', 'wpsg'); ?>
+ </div>
+ <br />
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_multiblog_standalone', __('Jeden Blog getrennt behandeln', 'wpsg'), $this->get_option('wpsg_multiblog_standalone', true)); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_multiblog_sessionPath', __('Session auf Verzeichnis einschränken', 'wpsg'), $this->get_option('wpsg_multiblog_sessionPath', true), array('help' => 'wpsg_multiblog_sessionPath')); ?>
+
+ <input type="hidden" name="subaction" value="blognetzwerk" />
+
+ <br />
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Nach der Umstellung dieser Option sollte in den Blogs in denen der Shop noch verwendet wird die Shop Datenbank aktualisiert werden. (Einstellungen -> Allgemein)', 'wpsg'); ?>
+ </div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </div>
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/customerpreset.phtml b/views/admin/customerpreset.phtml
new file mode 100644
index 0000000..4f8fab1
--- /dev/null
+++ b/views/admin/customerpreset.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Template für die Kundenvoreinstellungen im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_shipping', __('Standard Versandart', 'wpsg'), $this->view['arShipping'], $this->get_option('wpsg_customerpreset_shipping')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_payment', __('Standard Zahlungsart', 'wpsg'), $this->view['arPayment'], $this->get_option('wpsg_customerpreset_payment')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_defaultland', __('Standardland', 'wpsg'), $this->view['arLander'], $this->get_option('wpsg_defaultland'), array('hint' =>
+ 'nohspc_'.wpsg_translate(__('Die Länder können in der <a href="#1#">Länderverwaltung</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender')
+ )); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_customerpreset_title', __('Standardanrede', 'wpsg'), $this->view['arTitle'], $this->get_option('wpsg_customerpreset_title'), array(
+ 'hint' => 'nohspc_'.wpsg_translate(__('Die Auswahl kann in den <a href="#1#">Kundendaten</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten'),
+ 'noIndex' => true
+ )); ?>
+
+ <br />
+
+ <input class="button-primary" type="submit" name="wpsg-submit" value="<?php echo __('Speichern', 'wpsg'); ?>" />
+
+ </form>
+
+</div> \ No newline at end of file
diff --git a/views/admin/debugInfo.phtml b/views/admin/debugInfo.phtml
new file mode 100644
index 0000000..82bf55a
--- /dev/null
+++ b/views/admin/debugInfo.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ /**
+ * Template für die Ausgabe der DEBUG Informationen die über die Admin Bar erreichbar sind
+ */
+
+ require_once WPSG_PATH_WP.'/wp-admin/includes/plugin.php';
+
+?>
+<?php $this->callMods('admin_debugInfo'); ?>
+
+<?php
+
+ $arPlugins = $this->get_option('active_plugins');
+
+?> \ No newline at end of file
diff --git a/views/admin/deinstall.phtml b/views/admin/deinstall.phtml
new file mode 100644
index 0000000..fae4d98
--- /dev/null
+++ b/views/admin/deinstall.phtml
@@ -0,0 +1,80 @@
+<?php
+
+ /**
+ * Template für die Einstellungen der Deinstallation
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <p><?php echo __('Bitte wählen Sie aus, was Sie entfernen möchten?', 'wpsg'); ?></p>
+
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_products" />&nbsp;<?php echo wpsg_translate(__('Produkte (#1# Datensätze)', 'wpsg'), (($this->view['count_products'] > 0)?$this->view['count_products']:0)); ?>
+ </label><br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_customer" />&nbsp;<?php echo wpsg_translate(__('Kunden (#1# Datensätze)', 'wpsg'), (($this->view['count_customer'] > 0)?$this->view['count_customer']:0)); ?>
+ </label><br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_order" />&nbsp;<?php echo wpsg_translate(__('Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order'] > 0)?$this->view['count_order']:0)); ?>
+ </label><br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_incompleteorder" />&nbsp;<?php echo wpsg_translate(__('Unvollständige Bestellungen (#1# Datensätze)', 'wpsg'), (($this->view['count_order_incomplete'] > 0)?$this->view['count_order_incomplete']:0)); ?>
+ </label><br />
+
+ <br />
+ <label>
+ <input type="checkbox" value="1" name="wpsg_deinstall_core" />&nbsp;<?php echo __('Plugin, Programmdateien, Moduldateien und Datenbanktabellen', 'wpsg'); ?>
+ </label>
+
+ <p class="submit"><input onclick="return wpsg_check_deinstall();" type="submit" value="<?php echo __('Deinstallation durchführen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ <div class="wpsg_hinweis">
+ <?php echo __('Hinweis: Es werden hier auch bereits gelöschte Datensätze angezeigt, da diese noch im System hinterlegt bleiben.', 'wpsg'); ?><br /><br />
+ <strong><?php echo __('Das Deinstallieren ist aber nicht umkehrbar!', 'wpsg'); ?></strong>
+ </div>
+
+ </form>
+</div>
+
+<script type="text/javascript">
+
+ function wpsg_check_deinstall()
+ {
+
+ if (jQuery('.wpsg_admin_content input:checked').length <= 0)
+ {
+
+ alert('<?php echo __('Bitte mindestens eine Option wählen.', 'wpsg'); ?>'); return false;
+
+ }
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher? Der Vorgang ist nicht umkehrbar!', 'wpsg'); ?>'))
+ {
+
+ return false;
+
+ }
+
+ return true;
+
+ } // function wpsg_check_deinstall()
+
+</script> \ No newline at end of file
diff --git a/views/admin/emailconf.phtml b/views/admin/emailconf.phtml
new file mode 100644
index 0000000..315e7ac
--- /dev/null
+++ b/views/admin/emailconf.phtml
@@ -0,0 +1,132 @@
+<?php
+
+ /**
+ * Template für die E-Mail Konfiguration
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <h3>
+ <?php echo __('E-Mail Konfiguration', 'wpsg'); ?>
+ <a title="<?php echo __('Hilfeseite zur E-Mail Konfiguration', 'wpsg'); ?>" class="wpsg_form_help_notip" href="http://wpshopgermany.maennchen1.de/?p=3284" target="_blank"></a>
+ </h3>
+
+ <p><?php echo __('Hier können die Betreffs, Empfänger und BCC/CC der E-Mails konfiguriert werden.', 'wpsg')?></p>
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_htmlmail', __('HTML Mails versenden', 'wpsg'), $this->get_option('wpsg_htmlmail')); ?>
+
+ <br />
+
+ <div class="wpsg_admin_box">
+
+ <?php echo wpsg_drawEMailConfig(
+ 'global',
+ __('Globale Vorgaben', 'wpsg'),
+ __('Werden keine Angaben für die folgenden E-Mails gemacht, so gelten die globalen Angaben.', 'wpsg')); ?>
+
+ <?php echo wpsg_drawEMailConfig(
+ 'adminmail',
+ __('Bestellbestätigung (Admin)', 'wpsg'),
+ __('Diese Mail bekommt der Admin beim Eingang einer neuen Bestellung.', 'wpsg'),
+ true); ?>
+
+ <?php echo wpsg_drawEMailConfig(
+ 'kundenmail',
+ __('Bestellbestätigung (Kunde)', 'wpsg'),
+ __('Diese Mail bekommt der Kunde nach Durchführung der Bestellung.', 'wpsg'),
+ false,
+ true); ?>
+
+ <?php echo wpsg_drawEMailConfig(
+ 'status',
+ __('Statusänderung (Kunde)', 'wpsg'),
+ __('Diese Mail bekommt der Kunde bei der Änderung des Bestellstatus.', 'wpsg')); ?>
+
+ <?php $this->callMods('admin_emailconf'); ?>
+
+ </div>
+
+ <div class="wpsg_hinweis"><?php echo __('Klicken Sie auf die jeweilige Mail um die Einstellungen angezeigt zu bekommen bzw. zu ändern.', 'wpsg'); ?></div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Speichert die Informationen ob die Mailboxen auf oder zugeklappt sind in dem Cookie
+ */
+ function wpsg_mail_save_cookie()
+ {
+
+ var wpsg_mail_open = Array();
+
+ jQuery('.wpsg_admin_box .wpsg_mail_content:visible').each(function() {
+
+ wpsg_mail_open.push(jQuery(this).prev().attr("id"));
+
+ } );
+
+ jQuery.cookie('wpsg_mail', wpsg_mail_open.join(','));
+
+ } // function wpsg_mail_save_cookie()
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_admin_box .wpsg_mail_head').bind('click', function() {
+
+ jQuery(this).next().toggle();
+
+ if (!jQuery(this).next().is(":visible"))
+ {
+ jQuery(this).css('border-bottom', '1px solid #AAAAAA');
+ }
+ else
+ {
+ jQuery(this).css('border-bottom', '0px');
+ }
+
+ wpsg_mail_save_cookie();
+
+ } );
+
+ jQuery('.wpsg_admin_box .wpsg_mail_head').disableSelection();
+
+ if (jQuery.cookie('wpsg_mail') != null)
+ {
+
+ var arOpen = jQuery.cookie('wpsg_mail').split(',');
+
+ for (var i = 0; i < arOpen.length; i ++)
+ {
+
+ jQuery('#' + arOpen[i]).next().show();
+ jQuery('#' + arOpen[i]).css('border-bottom', '0px');
+
+ }
+
+ }
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/admin/extended.phtml b/views/admin/extended.phtml
new file mode 100644
index 0000000..235143a
--- /dev/null
+++ b/views/admin/extended.phtml
@@ -0,0 +1,62 @@
+<?php
+
+ /**
+ * Template für die erweiterten Einstellungen des Shops
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=extended&noheader=1'); ?>">
+
+ <?php echo wpsg_drawForm_Input('wpsg_salt', __('SALT Schlüssel', 'wpsg'), $this->get_option('wpsg_salt')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_options_nl2br', __('RTE Felder mit nl2br speichern', 'wpsg'), $this->get_option('wpsg_options_nl2br')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_debugModus', __('Debug Modus', 'wpsg'), $this->get_option('wpsg_debugModus')); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_debugURL', __('Beta Updates laden', 'wpsg'), $this->get_option('wpsg_debugURL')); ?>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_referer_requesturi', __('RequestURI als ProduktURL verwenden', 'wpsg'), $this->get_option('wpsg_referer_requesturi')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_ignoreuserview', __('User Views ignorieren', 'wpsg'), $this->get_option('wpsg_ignoreuserview')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_classicupload', __('Klassisches Upload Formular', 'wpsg'), $this->get_option('wpsg_classicupload')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_content_filter_direct', __('Ausgaben im Warenkorb direkt ausgeben', 'wpsg'), $this->get_option('wpsg_content_filter_direct')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_options_no_rte_apply_filter', __('ApplyFilter Funktion nicht anwenden', 'wpsg'), $this->get_option('wpsg_options_no_rte_apply_filter')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_options_nl2br_out', __('RTE Felder mit nl2br ausgeben', 'wpsg'), $this->get_option('wpsg_options_nl2br_out')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_impexp_clearlinebreak', __('Zeilenumbrüche im Export entfernen', 'wpsg'), $this->get_option('wpsg_impexp_clearlinebreak')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_removeWpAutoOp', __('wpautop deaktivieren', 'wpsg'), $this->get_option('wpsg_removeWpAutoOp'), array('help' => 'wpsg_removeWpAutoOp')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_removeWpTrimExcerpt', __('wp_trim_excerpt nicht verwenden', 'wpsg'), $this->get_option('wpsg_removeWpTrimExcerpt'), array('help' => 'wpsg_removeWpTrimExcerpt')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_autoraw', __('[raw] und [/raw] um Templates ausgeben (Frontend)', 'wpsg'), $this->get_option('wpsg_autoraw')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_nocache', __('Cachen von dynamischen Shopseiten verhindern', 'wpsg'), $this->get_option('wpsg_nocache')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_autolineending', __('MAC Kompatibilität bei Dateiimporten', 'wpsg'), $this->get_option('wpsg_autolineending')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_geo_determination', __('Abfrage des Kundenstandortes (EU-Leistungsortregel)', 'wpsg'), $this->view['arGeoMode'], $this->get_option('wpsg_geo_determination'), array('help' => 'wpsg_geo_determination')); ?>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ </script>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+ \ No newline at end of file
diff --git a/views/admin/hilfe.phtml b/views/admin/hilfe.phtml
new file mode 100644
index 0000000..2f24636
--- /dev/null
+++ b/views/admin/hilfe.phtml
@@ -0,0 +1,86 @@
+<?php
+
+ /**
+ * Templatedatei für die Hilfe im Backend
+ * Normalerweise sollte hier nichts angepasst werden
+ */
+
+?>
+<div class="wpsg_hilfe" style="padding:5px; width:790px;">
+
+ <h1><?php echo __("Hilfe", "wpsg"); ?></h1>
+
+ <p><?php echo __("Hier ein kleiner Überblick, wo welche Information zu finden ist:", "wpsg"); ?></p>
+
+ <h2><?php echo __("Tutorials", "wpsg"); ?></h2>
+ <p><?php echo __("In den Tutorial haben wir praxisnahe Beispiele verwendet, um die einzelnen Funktionen näher zu erklären. Rechts im Menü können die Kategorien näher ausgewählt werden, ganz oben gibt es ein Suchfenster, was ganz sehr gut funktioniert ;)", "wpsg"); ?></p>
+ <a href="http://wpshopgermany.maennchen1.de/category/tutorials/">http://wpshopgermany.maennchen1.de/category/tutorials/</a>
+
+ <h2><?php echo __("Forum", "wpsg"); ?></h2>
+ <p><?php echo __("Alle Anfragen hinsichtlich Fehler, Inbetriebnahme und Administration beantworten wir zeitnah (während unserer Geschäftszeiten). Vielleicht ist deine Frage bereits im Forum gestellt und beantwortet worden? Das Suchformular dort ist auch sehr mächtig, probiere es doch mal aus!", "wpsg"); ?></p>
+ <p><?php echo __("Bitte nutze generell das Forum für eine Support-Anfrage, <u>nicht</u> unser Kontaktformular oder Telefon.", "wpsg"); ?></p>
+ <a href="http://forum.maennchen1.de/">http://forum.maennchen1.de/</a>
+
+ <h2><?php echo __("Feature Wunschliste", "wpsg"); ?></h2>
+ <p><?php echo __("Wir orientieren uns direkt am Markt. Insofern geben wir dir als User die Möglichkeit mitzuentscheiden, welches Feature wpShopGermany zukünftig haben wird. Du kannst selber einen Feature-Wunsch anlegen, oder für einen bestehenden Wunsch deine Stimme abgeben.", "wpsg"); ?></p>
+ <a href="https://wpshopgermany.uservoice.com/">https://wpshopgermany.uservoice.com/</a>
+
+ <h2><?php echo __('Import aus wpShopGermany 2.5.8', 'wpsg'); ?></h2>
+ <p><?php echo __('Mit dieser Funktion können sie den Export aus einem wpShopGermany 2.5.8 in diese Version importieren', 'wpsg'); ?></p>
+ <strong class="wpsg_error"><?php echo __('Sichern Sie in jedem Fall vorher ihre Daten!', 'wpsg'); ?></strong>
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=importV2&amp;noheader=1" enctype="multipart/form-data">
+
+ <p><?php echo wpsg_translate(__('Für den Import der Daten aus der Version 2 gibt es 3 Wege, beachten Sie dazu unsere <a href="#1#">Upgrade Anleitung</a>.', 'wpsg'), 'http://wpshopgermany.de/?p=2508'); ?>:</p>
+
+ <ol>
+ <li>
+ <strong><?php echo __('Update innerhalb der Datenbank', 'wpsg'); ?>:</strong><br />
+ <?php if ($this->get_option('wpshopgermany_version_installed') == '2.5.8') { ?>
+
+ <?php echo __('Wählen Sie diese Option wenn sie das Plugin direkt in diesem Wordpress mit der Version2 ausgetauscht haben.', 'wpsg'); ?><br />
+ <?php echo __('Sie können diesen Import mehrfach durchführen. Starten Sie einen Testlauf und prüfen Sie anschließend die Daten. Sollte alles OK sein, so können Sie den Durchlauf ein zweites mal durchführen und die Tabellen und Daten löschen.', 'wpsg'); ?><br /><br />
+
+ <label>
+ <input type="checkbox" name="tabledel" value="1" />&nbsp;<?php echo __('Alte Tabellen und Daten nach Import löschen.', 'wpsg'); ?>
+ </label>
+ <input name="submit_import_db" type="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" value="<?php echo __('Import durchführen', 'wpsg'); ?>" /><br />
+
+ <?php } else if ($this->get_option('wpshopgermany_version_installed') !== false) { ?>
+
+ <p><?php echo __('Die vorher installierte wpShopGermany Version ist nicht kompatibel', 'wpsg'); ?></p>
+
+ <?php } else { ?>
+
+ <p><?php echo __('Diese Option steht ihnen nur zur Verfügung wenn sie vorher eine Version 2.5.8 des wpShopGermany installiert hatten.', 'wpsg'); ?></p>
+
+ <?php } ?>
+ </li>
+ <li>
+ <strong><?php echo __('Import aus der exportierten Datendatei über Datei Upload (Aus Version 2.5.8)', 'wpsg'); ?></strong><br />
+ <input type="file" name="datei" /><br />
+ <input type="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" value="<?php echo __('Hochladen', 'wpsg'); ?>" />
+ </li>
+ <li>
+ <strong><?php echo __('Import einer per FTP hochgeladenen Datendatei (Aus Version 2.5.8)', 'wpsg'); ?>:</strong><br />
+ <?php echo __('Dazu muss die Datei unter folgendem Pfad abgelegt werden:', 'wpsg'); ?><br />
+ <pre><?php echo WPSG_PATH_CONTENT; ?>uploads/wpsg_upgrade.zip</pre>
+ <?php if (file_exists(WPSG_PATH_CONTENT.'uploads/wpsg_upgrade.zip')) { ?>
+ <strong class="wpsg_erfolg"><?php echo __('Datei erkannt, klicken Sie auf "Importieren" um den Import zu starten.', 'wpsg'); ?></strong><br /><br />
+ <input name="submit_import" type="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" value="<?php echo __('Importieren', 'wpsg'); ?>" />
+ <?php } else { ?>
+ <strong class=wpsg_error><?php echo __('Keine Datei an dieser Stelle gefunden.', 'wpsg'); ?></strong>
+ <?php } ?>
+ </li>
+ </ol>
+
+ </form>
+
+ <h2><?php echo __('Migration der alten Mehrwertsteuersätze', 'wpsg'); ?></h2>
+ <p><?php echo wpsg_translate(
+ __('Ab Version 3.5 wurden die Mehrwertsteuersätze den Ländern zugeordnet. Die alten Mehrwertsteuersätze können <a href="#1#">hier</a> umgewandelt werden.', 'wpsg'),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=migratemwst'
+ ); ?>
+
+</div>
+ \ No newline at end of file
diff --git a/views/admin/includes.phtml b/views/admin/includes.phtml
new file mode 100644
index 0000000..b5b8201
--- /dev/null
+++ b/views/admin/includes.phtml
@@ -0,0 +1,50 @@
+<?php
+
+ /**
+ * Template für den Admin Bereich der eingebundenen Bibliotheken/Styles
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_css', __('Shop CSS styles nicht einbinden', 'wpsg'), $this->get_option('wpsg_load_css')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_jquery', __('JQuery einbinden', 'wpsg'), $this->get_option('wpsg_load_jquery'), array('help' => 'wpsg_load_jquery')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_thickbox_js', __('Thickbox einbinden (JavaScript)', 'wpsg'), $this->get_option('wpsg_load_thickbox_js'), array('help' => 'wpsg_load_thickbox')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_thickbox_css', __('Thickbox einbinden (Styles)', 'wpsg'), $this->get_option('wpsg_load_thickbox_css'), array('help' => 'wpsg_load_thickbox')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_validierung_js', __('Javascript Validierung laden', 'wpsg'), $this->get_option('wpsg_load_validierung_js')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_load_validierung_css', __('CSS der Javascript Validierung laden', 'wpsg'), $this->get_option('wpsg_load_validierung_css')); ?>
+
+ <?php $this->callMods('admin_includes'); ?>
+
+ <input type="hidden" name="subaction" value="includes" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+
+<script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+</script> \ No newline at end of file
diff --git a/views/admin/index.phtml b/views/admin/index.phtml
new file mode 100644
index 0000000..b6594ec
--- /dev/null
+++ b/views/admin/index.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ /**
+ * Templatedatei für die Startseite/Konfiguration im Backend
+ * Normalerweise sollte hier nichts angepasst werden
+ */
+
+?>
+
+<div class="wpsg_admin">
+
+ <div class="wrap">
+ <h2><?php echo __('wpShopGermany', 'wpsg'); ?></h2>
+ </div>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <div class="wpsg_admin_topmenu">
+ <ul>
+ <li class="<?php echo (($this->view['actionName'] == "index")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin"><?php echo __("Einstellungen", "wpsg"); ?></a></li>
+ <li class="<?php echo (($this->view['actionName'] == "module")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module"><?php echo __("Module", "wpsg"); ?></a></li>
+ <?php if (current_user_can('wpsg_lizence') && $this->hasMod('wpsg_mod_core')) { ?>
+ <li class="<?php echo (($this->view['actionName'] == "registrierung")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=registrierung"><?php echo __("Lizenzverwaltung", "wpsg"); ?></a></li>
+ <?php } ?>
+ <li class="<?php echo (($this->view['actionName'] == 'news')?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=news">
+ <?php echo __('Aktuelles', 'wpsg'); ?>
+ <?php if (wpsg_isSizedInt($wpsg_news_unread = wpsg_news::countUnreadNews())) { ?>
+ <span class="wpsg_news_unreadhint"><?php echo $wpsg_news_unread; ?></span>
+ <?php } ?>
+ </a></li>
+ <li class="<?php echo (($this->view['actionName'] == "hilfe")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=hilfe"><?php echo __("Hilfe", "wpsg"); ?></a></li>
+ <li class="<?php echo (($this->view['actionName'] == "ueber")?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=ueber"><?php echo __("Über", "wpsg"); ?></a></li>
+ </ul>
+ </div>
+ <div style="clear:both;"></div>
+
+ <div class="wpsg_admin_wrap">
+ <?php if (wpsg_isSizedString($this->view['subTemplate'])) { ?>
+ <?php $this->render($this->view['subTemplate']); ?>
+ <?php } ?>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/admin/kalkulation.phtml b/views/admin/kalkulation.phtml
new file mode 100644
index 0000000..e41888a
--- /dev/null
+++ b/views/admin/kalkulation.phtml
@@ -0,0 +1,91 @@
+<?php
+
+ /**
+ * Template für den Admin Bereich der Preiskalkulation
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+ <?php echo wpsg_drawForm_Checkbox('wpsg_kleinunternehmer', __('Kleinunternehmerregelung', 'wpsg'), $this->get_option('wpsg_kleinunternehmer'), array('help' => 'Preiskalkulation_wpsg_kleinunternehmer')); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_kleinunternehmer_text', __('Kleinunternehmerregelung Text', 'wpsg'), $this->get_option('wpsg_kleinunternehmer_text'), array()) ?>
+ <div class="wpsg_preisangaben_layer">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Preisangaben im Shop (Backend)", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <select name="wpsg_preisangaben">
+ <option value="<?php echo WPSG_BRUTTO; ?>" <?php echo (($this->get_option('wpsg_preisangaben') == WPSG_BRUTTO)?'selected="selected"':''); ?>><?php echo __('Brutto (inkl. Steuer)', 'wpsg'); ?></option>
+ <option value="<?php echo WPSG_NETTO; ?>" <?php echo (($this->get_option('wpsg_preisangaben') == WPSG_NETTO)?'selected="selected"':''); ?>><?php echo __('Netto (zzgl. Steuer)', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php echo wpsg_drawForm_Select('wpsg_preisangaben_frontend', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'), WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')), $this->get_option('wpsg_preisangaben_frontend')); ?>
+ </div>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_hideemptyshipping', __('Versandkosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptyshipping'), array('help' => 'Preiskalkulation_wpsg_hideemptyshipping')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_hideemptypayment', __('Zahlungskosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptypayment'), array('help' => 'Preiskalkulation_wpsg_hideemptypayment')); ?>
+
+ <input type="hidden" name="subaction" value="kalkulation" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ <script type="text/javascript">
+
+ /**
+ * Wird beim ändern der Kleinunternehmerregelung aufgerufen
+ */
+ function wpsg_setKleinunternehmer()
+ {
+
+ return;
+
+ if (jQuery('#wpsg_kleinunternehmer').attr('checked'))
+ {
+
+ jQuery('.wpsg_preisangaben_layer').hide();
+
+ }
+ else
+ {
+
+ jQuery('.wpsg_preisangaben_layer').show();
+
+ }
+
+ } // function wpsg_setKleinunternehmer()
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_kleinunternehmer').bind('change', function() {
+
+ wpsg_setKleinunternehmer();
+
+ } );
+
+ jQuery('.wpsg_form_help').tipTip();
+ wpsg_setKleinunternehmer();
+
+ } );
+
+ </script>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/konfiguration.phtml b/views/admin/konfiguration.phtml
new file mode 100644
index 0000000..a93cd79
--- /dev/null
+++ b/views/admin/konfiguration.phtml
@@ -0,0 +1,167 @@
+<?php
+
+ /**
+ * Templatedatei für die Einstellungsseite im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=konfiguration&noheader=1'); ?>">
+
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <?php if ($this->arLizenz['l'] == 0) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Lizenzende", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <?php if ($this->getDemoDays() < 0) { ?>
+ <p><?php echo wpsg_translate(__('Vor #1# Tage(n) abgelaufen.', 'wpsg'), abs($this->getDemoDays())); ?></p>
+ <?php } else { ?>
+ <p><?php echo wpsg_translate(__('#1# Tage verbleibend.', 'wpsg'), $this->getDemoDays()); ?></p>
+ <?php } ?>
+ <a rel="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DemoMode" title="DemoMode" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DemoMode" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Lizenzstatus', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php
+
+ switch ($this->arLizenz['l'])
+ {
+
+ case '1': echo __('Light Version', 'wpsg'); break;
+ case '2': echo __('Pro Version', 'wpsg'); break;
+ case '3': echo __('Enterprise Version', 'wpsg'); break;
+ default: die();
+
+ }
+
+ ?>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <?php } else { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">&nbsp;</div>
+ <div class="wpsg_form_right">
+ <?php echo wpsg_translate(
+ __('<span style="color:red; font-weight:bold;">Weitere Funktionen in der Vollversion.</span><br />[ <a target="_blank" href="#1#">Vollversion kaufen</a> ] [ <a target="_blank" href="#2#">Weitere Infos</a> ]', 'wpsg'),
+ 'http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/',
+ 'http://wpshopgermany.de/'
+ ); ?>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php if ($this->get_option("wpsg_version_installed", true) != WPSG_VERSION) { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <span style="color:red;"><?php echo __("Update", "wpsg"); ?>:</span>
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo __("Die Version der Datenbank stimmt nicht mit der installierten Version überein!<br />Bitte klicken Sie auf ", "wpsg").'<a href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&amp;subaction=allgemein&amp;do=update&amp;submit=1&amp;noheader=1">'.__("Aktualisieren", "wpsg").'</a>&nbsp;('.__("Produkte etc. werden dabei nicht gelöscht.", "wpsg"); ?>)</p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } else { ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Installierte DB Version", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p><?php echo WPSG_VERSION; ?>&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=allgemein&amp;do=update&amp;submit=1&amp;noheader=1"><?php echo __("Aktualisieren", "wpsg"); ?></a></p>
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=DBUpdate" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+ <br />
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Währung", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" value="<?php echo wpsg_hspc($this->get_option('wpsg_currency')); ?>" name="wpsg_currency" />
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=Einstellungen_Allgemein_Waehrung" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=Einstellungen_Allgemein_Waehrung" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php if (wpsg_isSizedArray($this->view['arLanguages'])) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_backend_language', __('Standardsprache (Backend)', 'wpsg'), $this->view['arLanguages'], $this->get_option('wpsg_backend_language'), array('help' => 'Einstellungen_Allgemein_Standardsprachebackend')); ?>
+ <?php } ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Produkte pro Seite', 'wpsg'); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <input type="text" value="<?php echo wpsg_hspc($this->get_option('wpsg_produkte_perpage')); ?>" name="wpsg_produkte_perpage" />
+ <a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=ProduktePerPage" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=ProduktePerPage" class="wpsg_form_help"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php echo wpsg_drawForm_Input('wpsg_order_perpage', __('Bestellungen pro Seite', 'wpsg'), $this->get_option('wpsg_order_perpage')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_showincompleteorder', __('Unvollständige Best. in Bestellverwaltung anzeigen', 'wpsg'), $this->get_option('wpsg_showincompleteorder')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_emptyorder_clear', wpsg_translate(__('Bestellungen für 0 #1# direkt abschließen', 'wpsg'), $this->get_option('wpsg_currency')), $this->get_option('wpsg_emptyorder_clear')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_afterinsert', __('Nach neuem Produkt im Warenkorb', 'wpsg'), array(
+ '0' => __('Auf Seite bleiben', 'wpsg'),
+ '1' => __('Zum Warenkorb leiten', 'wpsg'),
+ '2' => __('Warenkorb im Fenster anzeigen', 'wpsg'),
+ '3' => __('Lightbox Meldung', 'wpsg')
+ ), $this->get_option('wpsg_afterinsert')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_skip_checkout2', __('Auswahl der Zahlung/Versandart überspringen wenn möglich', 'wpsg'), $this->get_option('wpsg_skip_checkout2')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_afterorder', __('Kundendaten nach Bestellung', 'wpsg'), array(
+ '0' => __('In Session belassen', 'wpsg'),
+ '1' => __('Löschen', 'wpsg')
+ ), $this->get_option('wpsg_afterorder')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_format_knr', __('Formatierung Kundennummer', 'wpsg'), $this->get_option('wpsg_format_knr'), array('help' => 'Formatierung_Kundennummer')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_order_knr', __('Sortierung Kundennummer (Backend)', 'wpsg'), array('0' => __('Numerisch', 'wpsg'), '1' => __('Alphabetisch', 'wpsg')), $this->get_option('wpsg_order_knr')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_customer_start', __('Start für Kundennummer', 'wpsg'), $this->get_option('wpsg_customer_start')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_format_onr', __('Formatierung Bestellnummer', 'wpsg'), $this->get_option('wpsg_format_onr'), array('help' => 'Formatierung_Bestellnummer')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_order_start', __('Start für Bestellnummer', 'wpsg'), $this->get_option('wpsg_order_start')); ?>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ </script>
+
+ <input type="hidden" name="subaction" value="konfiguration" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/kundendaten.phtml b/views/admin/kundendaten.phtml
new file mode 100644
index 0000000..6896577
--- /dev/null
+++ b/views/admin/kundendaten.phtml
@@ -0,0 +1,88 @@
+<?php
+
+ /**
+ * Template für die Verwaltung der Kundendaten
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <div class="wpsg_admin_box" id="wpsg_tab">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
+
+ <div class="head">
+ <div class="title">
+ <div class="tab" id="tab1"><?php echo __('Pfllichtfelder', 'wpsg'); ?></div>
+ <div class="tab" id="tab2"><?php echo __('Weitere Kundendaten', 'wpsg'); ?></div>
+ <div class="tabcontent tablink">
+ <a href="" title="<?php echo __('Neues Kundenfeld hinzufügen', 'wpsg'); ?>" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addCustomField();"></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </div>
+ <div class="content" id="wpsg_mwst_list">
+
+ <div id="tabcontent1" class="tabcontent">
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab1.phtml'); ?>
+ </div>
+ <div id="tabcontent2" class="tabcontent">
+
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab2.phtml'); ?>
+
+ </div>
+
+ </div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+
+ <script type="text/javascript">
+
+ /**
+ * Wird beim hinzufügen eines benutzerdefinierten Kundenfeldes aufgerufen
+ */
+ function wpsg_addCustomField()
+ {
+
+ jQuery('#tabcontent2').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=add&noheader=1',
+ success: function(data) {
+ jQuery('#tabcontent2').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addCustomField()
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_kundendaten_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+ } );
+
+ </script>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/admin/kundendaten_codeinfo.phtml b/views/admin/kundendaten_codeinfo.phtml
new file mode 100644
index 0000000..322f36a
--- /dev/null
+++ b/views/admin/kundendaten_codeinfo.phtml
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Dieses Template wird bei den Kundenvariablen angezeigt und zeigt den Code für benutzerdefinierte Kundenvariablen an
+ */
+
+?>
+<?php echo wpsg_translate(__('Code für die Abfrage der Kundenvariable mit der ID #1# (Muss im checkout2.phtml verwendet werden)', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+
+ &lt;?php echo $this-&gt;renderKundenField($this-&gt;view, <?php echo $this->view['id'] ?>); ?&gt;
+
+</div><br />
+<?php echo wpsg_translate(__('Code für die Ausgabe der Kundenvariable mit der ID #1# (Während die Bestellung noch nicht übertragen wurde)', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+
+ &lt;?php echo $this-&gt;getCustomerFieldFromSession(<?php echo $this->view['id'] ?>); ?&gt;
+
+</div><br />
+<?php echo wpsg_translate(__('Code für die Ausgabe der Kundenvariable mit der ID #1# (Nachdem der Kunde in der Datenbank angelegt ist)', 'wpsg'), $this->view['id']); ?>
+<div class="wpsg_code">
+
+ &lt;?php echo $this-&gt;getCustomFieldFromDB(%kunde_id%, <?php echo $this->view['id'] ?>); ?&gt;
+
+</div>
+<div class="wpsg_hinweis"><?php echo __('%kunde_id% muss durch die ID des Kunden in der Datenbank ersetzt werden', 'wpsg'); ?></div> \ No newline at end of file
diff --git a/views/admin/kundendaten_renderfield.phtml b/views/admin/kundendaten_renderfield.phtml
new file mode 100644
index 0000000..d3cddf3
--- /dev/null
+++ b/views/admin/kundendaten_renderfield.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Zeichnet eine einzelne Kundenvariable innerhalb des checkout.phtml
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $this->view['field']['id']; ?>">
+ <?php echo wpsg_hspc(__($this->view['field']['name'], 'wpsg')); ?><?php if ($this->view['field']['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($this->view['field']['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$this->view['field']['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" type="text" value="<?php echo $this->view['basket']['checkout']['custom'][$this->view['field']['id']]; ?>" />
+ <?php } else if ($this->view['field']['typ'] == '1') { $arAuswahl = explode("|", $this->view['field']['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$this->view['field']['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['basket']['checkout']['custom'][$this->view['field']['id']])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($this->view['field']['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" value="0" />
+ <input class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" value="1" <?php echo (($this->view['basket']['checkout']['custom'][$this->view['field']['id']] == '1')?'checked="checked"':''); ?> />
+ <?php } ?>
+ </label>
+</div> \ No newline at end of file
diff --git a/views/admin/kundendaten_tab1.phtml b/views/admin/kundendaten_tab1.phtml
new file mode 100644
index 0000000..6fe5425
--- /dev/null
+++ b/views/admin/kundendaten_tab1.phtml
@@ -0,0 +1,146 @@
+<?php
+
+ /**
+ * Template für den ersten Karteireiter der Kundendaten
+ */
+
+?>
+<table class="wpsg_pflichtfelder">
+ <tr>
+ <th class="col0"><?php echo __("Feldbezeichnung", "wpsg"); ?></th>
+ <th class="col1"><?php echo __("Pflichtfeld", "wpsg"); ?></th>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Anrede', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[anrede]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['anrede'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Mögliche Werte für Auswahl getrennt mit |', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <input type="text" style="width:100%;" name="pflicht[anrede_auswahl]" value="<?php echo $this->view['pflicht']['anrede_auswahl']; ?>" />
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Firma', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[firma]">
+ <option value="0"><?php echo __("Ja", "wpsg"); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['firma'] == '1')?'selected="selected"':''); ?>><?php echo __("Nein", "wpsg"); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Vorname', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[vname]">
+ <option value="0"><?php echo __("Ja", "wpsg"); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['vname'] == '1')?'selected="selected"':''); ?>><?php echo __("Nein", "wpsg"); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Name', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[name]">
+ <option value="0"><?php echo __("Ja", "wpsg"); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['name'] == '1')?'selected="selected"':''); ?>><?php echo __("Nein", "wpsg"); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Geburtsdatum', 'wpsg'); ?></td>
+ <td class="col1">
+ <select name="pflicht[geb]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['geb'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('E-Mail Adresse', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[email]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['email'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"></td>
+ <td class="col1">
+ <label style="line-height:24px;">
+ <input type="hidden" name="pflicht[emailconfirm]" value="0" />
+ <input type="checkbox" value="1" <?php echo (($this->view['pflicht']['emailconfirm'] == '1')?'checked="checked"':''); ?> name="pflicht[emailconfirm]" style="width:auto; margin-left:5px;" />&nbsp;
+ <?php echo __('E-Mail Adresse (Wiederholung)', 'wpsg'); ?>
+ </label>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Telefon', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[tel]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['tel'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Fax', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[fax]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['fax'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Straße', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[strasse]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['strasse'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Postleitzahl', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[plz]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['plz'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('Ort', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[ort]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['ort'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_even">
+ <td class="col0"><?php echo __('Land', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[land]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['land'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+ <tr class="wpsg_odd">
+ <td class="col0"><?php echo __('UStIdNr.', 'wpsg'); ?>:</td>
+ <td class="col1">
+ <select name="pflicht[ustidnr]">
+ <option value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->view['pflicht']['ustidnr'] == '1')?'selected="selected"':''); ?>><?php echo __('Nein', 'wpsg'); ?></option>
+ </select>
+ </td>
+ </tr>
+</table>
diff --git a/views/admin/kundendaten_tab2.phtml b/views/admin/kundendaten_tab2.phtml
new file mode 100644
index 0000000..e506f2e
--- /dev/null
+++ b/views/admin/kundendaten_tab2.phtml
@@ -0,0 +1,117 @@
+<?php
+
+ /**
+ * Template für die erweiteren Kundendaten
+ */
+
+?>
+<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
+
+<script type="text/javascript">
+
+ /**
+ * Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
+ */
+ function wpsg_genKVCode(kv_id)
+ {
+
+ jQuery("#wpsg_kv_code_dialog").dialog( {
+ 'dialogClass': 'wp-dialog',
+ 'modal': true,
+ 'width': 700,
+ 'height': 300,
+ 'title': '<?php echo __('HTML Code Block', 'wpsg'); ?>',
+ open: function(event, ui) {
+
+ jQuery('#wpsg_kv_code_dialog .wpsg_dialog').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: 'admin.php?page=wpsg-Admin&subaction=kundendaten&noheader=1&show=code',
+ data: {
+ 'kv_id': kv_id
+ },
+ success: function(data)
+ {
+
+ jQuery('#wpsg_kv_code_dialog .wpsg_dialog').html(data);
+
+ }
+ } );
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_genPACode(pa_id)
+
+</script>
+
+<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
+
+<table class="wpsg_customfields">
+ <tr>
+ <th class="col0"><?php echo __('Index', 'wpsg'); ?></th>
+ <th class="col1"><?php echo __('Kundenvariablen', 'wpsg'); ?></th>
+ <th class="col2"><?php echo __('Pflichtfeld', 'wpsg'); ?></th>
+ <th class="col3"><?php echo __('Typ', 'wpsg'); ?></th>
+ <th class="col4"></th>
+ <th class="col5">
+ <a class="wpsg_icon wpsg_icon_center wpsg_icon_remove" href="#" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return false;"></a>
+ </th>
+ </tr>
+ <?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
+ <tr>
+ <td class="col0"><?php echo $c_id; ?></td>
+ <td class="col2 wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></td>
+ <td class="col3">
+ <select name="pflicht[custom][<?php echo $c_id; ?>][show]">
+ <option <?php echo (($c['show'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option <?php echo (($c['show'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Nein', 'wpsg'); ?></option>
+ <option <?php echo (($c['show'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Nicht zeigen', 'wpsg'); ?></option>
+ </select>
+ </td>
+ <td class="col3">
+ <select onchange="if (jQuery(this).val() == '1') jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); else jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();" name="pflicht[custom][<?php echo $c_id; ?>][typ]">
+ <option <?php echo (($c['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
+ <option <?php echo (($c['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
+ <option <?php echo (($c['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Checkbox', 'wpsg'); ?></option>
+ </select>
+ </td>
+ <td class="col4">
+ <a class="wpsg_icon wpsg_icon_html wpsg_icon_center" href="#" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"></a>
+ </td>
+ <td class="col5">
+ <input type="checkbox" value="1" name="pflicht[custom][<?php echo $c_id; ?>][del]" />
+
+ <script type="text/javascript">
+
+ jQuery('#kundenvariable_name_<?php echo $c_id; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ field_id: '<?php echo $c_id; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ </script>
+
+ </td>
+ </tr>
+ <tr id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
+ <td class="col0"></td>
+ <td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
+ <td class="col2345" colspan="4">
+ <input type="text" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+<br />
+<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show')); ?>
+<?php } else { ?>
+<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
+<?php } ?> \ No newline at end of file
diff --git a/views/admin/laender.phtml b/views/admin/laender.phtml
new file mode 100644
index 0000000..e3fef52
--- /dev/null
+++ b/views/admin/laender.phtml
@@ -0,0 +1,244 @@
+<?php
+
+ /**
+ * Template für die Länderverwaltung
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <div class="wpsg_admin_box">
+
+ <h3>
+ <?php echo __('Neues Land hinzufügen', 'wpsg'); ?>
+ <a target="_blank" href="http://wpshopgermany.maennchen1.de/?p=839037" class="wpsg_form_help_notip"></a>
+ </h3>
+
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_edit.phtml'); ?>
+
+ <h3><?php echo __('Bestehende Länder', 'wpsg'); ?></h3>
+
+ <?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+ <table class="wpsg_admin_laender_list wpsg_admin_table" cellpadding="0" cellspacing="0">
+ <tr>
+ <th class="col_name"><?php echo __('Ländername', 'wpsg'); ?></th>
+ <th class="col_vz"><?php echo __('Versandzone', 'wpsg'); ?></th>
+ <th class="col_mwstsetting"><?php echo __('MwSt.', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. A', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. B', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. C', 'wpsg'); ?></th>
+ <th class="col_mwst"><?php echo __('MwSt. D', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['data'] as $l) { $i ++; ?>
+ <tr id="wpsg_laenderrow_<?php echo $l['id']; ?>" class="<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="col_name data_name"><?php echo wpsg_hspc($l['name'].((wpsg_isSizedString($l['kuerzel']))?' ('.$l['kuerzel'].')':'')); ?></td>
+ <td class="col_vz data_vz">
+ <?php if (wpsg_isSizedInt($l['vz']) && wpsg_isSizedString($this->view['vz'][$l['vz']])) { ?>
+ <?php echo wpsg_hspc($this->view['vz'][$l['vz']]); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwstsetting data_mwst">
+ <?php if ($l['mwst'] == '2') { ?>
+ <?php echo __('keine MwSt. bei USt.IdNr.', 'wpsg'); ?>
+ <?php } else if ($l['mwst'] == '1') { ?>
+ <?php echo __('keine MwSt.', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('mit MwSt.', 'wpsg'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_a">
+ <?php if (wpsg_tf($l['mwst_a']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_a']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_b">
+ <?php if (wpsg_tf($l['mwst_b']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_b']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_c">
+ <?php if (wpsg_tf($l['mwst_c']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_c']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_mwst data_mwst_d">
+ <?php if (wpsg_tf($l['mwst_d']) != NULL) { ?>
+ <?php echo wpsg_ff(wpsg_tf($l['mwst_d']), '%'); ?>
+ <?php } ?>
+ </td>
+ <td class="col_action">
+
+ <a class="wpsg_icon wpsg_icon_edit" href="#" onclick="return wpsg_laender_edit(<?php echo $l['id']; ?>);"></a>
+ <a class="wpsg_icon wpsg_icon_remove" href="#" onclick="return wpsg_laender_remove(<?php echo $l['id']; ?>);"></a>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+ <?php } else { ?>
+ <p><?php echo __('Noch keine Länder angelegt.', 'wpsg'); ?>
+ <?php } ?>
+
+ <br /><br />
+
+ <input type="button" onclick="return wpsg_laender_import();" value="<?php echo __('Standardländer importieren', 'wpsg'); ?>" class="button" />
+ <input type="button" onclick="return wpsg_eu_laender_import();" value="<?php echo __('Standard EU-Länder importieren', 'wpsg'); ?>" class="button" />
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ var land_load = false;
+
+ function wpsg_laender_import()
+ {
+
+ if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
+
+ location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1";
+
+ return false;
+
+ }
+
+ function wpsg_eu_laender_import()
+ {
+
+ if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
+
+ location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1";
+
+ return false;
+
+ }
+
+ function wpsg_laender_save()
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=saveEdit&noheader=1',
+ data: {
+ form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
+ },
+ success: function(data) {
+
+ if (typeof data === 'object')
+ {
+
+ land_load = true;
+
+ for (var i in data)
+ {
+
+ jQuery('#wpsg_laenderrow_' + data['id']).find('.data_' + i).html(data[i]);
+
+ }
+
+ jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
+
+ jQuery('#wpsg_laenderrow_edit').remove();
+ land_load = false;
+
+ } );
+
+ }
+ else alert(data);
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_laender_edit(land_id)
+ {
+
+ if (land_load == true) return; land_load = true;
+
+ var edit_timeout = 0;
+
+ if (jQuery('#wpsg_laenderrow_edit > td > div').is(':visible'))
+ {
+
+ edit_timeout = 150;
+
+ jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
+
+ jQuery('#wpsg_laenderrow_edit').remove();
+
+ } );
+
+ }
+
+ window.setTimeout(function() {
+
+ jQuery('#wpsg_laenderrow_' + land_id).after('<tr id="wpsg_laenderrow_edit"><td colspan="8"><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" /><div style="display:none;"></div></td></tr>');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1',
+ data: {
+ land_id: land_id
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_laenderrow_edit > td > div').html(data);
+ jQuery('#wpsg_laenderrow_edit > td > img').hide();
+ jQuery('#wpsg_laenderrow_edit > td > div').slideDown(300, function() { land_load = false; } );
+
+ }
+ } );
+
+ }, edit_timeout);
+
+ return false;
+
+ }
+
+ function wpsg_laender_remove(land_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=remove&noheader=1',
+ data: {
+ land_id: land_id
+ },
+ success: function(data) {
+
+ if (data === "1") jQuery('#wpsg_laenderrow_' + land_id).remove();
+ else alert(data);
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ /* ]]> */</script>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/admin/laender_edit.phtml b/views/admin/laender_edit.phtml
new file mode 100644
index 0000000..421ed79
--- /dev/null
+++ b/views/admin/laender_edit.phtml
@@ -0,0 +1,29 @@
+<form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=saveNew&noheader=1" id="<?php echo ((wpsg_isSizedInt($this->view['land']['id']))?'wpsg_land_edit_form_edit':'wpsg_land_edit_form_new'); ?>">
+
+ <?php if (wpsg_isSizedInt($this->view['land']['id'])) $prefix = 'land'; else $prefix = 'newland'; ?>
+
+ <?php echo wpsg_drawForm_Input($prefix.'[name]', __('Ländername', 'wpsg'), wpsg_getStr($this->view['land']['name']), array('help' => 'wpsg_land_name')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[kuerzel]', __('Kürzel', 'wpsg'), wpsg_getStr($this->view['land']['kuerzel']), array('help' => 'wpsg_land_kuerzel')); ?>
+ <?php echo wpsg_drawForm_Select($prefix.'[vz]', __('Versandzone', 'wpsg'), $this->view['vz'], wpsg_getStr($this->view['land']['vz']), array('help' => 'wpsg_land_vz')); ?>
+ <?php echo wpsg_drawForm_Select($prefix.'[mwst]', __('MwSt. Grundlage', 'wpsg'), array(
+ '0' => __('mit MwSt.', 'wpsg'),
+ '1' => __('keine MwSt.', 'wpsg'),
+ '2' => __('keine MwSt. bei USt.IdNr.', 'wpsg')
+ ), wpsg_getStr($this->view['land']['mwst']), array('help' => 'wpsg_land_mwst')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_a]', __('MwSt. Satz A (stark ermäßigter Satz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_a']), array('help' => 'wpsg_land_mwst_a')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_b]', __('MwSt. Satz B (ermäßigter Satz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_b']), array('help' => 'wpsg_land_mwst_b')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_c]', __('MwSt. Satz C (Normalsatz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_c']), array('help' => 'wpsg_land_mwst_c')); ?>
+ <?php echo wpsg_drawForm_Input($prefix.'[mwst_d]', __('MwSt. Satz D (Zwischensatz)', 'wpsg'), wpsg_getStr($this->view['land']['mwst_d']), array('help' => 'wpsg_land_mwst_d')); ?>
+ <?php echo wpsg_drawForm_Checkbox($prefix.'[standard]', __('Standardland', 'wpsg'), wpsg_getStr($this->view['land']['standard']), array('disabled' => ((isset($this->view['land']['standard']) && $this->view['land']['standard'] == '1')?true:false), 'help' => 'wpsg_land_standard')); ?>
+
+ <?php if (wpsg_isSizedInt($this->view['land']['id'])) { ?>
+ <input type="hidden" name="<?php echo $prefix; ?>[id]" value="<?php echo wpsg_hspc($this->view['land']['id']); ?>" />
+ <?php } ?>
+
+ <br />
+
+ <input class="button" type="submit" onclick="return <?php echo ((wpsg_isSizedInt($this->view['land']['id']))?'wpsg_laender_save();':''); ?>" value="<?php echo __('Speichern', 'wpsg'); ?>" />
+
+ <br /><br ><hr />
+
+</form> \ No newline at end of file
diff --git a/views/admin/loadsavesettings.phtml b/views/admin/loadsavesettings.phtml
new file mode 100644
index 0000000..4ff2599
--- /dev/null
+++ b/views/admin/loadsavesettings.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template für den Menüpunkt "Backup/Restore"
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=loadsavesettings&noheader=1'); ?>">
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_debugModus"><?php echo __('Einstellungen speichern', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=loadsavesettings&noheader=1&wpsg_do=downloadsettings&submit=1'; ?>" title="<?php echo __('Einstellungen als XML Datei downloaden', 'wpsg'); ?>"><?php echo __('Download', 'wpsg'); ?></a>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for="wpsg_debugModus"><?php echo __('Einstellungen laden', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <input type="file" name="wpsg_settings" />
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen übernehmen', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+ <p class="wpsg_hinweis">
+ <?php echo __('Derzeit werden nur die Einstellungen gespeichert. Produkte/Kunden/Bestellungen etc. sind nicht enthalten!', 'wpsg'); ?>
+ </p>
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/migratemwst.phtml b/views/admin/migratemwst.phtml
new file mode 100644
index 0000000..8267059
--- /dev/null
+++ b/views/admin/migratemwst.phtml
@@ -0,0 +1,62 @@
+<?php
+
+ /**
+ * Template für die Migration der alten MwSt. Sätze in die Länder
+ */
+
+?>
+<form method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=migratemwst&noheader=1">
+
+ <h3><?php echo __('Standardland', 'wpsg'); ?></h3>
+
+ <?php echo wpsg_drawForm_Input('', __('Name', 'wpsg'), $this->view['defaultCountry']->name, array('text' => true)); ?>
+
+ <br />
+
+ <h3><?php echo __('Produkte im Datenbestand', 'wpsg'); ?></h3>
+ <?php if (wpsg_isSizedArray($this->view['distinctProductTax'])) { ?>
+ <?php foreach ($this->view['distinctProductTax'] as $dp) { ?>
+
+ <?php if (wpsg_isSizedInt($dp['id'])) { ?>
+ <?php echo wpsg_drawForm_Select('mwst['.$dp['id'].']', wpsg_translate(__('#1# Produkte mit #2# Mehrwertsteuer (#3#)', 'wpsg'), $dp['count_product'], wpsg_ff($dp['value'], '%'), $dp['name']), wpsg_tax_groups(true), 'c'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_drawForm_Select('mwst['.$dp['id'].']', wpsg_translate(__('#1# Produkte mit ungültigem Steuersatz', 'wpsg'), $dp['count_product']), wpsg_tax_groups(true), 'c'); ?>
+ <?php } ?>
+
+ <?php } ?>
+ <?php } else { ?>
+ <p><?php echo __('Keine Produkte die noch keiner Mehrwertsteuergruppe zugewiesen wurden im Datenbestand.', 'wpsg'); ?>
+ <?php } ?>
+
+ <?php if (wpsg_isSizedArray($this->view['arConf'])) { ?>
+ <h3><?php echo __('Modulkonfigurationen', 'wpsg'); ?></h3>
+
+ <?php foreach ($this->view['arConf'] as $key => $label) { ?>
+ <?php echo wpsg_drawForm_Select('conf['.$key.']', $label, wpsg_tax_groups(), 'c'); ?>
+ <?php } ?>
+
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_userpayment')) { ?>
+ <?php if (wpsg_isSizedArray($this->view['arPaymentMethods'])) { ?>
+ <h3><?php echo __('Zahlvarianten', 'wpsg'); ?></h3>
+ <?php foreach ($this->view['arPaymentMethods'] as $pm) { ?>
+ <?php echo wpsg_drawForm_Select('pv['.$pm['id'].']', __($pm['name'], 'wpsg'), wpsg_tax_groups(), 'c'); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_versandarten')) { ?>
+ <?php if (wpsg_isSizedArray($this->view['arShippingMethods'])) { ?>
+ <h3><?php echo __('Versandarten', 'wpsg'); ?></h3>
+ <?php foreach ($this->view['arShippingMethods'] as $sm) { ?>
+ <?php echo wpsg_drawForm_Select('sv['.$sm['id'].']', __($sm['name'], 'wpsg'), wpsg_tax_groups(), 'c'); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+
+ <br />
+
+ <input type="submit" name="submit" class="button-primary" value="<?php echo __('Mehrwertsteuersätze zuweisen', 'wpsg'); ?>" />
+
+</form> \ No newline at end of file
diff --git a/views/admin/module.phtml b/views/admin/module.phtml
new file mode 100644
index 0000000..faa84d2
--- /dev/null
+++ b/views/admin/module.phtml
@@ -0,0 +1,137 @@
+<?php
+
+ /**
+ * Templatedatei für die Modulseite des Backend
+ * Sollte nicht angepasst werden
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <?php foreach ($this->view['groups'] as $group_name => $g) { ?>
+ <div class="head">
+ <div class="title"><?php echo $group_name; ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($g as $mod_key => $m) { ?>
+ <li class="<?php echo (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':''); ?> <?php echo (($mod_key == $_REQUEST['modul'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $mod_key; ?>"><?php echo $m->name; ?></a></li>
+ <?php } ?>
+ </ul>
+ <div style="clear:both; height:10px; margin-left:0px; margin-right:8px;"></div>
+ <?php } ?>
+
+</div>
+
+<?php if (isset($_REQUEST['modul'])) { ?>
+<div class="wpsg_admin_content">
+ <form name="form1" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;noheader=1" method="post" enctype="multipart/form-data">
+
+ <h3>
+ <?php echo $this->arAllModule[$_REQUEST['modul']]->name; ?>
+ <?php if (isset($this->arAllModule[$_REQUEST['modul']]->hilfeURL) && $this->arAllModule[$_REQUEST['modul']]->hilfeURL != '') { ?>
+ <a target="_blank" href="<?php echo $this->arAllModule[$_REQUEST['modul']]->hilfeURL; ?>" class="wpsg_form_help_notip"></a>
+ <?php } ?>
+ </h3>
+
+ <p><?php echo $this->arAllModule[$_REQUEST['modul']]->desc; ?></p>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Modul aktiviert", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <select name="aktiv">
+ <option value="0"><?php echo __('Nein', 'wpsg'); ?></option>
+ <option value="1" <?php echo (($this->get_option($_REQUEST['modul'], $this->view['global']) > 0)?'selected="selected"':''); ?>><?php echo __('Ja', 'wpsg'); ?></option>
+ </select>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php if (isset($this->arAllModule[$_REQUEST['modul']]->version)) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Version', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->version, array('text' => true)); ?>
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __("Lizenz", "wpsg"); ?>:
+ </div>
+ <div class="wpsg_form_right">
+ <p>
+ <?php if (isset($this->arAllModule[$_REQUEST['modul']]->free) && $this->arAllModule[$_REQUEST['modul']]->free === true) { ?>
+ <?php echo __('Kostenfrei', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php if (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) { ?>
+ <?php echo __('Aktiviert', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0) { ?>
+ <?php echo wpsg_translate(__('Demo Modus noch #1# Tage verbleibend.', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->getDemoDays()); ?>
+ <?php } else { ?>
+ <?php echo __('Demo Modus abgelaufen.', 'wpsg'); ?>
+ <?php } ?>
+ <?php } ?>
+ <?php } ?>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+ <?php } ?>
+
+ <?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || (($this->arAllModule[$_REQUEST['modul']]->free === true || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) || $this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0))) { ?>
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
+ <?php } ?>
+
+ <input type="hidden" name="subaction" value="module" />
+
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline == true) { ?>
+ </form>
+ <?php } ?>
+
+ <?php if ($this->get_option($_REQUEST['modul'], $this->view['global']) > 0) { ?>
+ <?php echo $this->arModule[$_REQUEST['modul']]->settings_edit(); ?>
+ <?php } ?>
+
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
+ <?php } ?>
+ <?php } else { ?>
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
+ <?php } ?>
+
+ <?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
+ </form>
+ <?php } ?>
+</div>
+<?php } else { ?>
+
+ <?php if ($this->hasMod('wpsg_mod_core')) { ?>
+ <?php echo $this->callMod('wpsg_mod_core', 'module_index'); ?>
+ <?php } else { ?>
+
+ <div class="wpsg_admin_content">
+
+ <h3><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
+ <p><?php echo __('wpShopGermany ist Modular aufgebaut, wählen Sie links das Modul aus, welches Sie konfigurieren möchten. ', 'wpsg'); ?></p>
+
+ <p><?php echo wpsg_translate(
+ __('<span style="color:red; font-weight:bold;">wpShopGermany Vollversion erwerben und weitere Funktionen freischalten.</span> [ <a target="_blank" href="#1#">Vollversion kaufen</a> ] [ <a target="_blank" href="#2#">Weitere Infos</a> ]', 'wpsg'),
+ 'http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/',
+ 'http://wpshopgermany.de/'
+ ); ?></p>
+
+ </div>
+
+ <?php } ?>
+
+<?php } ?>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/admin/musterwiderruf.pdf.phtml b/views/admin/musterwiderruf.pdf.phtml
new file mode 100644
index 0000000..a5815e2
--- /dev/null
+++ b/views/admin/musterwiderruf.pdf.phtml
@@ -0,0 +1,60 @@
+<?php
+
+ /**
+ * Template für die PDF Rechnung
+ */
+
+ require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
+ require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
+ require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
+
+ // Positionierung der Zieladress
+ $adress_left = 25;
+ $adress_top = 55;
+
+ // Positionierund des Textes
+ $tdata_left = 25;
+ $tdata_top = 90;
+
+ $pdf = new wpsg_fpdf();
+
+ $pdf->SetAutoPageBreak(true, 5);
+ $pdf->AddPage();
+
+ // Adresse des Kunden
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($adress_left, $adress_top, $this->get_option('wpsg_shopdata_name'));
+ $pdf->Text($adress_left, $adress_top + 5, $this->get_option('wpsg_shopdata_owner'));
+ $pdf->Text($adress_left, $adress_top + 10, $this->get_option('wpsg_shopdata_street'));
+ $pdf->Text($adress_left, $adress_top + 15, $this->get_option('wpsg_shopdata_zip').' '.$this->get_option('wpsg_shopdata_city'));
+
+ // Rechnungsdaten
+ $pdf->SetFont('Arial', 'B', 16);
+ $pdf->Text($tdata_left, $tdata_top, 'Widerruf');
+
+ // Text
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($tdata_left, $tdata_top + 10, __('Hiermit widerrufe(n) ich/wir (*) den von mir/uns (*) abgeschlossenen Vertrag über den Kauf', 'wpsg'));
+ $pdf->Text($tdata_left, $tdata_top + 15, __('der folgenden Waren (*)/die Erbringung der folgenden Dienstleistung.', 'wpsg'));
+
+ $pdf->Text($tdata_left, $tdata_top + 25, __('Artikelname', 'wpsg'));
+ $pdf->Text($tdata_left + 115, $tdata_top + 25, __('Bestellt am (*)/erhalten am (*)', 'wpsg'));
+
+ $pdf->Line($tdata_left, $tdata_top + 40, $tdata_left + 170, $tdata_top + 40);
+ $pdf->Line($tdata_left, $tdata_top + 50, $tdata_left + 170, $tdata_top + 50);
+ $pdf->Line($tdata_left, $tdata_top + 60, $tdata_left + 170, $tdata_top + 60);
+ $pdf->Line($tdata_left, $tdata_top + 70, $tdata_left + 170, $tdata_top + 70);
+ $pdf->Line($tdata_left, $tdata_top + 80, $tdata_left + 170, $tdata_top + 80);
+
+ $pdf->Text($tdata_left, $tdata_top + 100, __('Meine Anschrift', 'wpsg'));
+ $pdf->Text($tdata_left, $tdata_top + 110, __('Name', 'wpsg').':'); $pdf->Line($tdata_left + 30, $tdata_top + 110, $tdata_left + 100, $tdata_top + 110);
+ $pdf->Text($tdata_left, $tdata_top + 118, __('Straße', 'wpsg').':'); $pdf->Line($tdata_left + 30, $tdata_top + 118, $tdata_left + 100, $tdata_top + 118);
+ $pdf->Text($tdata_left, $tdata_top + 126, __('PLZ/Ort', 'wpsg').':'); $pdf->Line($tdata_left + 30, $tdata_top + 126, $tdata_left + 100, $tdata_top + 126);
+
+ $pdf->Line($tdata_left, $tdata_top + 152, $tdata_left + 100, $tdata_top + 152);
+ $pdf->SetFont('Arial', '', 6);
+ $pdf->Text($tdata_left, $tdata_top + 155, __('Datum, Unterschrift', 'wpsg').':');
+
+ $pdf->Output($this->view['filename'], 'F');
+
+?> \ No newline at end of file
diff --git a/views/admin/news.phtml b/views/admin/news.phtml
new file mode 100644
index 0000000..aceb183
--- /dev/null
+++ b/views/admin/news.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ /**
+ * Template für den Karteireiter "News" der Konfiguration
+ */
+
+?>
+
+<?php if (wpsg_isSizedArray($this->view['news'])) { ?>
+
+ <br />
+
+ <div class="wpsg_news_wrap">
+
+ <?php foreach ($this->view['news'] as $news) { ?>
+ <div class="wpsg_news <?php echo ((wpsg_news::isRead($news['id']))?'wpsg_news_read':''); ?>">
+
+ <h2><a target="_blank" onclick="setTimeout(function() { location.href = location.href; }, 1000); return true;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=news&read=<?php echo rawurlencode($news['id']); ?>&noheader=1"><?php echo wpsg_hspc(wpsg_formatTimestamp($news['date'], true).' - '.$news['title']); ?></a></h2>
+
+ <div class="markRead">
+ <?php echo __('gelesen', 'wpsg'); ?> <img src="<?php echo $this->getRessourceURL('gfx/tick.png'); ?>" title="<?php echo __('gelesen', 'wpsg'); ?>" alt="<?php echo __('gelesen', 'wpsg'); ?>" />
+ </div>
+ <div class="wpsg_news_content"><?php echo wpsg_news::prepareContent($news); ?></div>
+
+ </div>
+
+ <?php } ?>
+
+ </div>
+
+<?php } else { ?>
+
+ <p><?php echo __('Derzeit stehen keine News zum Lesen bereit.', 'wpsg'); ?>
+
+<?php } ?>
+
+<hr />
+
+<?php echo wpsg_translate(__('Letzte Aktualisierung: #1# [<a href="#2#">Aktualisieren</a>]', 'wpsg'),
+ ((wpsg_isSizedInt($this->get_option('wpsg_news_cache_refresh')))?wpsg_formatTimestamp(wpsg_timestamp($this->get_option('wpsg_news_cache_refresh'))):'n.A.'),
+ WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=news&reload=1&noheader=1'
+); ?> \ No newline at end of file
diff --git a/views/admin/path.phtml b/views/admin/path.phtml
new file mode 100644
index 0000000..315e7a2
--- /dev/null
+++ b/views/admin/path.phtml
@@ -0,0 +1,37 @@
+<?php
+
+ /**
+ * Template für die Einstellungen der Pfade im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=konfiguration&noheader=1'); ?>">
+
+ <h3><?php echo __('Pfadeinstellungen', 'wpsg'); ?></h3>
+
+ <p><?php echo __('Hier können die Pfade definiert werden, in denen der Shop seine Daten ablegt.', 'wpsg'); ?></p>
+
+ <?php echo wpsg_drawForm_Input('wpsg_path_upload_multiblog', __('Multiblog Upload Path (relativ zu wp-content)', 'wpsg'), $this->get_option('wpsg_path_upload_multiblog', true), array('hint' => __('Sollte den Platzhalter %blog_id% enthalten, dieser zeigt auf die ID des jeweiligen Blockes sonst kann es bei dem Betrieb von mehreren Shops zu Überschreibungen kommen.', 'wpsg'))); ?>
+
+ <input type="hidden" name="subaction" value="path" />
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/presentation.phtml b/views/admin/presentation.phtml
new file mode 100644
index 0000000..10958eb
--- /dev/null
+++ b/views/admin/presentation.phtml
@@ -0,0 +1,50 @@
+<?php
+
+ /**
+ * Template für die Darstellungsoptionen des Shops
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=presentation&noheader=1'); ?>">
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_showMwstAlways', __('MwSt. Spalte auch bei einem Satz zeigen', 'wpsg'), $this->get_option('wpsg_showMwstAlways')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_showArticelnumber', __('Artikelnummer im Produkttemplate anzeigen', 'wpsg'), $this->get_option('wpsg_showArticelnumber')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_form_validation', __('Formular Validierung', 'wpsg'), array(
+ '0' => __('Serverseitig', 'wpsg'),
+ '1' => __('Serverseitig + Javascript V1', 'wpsg'),
+ '2' => __('Serverseitig + Javascript V2', 'wpsg')
+ ), $this->get_option('wpsg_form_validation')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_hideBasketCountrySelect', __('Länderauswahl im Warenkorb verbergen', 'wpsg'), $this->get_option('wpsg_hideBasketCountrySelect')); ?>
+
+ <?php $this->callMods('admin_presentation'); ?>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+ </script>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file
diff --git a/views/admin/seiten.phtml b/views/admin/seiten.phtml
new file mode 100644
index 0000000..39e16ca
--- /dev/null
+++ b/views/admin/seiten.phtml
@@ -0,0 +1,41 @@
+<?php
+
+ /**
+ * Template für die verwaltung der Seiten im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+ <div class="wpsg_admin_box">
+
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <?php echo wpsg_drawForm_Select('wpsg_page_basket', __('Warenkorbseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_basket')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_versand', __('Versandkosten', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_versand')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_agb', __('AGB', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_agb')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_datenschutz', __('Datenschutz', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_datenschutz')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_widerrufsbelehrung', __('Widerrufsbelehrung', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_widerrufsbelehrung')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_page_onlinedisputeresolution', __('Online Streitbeilegung', 'wpsg'), $this->get_option('wpsg_page_onlinedisputeresolution')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_page_impressum', __('Impressum', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_page_impressum')); ?>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/admin/shopdata.phtml b/views/admin/shopdata.phtml
new file mode 100644
index 0000000..e2340c6
--- /dev/null
+++ b/views/admin/shopdata.phtml
@@ -0,0 +1,60 @@
+<?php
+
+ /**
+ * Template für die allgemeinen Shopdaten
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_name', __('Name des Shops / Firma', 'wpsg'), $this->get_option('wpsg_shopdata_name'), array('help' => 'wpsg_shopdata_name')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_owner', __('Inhaber des Shops', 'wpsg'), $this->get_option('wpsg_shopdata_owner'), array('help' => 'wpsg_shopdata_owner')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_tel', __('Telefonnummer', 'wpsg'), $this->get_option('wpsg_shopdata_tel'), array('help' => 'wpsg_shopdata_tel')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_fax', __('Faxnummer', 'wpsg'), $this->get_option('wpsg_shopdata_fax'), array('help' => 'wpsg_shopdata_fax')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_email'), array('help' => 'wpsg_shopdata_email')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_taxnr', __('Steuernummer', 'wpsg'), $this->get_option('wpsg_shopdata_taxnr'), array('help' => 'wpsg_shopdata_taxnr')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_ustidnr', __('USt-IdNr.', 'wpsg'), $this->get_option('wpsg_shopdata_ustidnr'), array('help' => 'wpsg_shopdata_ustidnr')); ?>
+
+ <h4><?php echo __('Anschrift', 'wpsg'); ?></h4>
+
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_street', __('Straße', 'wpsg'), $this->get_option('wpsg_shopdata_street'), array('help' => 'wpsg_shopdata_street')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_zip'), array('help' => 'wpsg_shopdata_zip')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_city'), array('help' => 'wpsg_shopdata_city')); ?>
+
+ <h4><?php echo __('Bankdaten', 'wpsg'); ?></h4>
+
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_name', __('Name der Bank', 'wpsg'), $this->get_option('wpsg_shopdata_bank_name'), array('help' => 'wpsg_shopdata_bank_name')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_owner', __('Kontoinhaber', 'wpsg'), $this->get_option('wpsg_shopdata_bank_owner'), array('help' => 'wpsg_shopdata_bank_owner')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_iban', __('IBAN Nummer', 'wpsg'), $this->get_option('wpsg_shopdata_bank_iban'), array('help' => 'wpsg_shopdata_bank_iban')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_bic', __('BIC Nummer', 'wpsg'), $this->get_option('wpsg_shopdata_bank_bic'), array('help' => 'wpsg_shopdata_bank_bic')); ?>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_form_help').tipTip();
+
+ } );
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/admin/ueber.phtml b/views/admin/ueber.phtml
new file mode 100644
index 0000000..f5cfc01
--- /dev/null
+++ b/views/admin/ueber.phtml
@@ -0,0 +1,72 @@
+<?php
+
+ /**
+ * Template für den Karteireiter "Über" der Konfiguration
+ */
+
+?>
+<h2><?php echo __('Systemcheck', 'wpsg'); ?></h2>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Template Pfad:', 'wpsg'); ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php echo WPSG_PATH_USERVIEW; ?>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <?php echo __('Sprachdatei:', 'wpsg'); ?>
+ </div>
+ <div class="wpsg_form_right">
+ <?php echo WPSG_PATH_TRANSLATION; ?>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
+
+<h2><?php echo __("über diese Installation", "wpsg"); ?></h2>
+
+<?php
+
+$arModule = array();
+foreach ($this->arModule as $m_key => $m)
+{
+
+ $arModule[] = $m_key.((isset($m->version))?' '.$m->version:'');
+
+}
+
+?>
+
+<?php echo wpsg_drawForm_Input('', __('wpShopGermany Version', 'wpsg'), WPSG_VERSION, array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('aktivierte wpShopGermany-Module', 'wpsg'), implode(', ', $arModule), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('WordPress Version', 'wpsg'), get_bloginfo('version'), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('PHP Version', 'wpsg'), phpversion(), array('text' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('php.ini Einstellungen', 'wpsg'), "post_max_size: ". ini_get('post_max_size') . "<br />". "max_input_time: ". ini_get('max_input_time') . "<br />". "max_execution_time: ". ini_get('max_execution_time') . "<br />". "max_input_vars: ". ini_get('max_input_vars') . "<br />". "upload_max_filesize: ". ini_get('upload_max_filesize') . "<br />". "register_globals: ". ini_get('register_globals') . "<br />". "memory_limit: ". ini_get('memory_limit') . "<br />". "safe_mode: ". ini_get('safe_mode') . "<br />". "include_path: ". ini_get('include_path') . "<br />". "soap.wsdl_cache: ". ini_get('soap.wsdl_cache') . "<br />", array('text' => true, 'nohspc' => true)); ?>
+<?php echo wpsg_drawForm_Input('', __('geladene PHP Erweiterungen', 'wpsg'), implode(', ', get_loaded_extensions()), array('text' => true)); ?>
+
+<div class="wpsg_form_field">
+ <div class="wpsg_form_left">
+ <label for=""><?php echo __('aktive Wordpress Plugins', 'wpsg'); ?>:</label>
+ </div>
+ <div class="wpsg_form_right">
+ <?php $arPlugins = $this->get_option('active_plugins'); ?>
+ <p>
+ <?php foreach ((array)$arPlugins as $plugin) { $plugin_data = get_plugin_data(WPSG_PATH_CONTENT.'plugins/'.$plugin); ?>
+ <?php echo $plugin_data['Name']; ?> / <?php echo $plugin_data['Version']; ?><br />
+ <?php } ?>
+ </p>
+ <br />
+ <p>
+ <?php if (wpsg_isSizedArray($this->get_option('wpsg_plugintest_active_plugins'))) { ?>
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=plugintest_restore&noheader=1'; ?>"><?php echo __('Vormals aktivierte Module wieder herstellen aus Kompatibilitätstest', 'wpsg'); ?></a>
+ <?php } else { ?>
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=plugintest_disable&noheader=1'; ?>"><?php echo __('Alle Plugins außer wpShopGermany deaktivieren (Kompatibilitätstest)', 'wpsg'); ?></a>
+ <?php } ?>
+ </p>
+ </div>
+ <div class="wpsg_clear"></div>
+</div>
diff --git a/views/admin/versandzonen.phtml b/views/admin/versandzonen.phtml
new file mode 100644
index 0000000..46dbc28
--- /dev/null
+++ b/views/admin/versandzonen.phtml
@@ -0,0 +1,130 @@
+<?php
+
+ /**
+ * Template für die Verwaltung der Versandzonen
+ */
+
+?>
+<script type="text/javascript">
+
+ /**
+ * Wird aufgerufen um einen neuen Satz hinzuzufügen und die Liste neu zu lasen.
+ */
+ function wpsg_addVZ()
+ {
+
+ jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=add&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_vz_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addVZ()
+
+ /**
+ * Wird aufgerufen wenn eine Versandzone gelöscht werden soll
+ */
+ function wpsg_removeVZ(vz_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Versandzone löschen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=remove&noheader=1',
+ data: {
+ vz_id: vz_id
+ },
+ success: function(data) {
+ jQuery('#wpsg_vz_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_removeVZ(vz_id)
+
+ function wpsg_editPLZ(vz_id)
+ {
+ jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:display');
+
+ return false;
+ }
+
+ function wpsg_savePLZ(vz_id)
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=save_plz&noheader=1',
+ data: {
+ vz_id: vz_id,
+ textarea: jQuery('#vz_' + vz_id + '_plz textarea').val()
+ },
+ success: function(data) {
+ jQuery('#vz_' + vz_id + '_plz').attr('style', 'display:none');
+ }
+ } );
+
+ return false;
+
+ }
+
+ function wpsg_loadStandard()
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie die Standard Versandzonen und Länder laden möchten? Die alten Versandzonen und Länder gehen verloren.', 'wpsg'); ?>')) return false;
+
+ jQuery('#wpsg_vz_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=loadStandard&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_vz_list').html(data);
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_loadStandard()
+
+</script>
+
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div class="wpsg_admin_content">
+
+ <div class="wpsg_admin_box">
+
+ <div class="head">
+ <div class="title">
+ <div class="fulltab">
+ <?php echo __('Versandzonen', 'wpsg'); ?>
+ <a title="<?php echo __('Neue Versandzone anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addVZ();"></a>
+ </div>
+ </div>
+ </div>
+ <div class="content">
+ <span id="wpsg_vz_list"><?php $this->view['adminController']->vz_listAction(); ?></span>
+ </div>
+
+ </div>
+</div> \ No newline at end of file
diff --git a/views/admin/versandzonen_list.phtml b/views/admin/versandzonen_list.phtml
new file mode 100644
index 0000000..5e15862
--- /dev/null
+++ b/views/admin/versandzonen_list.phtml
@@ -0,0 +1,89 @@
+<?php
+
+ /**
+ * Template für die Liste der Versandzonen
+ */
+
+?>
+<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
+<?php echo __('Bisher keine Versandzonen hinterlegt.', 'wpsg'); ?>
+<?php } else { ?>
+<table class="wpsg_admin_vz_list wpsg_admin_table">
+ <tr>
+ <th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
+ <th class="col_aktion"></th>
+ </tr>
+ <?php foreach ($this->view['data'] as $vz) { ?>
+ <tr>
+ <td class="wpsg_editable col_name">
+ <span id="vz_<?php echo $vz['id']; ?>_name" ><?php echo wpsg_hspc($vz['name']); ?></span>
+ <br />
+ <?php if (!empty($vz['param'])) { $arPLZ = unserialize($vz['param']); } ?>
+ <div id="vz_<?php echo $vz['id']; ?>_plz" style="display:none">
+ <textarea style="float:left; width:100%;"><?php echo wpsg_hspc($vz['param']); ?></textarea>
+ <input style="width:75px;" class="" type="submit" name="wpsg_mod_vz_submitsave" value="<?php echo __('Speichern', 'wpsg'); ?>" onclick="return wpsg_savePLZ(<?php echo $vz['id']; ?>);" />
+ </div>
+ </td>
+ <td class="col_innereu">
+ <input class="wpsg_innereu" <?php echo (($vz['innereu'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="innereu_<?php echo $vz['id']; ?>" id="innereu_<?php echo $vz['id']; ?>" />
+ </td>
+ <td class="col_aktion">
+
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Versandzone löschen', 'wpsg'); ?>" onclick="return wpsg_removeVZ(<?php echo $vz['id']; ?>);"></a>
+ <span><a class="wpsg_icon wpsg_icon_right wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);"></a></span>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#vz_<?php echo $vz['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ vz_id: '<?php echo $vz['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#vz_<?php echo $vz['id']; ?>_value').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'value',
+ vz_id: '<?php echo $vz['id']; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ /* ]]> */</script>
+ </td>
+ </tr>
+ <?php } ?>
+</table>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_innereu').bind('click', function() {
+
+ var checked = "0"; if (jQuery(this).prop("checked")) checked = "1";
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1',
+ data: {
+ field: 'innereu',
+ vz_id: jQuery(this).attr("id").substr(8),
+ value: checked
+ }
+ } );
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+
+<?php } ?> \ No newline at end of file
diff --git a/views/admin/widerrufsbelehrung.phtml b/views/admin/widerrufsbelehrung.phtml
new file mode 100644
index 0000000..8a184d6
--- /dev/null
+++ b/views/admin/widerrufsbelehrung.phtml
@@ -0,0 +1,73 @@
+<?php
+
+ /**
+ * Template für die Eingabe der Widerrufsbelehrung im Backend
+ */
+
+?>
+<div class="wpsg_admin_submenu">
+
+ <div class="head">
+ <div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>
+ <div style="clear:both;"></div>
+ </div>
+
+ <ul>
+ <?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
+ <li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+</div>
+
+<div style="padding:0px; margin:0px; float:left;">
+ <form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
+
+ <div class="wpsg_widerrufstext">
+
+ <?php echo wpsg_drawForm_Textarea('wpsg_ps_mailwiderruf', __('Widerrufsbelehrung', 'wpsg'), $this->get_option('wpsg_ps_mailwiderruf'), array(
+ 'hint' => 'nohspc_'.__('Dieser Text wird in die Mail eingebunden, die der Kunde als Bestellbestätigung erhält.', 'wpsg').'<br />'.__('Das Template für die Mail finden Sie unter: <b>views/mailtemplates/kundenmail.phtml</b> bzw. <b>views/mailtemplates/html/kundenmail.phtml</b>.', 'wpsg')
+ )); ?>
+
+ <?php echo wpsg_drawForm_Upload('wpsg_widerrufsformular', __('Widerrufsformular', 'wpsg')); ?>
+
+ <div class="wpsg_form_field">
+ <div class="wpsg_form_left">&nbsp;</div>
+ <div class="wpsg_form_right">
+
+ <?php if (wpsg_isSizedString($this->view['revocationform'])) { ?>
+
+ <a target="_blank" href="<?php echo WPSG_URL_UPLOADS.'wpsg_revocation/'.$this->get_option('wpsg_revocationform'); ?>"><?php echo $this->view['revocationform']; ?></a>
+ <a onclick="if (!confirm('<?php echo __('Sind Sie sich sicher, dass Sie das Widerrufsformular löschen möchten?', 'wpsg'); ?>')) return false;" style="float:right;" href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=widerrufsbelehrung&noheader=1&do=removeWiderrufsformular'; ?>"><?php echo __('Widerrufsformular löschen', 'wpsg'); ?></a>
+
+ <?php } else { ?>
+
+ <p><?php echo __('Bisher wurde kein Widerrufsformular hinterlegt.', 'wpsg'); ?></p>
+
+ <?php } ?>
+
+ <div style="clear:both;"><br />
+
+ <a href="<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=widerrufsbelehrung&noheader=1&do=generateWiderrufsformular'; ?>" class="button"><?php echo __('Standardformular aus Shopinfo erstellen', 'wpsg'); ?></a>
+ <br /><br />
+
+ </div>
+ <div class="wpsg_clear"></div>
+ </div>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_kundenmail', __('Anhang an Bestellbestätigung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_kundenmail')); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_invoice', __('Anhang an Rechnung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_invoice')); ?>
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_auftragsbestaetigung')) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_widerrufsformular_orderconfirm', __('Anhang an Auftragsbestätigung', 'wpsg'), $this->get_option('wpsg_widerrufsformular_orderconfirm')); ?>
+ <?php } ?>
+
+ </div>
+
+ <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+
+ </form>
+</div> \ No newline at end of file