Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7266)
+++ /controller/wpsg_ShopController.class.php	(revision 7267)
@@ -3585,4 +3585,16 @@
 			$this->callMods('replaceUniversalPlatzhalter', array(&$arReplace, $order_id, $kunden_id, $rechnung_id, $product_id, $product_index));
 
+			if (is_admin()) {
+				
+				$current_user = wp_get_current_user();
+				
+				$arReplace['/%user_username%/i'] = $current_user->user_login;
+				$arReplace['/%user_email%/i'] = $current_user->user_email;
+				$arReplace['/%user_firstname%/i'] = $current_user->user_firstname;				
+				$arReplace['/%user_lastname%/i'] = $current_user->user_lastname;
+				$arReplace['/%display_name%/i'] = $current_user->display_name; 
+				
+			}
+			
 			foreach ($arCustomReplace as $k => $v) { $arReplace[$k] = $v; }
 
Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 7266)
+++ /lib/wpsg_basket.class.php	(revision 7267)
@@ -1272,4 +1272,6 @@
 				
 				if (wpsg_isSizedInt($_SESSION['wpsg']['order_id'])) $arReturn['oOrder'] = wpsg_order::getInstance($_SESSION['wpsg']['order_id']);
+				
+				$land = 
 				
 				$land = $this->shop->db->fetchRow("SELECT * FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->arCheckout['land'])."'");
Index: /lib/wpsg_cache.class.php
===================================================================
--- /lib/wpsg_cache.class.php	(revision 7266)
+++ /lib/wpsg_cache.class.php	(revision 7267)
@@ -18,4 +18,5 @@
 		var $_arMwSt; // Array mit den MwSt. SÃ€tzen
 		var $_BasketArray; // Array mit dem Warenkorb der aktuellen Session als Array
+		var $_arCountry; // Array mit den DatensÃ€tzen aus der LÃ€ndertabelle
 		
 		var $_arMwStDB;
@@ -38,5 +39,30 @@
 			
 		} // public function __construct()
-				
+		
+		/**
+		 * Gibt einen LÃ€nderdatensatz aus der Datenbank zurÃŒck
+		 * Wenn als $country_id 0 ÃŒbergeben wird, werden alle LÃ€nder zurÃŒckgegeben
+		 * @param int $country_id
+		 */
+		public function getCountry($country_id = 0) {
+			
+			if (!array_key_exists($country_id, $this->_arCountry)) {
+				
+				if ($country_id === 0) {
+				
+					$this->_arCountry[$country_id] = $this->_db->fetchAssoc("SELECT * FROM `".WPSG_TBL_LAND."` ", "id");
+						
+				} else {
+					
+					$this->_arCountry[$country_id] = $this->_db->fetchAssoc("SELECT * FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($country_id)."' ", "id");
+					
+				}
+								
+			}
+			
+			return $this->_arCountry[$country_id];
+			
+		}
+		
 		/**
 		 * LÃ€dt die reinen Bestelldaten aus der Datenbank und gibt sie zurÃŒck
Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 7266)
+++ /model/wpsg_order.class.php	(revision 7267)
@@ -966,4 +966,15 @@
 		public function getNr() { return $this->onr; }
   
+		public function addLogEntry($title, $text) {
+			
+			$this->db->ImportQuery(WPSG_TBL_OL, [
+				"title" => $title,
+				"cdate" => "NOW()",
+				"o_id" => wpsg_q($this->id),
+				"mailtext" => wpsg_q($text)
+			]);
+			
+		}
+		
 		/**
 		 * Gibt die ID der Versandzone zurÃŒck, in die geliefert wird
Index: /mods/wpsg_mod_coverletter.class.php
===================================================================
--- /mods/wpsg_mod_coverletter.class.php	(revision 7266)
+++ /mods/wpsg_mod_coverletter.class.php	(revision 7267)
@@ -187,13 +187,33 @@
 			}
 			
+			$this->shop->update_option('wpsg_mod_coverletter_subject', ($_REQUEST['wpsg_mod_coverletter_subject']??'Anschreiben'));
+			$this->shop->update_option('wpsg_mod_coverletter_text',($_REQUEST['wpsg_mod_coverletter_text']??''));
 			$this->shop->update_option("wpsg_mod_coverletter_logo_position", $wpsg_mod_coverletter_logo_position?$wpsg_mod_coverletter_logo_position:null);
 			$this->shop->update_option("wpsg_mod_coverletter_logo_transparency", $_REQUEST['wpsg_mod_coverletter_logo_transparency']);
 
 		} // public function settings_save()
-		
+				
 		public function order_ajax() {
  
 			if (isset($_REQUEST['wpsg_mod_coverletter_preview'])) {
-
+				
+				$arCustomReplace = [];
+				
+				if ($_REQUEST['target'] === '2') {
+					
+					
+					
+					$arCustomReplace = [
+						'/%shopinfo_street%/i' => $this->shop->get_option('wpsg_shopdata_2_street'),
+						'/%shopinfo_zip%/i' => $this->shop->get_option('wpsg_shopdata_2_zip'),
+						'/%shopinfo_city%/i' => $this->shop->get_option('wpsg_shopdata_2_city'),
+						'/%shopinfo_country%/i' => $this->shop->get_option('wpsg_shopdata_2_country'),
+						'/%shopinfo_tel%/i' => $this->shop->get_option('wpsg_shopdata_2_tel'),
+						'/%shopinfo_fax%/i' => $this->shop->get_option('wpsg_shopdata_2_fax'),
+						'/%shopinfo_email%/i' => $this->shop->get_option('wpsg_shopdata_2_email')
+					];
+					
+				}
+								
 				// Vorschau eines Anschreibenes aus der Bestellverwaltung
 				$this->writeCoverLetter(
@@ -202,5 +222,6 @@
 					true,
 					__('Vorschau', 'wpsg'),
-					'coverletter-preview.pdf'
+					'coverletter-preview.pdf',
+					$arCustomReplace
 				);
 			
@@ -412,5 +433,5 @@
 			}
 			
-			$this->shop->view['title'] = __('Anschreiben', 'wpsg');
+			$this->shop->view['title'] = $this->shop->get_option('wpsg_mod_coverletter_subject');
 			$this->shop->view['clnr'] = $clnr;
 			
@@ -503,5 +524,5 @@
 				"street" => array("aktiv" => "1", "x" => "24", "y" => "16", "fontsize" => 8, "text" => "%shopinfo_street%", "color" => "#000000"),
 				"zipcity" => array("aktiv" => "1", "x" => "24", "y" => "19", "fontsize" => 8, "text" => "%shopinfo_zip% %shopinfo_city%", "color" => "#000000"),
-				"country" => array("aktiv" => "1", "x" => "24", "y" => "22", "fontsize" => 8, "text" => "DEUTSCHLAND", "color" => "#000000"),
+				"country" => array("aktiv" => "1", "x" => "24", "y" => "22", "fontsize" => 8, "text" => "%shopinfo_country%", "color" => "#000000"),
 				"tel" => array("aktiv" => "1", "x" => "75", "y" => "10", "fontsize" => 8, "text" => "Tel. %shopinfo_tel%", "color" => "#000000"),
 				"fax" => array("aktiv" => "1", "x" => "75", "y" => "13", "fontsize" => 8, "text" => "Fax. %shopinfo_fax%", "color" => "#000000"),
Index: /mods/wpsg_mod_kundenkontakt.class.php
===================================================================
--- /mods/wpsg_mod_kundenkontakt.class.php	(revision 7266)
+++ /mods/wpsg_mod_kundenkontakt.class.php	(revision 7267)
@@ -7,4 +7,5 @@
 		var $id = 1000;
 		var $hilfeURL = 'http://wpshopgermany.de/?p=3886';
+		static $arSMSStatus = [];
 		
 		/**
@@ -22,4 +23,64 @@
 		} // public function __construct()
 		
+		public function install()
+		{
+			
+			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
+			 			
+			/**
+			 * LÃ€ndertabelle erweitern
+			 */
+			$sql = "CREATE TABLE ".WPSG_TBL_LAND." (
+			  	telprefix TEXT NOT NULL COMMENT 'Vorwahlen, kommagetrennt fÃŒr SMS Versand Kundenkontakt'
+			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
+			
+			dbDelta($sql);
+			
+		}
+		
+		public function init() {
+			
+			self::$arSMSStatus = [
+				'100' => __('SMS erfolgreich an das Gateway ÃŒbertragen.', 'wpsg'),
+				'101' => __('SMS wurde zugestellt.', 'wpsg'),
+				'102' => __('SMS wurde noch nicht zugestellt.', 'wpsg'),
+				'103' => __('SMS konnte vermutlich nicht zugestellt werden (Rufnummer falsch, SIM nicht aktiv).', 'wpsg'),
+				'104' => __('SMS konnte nach Ablauf von 48 Stunden noch immer nicht zugestellt werden.', 'wpsg'),
+				'109' => __('SMS ID abgelaufen oder ungÃŒltig (manuelle Status-Abfrage).', 'wpsg'),
+				'110' => __('Falscher Schnittstellen-Key oder Ihr Account ist gesperrt.', 'wpsg'),
+				'120' => __('Guthaben reicht nicht aus.', 'wpsg'),
+				'130' => __('Falsche DatenÃŒbergabe (z.B. Absender fehlt).', 'wpsg'),
+				'131' => __('EmpfÃ€nger nicht korrekt.', 'wpsg'),
+				'132' => __('Absender nicht korrekt.', 'wpsg'),
+				'133' => __('Nachrichtentext nicht korrekt.', 'wpsg'),
+				'140' => __('Falscher AppKey oder Ihr Account ist gesperrt.', 'wpsg'),
+				'150' => __('Sie haben versucht an eine internationale Handynummer eines Gateways, das ausschlieÃlich fÃŒr den Versand nach Deutschland bestimmt ist, zu senden.', 'wpsg'),
+				'170' => __('Parameter âtime=â ist nicht korrekt. Bitte im Format: TT.MM.JJJJ-SS:MM oder Parameter entfernen fÃŒr sofortigen Versand.', 'wpsg'),
+				'171' => __('Parameter âtime=â ist zu weit in der Zukunft terminiert (max. 360 Tage).', 'wpsg'),
+				'231' => __('Keine smsflatrate.net Gruppe vorhanden oder nicht korrekt.', 'wpsg'),
+				'404' => __('Unbekannter Fehler. Bitte dringend Support (ticket@smsflatrate.net) kontaktieren.', 'wpsg'),
+			];
+			
+		} // public function init()
+		
+		public function settings_edit() {
+			 			
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_kundenkontakt/settings_edit.phtml');
+			
+		} // public function settings_edit()
+		
+		public function settings_save() {
+			
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_active', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['active']);
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_url', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['url']);
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_key', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['key']);
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_from', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['from']);
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_type', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['type']);
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_status', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['status']);
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_reply', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['reply']);
+			$this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_replytomail', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['replytomail']);
+						
+		}
+		
 		/**
 		 * zeigt das Formular zum Senden in der Bestellverwaltung
@@ -48,5 +109,13 @@
 				
 			}
-
+			
+			$oOrder = wpsg_order::getInstance($order_id);
+			
+			$phone = $oOrder->getCustomer()->getPhone();
+			$phone = preg_replace('/^\+/', '00',$phone);
+			
+			$this->shop->view['valid'] = $this->isValidPhoneNumber($phone);
+			$this->shop->view['phone'] = $phone;
+			
 			$arSidebarArray[$this->id] = array(
 				'title' => $this->name,
@@ -59,15 +128,70 @@
 		{
 			
-			if ($_REQUEST['do'] == 'kk_switchTemplate')
-			{
+			$_REQUEST['do'] = $_REQUEST['do']??'';
+			
+			if ($_REQUEST['do'] === 'kk_switchTemplate') {
 				
 				$this->switchTemplate();
 				
-			}
-
-			if ($_REQUEST['do'] == 'kk_sendMail')
-			{
+			} else if ($_REQUEST['do'] === 'kk_sendMail') {
 				
 				$this->send();
+				
+			} else if ($_REQUEST['do'] === 'validateNumber') {
+							
+				$valid = $this->isValidPhoneNumber($_REQUEST['phone']);
+				
+				$strHTML = '';
+				
+				if ($valid) {
+					
+					$strHTML .= '<div class="alert alert-success">';
+					$strHTML .= wpsg_translate(__('Die Telefonnummer #1# ist gÃŒltig.', 'wpsg'), $_REQUEST['phone']);
+					$strHTML .= '</div>';
+						
+				} else {
+					
+					$strHTML .= '<div class="alert alert-danger">';
+					$strHTML .= wpsg_translate(__('Die Telefonnummer #1# ist nicht gÃŒltig.', 'wpsg'), $_REQUEST['phone']);
+					$strHTML .= '</div>';
+					
+				}
+				
+				wpsg_header::JSONData([
+					'valid' => $valid,
+					'text' => $strHTML
+				]);
+				
+				exit;
+				
+			} else if ($_REQUEST['do'] == 'sms_submit') {
+				
+				$_REQUEST['edit_id'] = intval($_REQUEST['edit_id']);
+				
+				\check_admin_referer('wpsg_mod_kundenkontakt_sms_form_'.$_REQUEST['edit_id']);
+				
+				$r = $this->sendSMS($_REQUEST['phone'], $_REQUEST['text']);
+				
+				if (!in_array($r[0], ['100', '101'])) {
+					
+					$this->shop->addBackendError($r[1]);
+					
+				} else {
+					
+					$this->shop->addBackendMessage($r[1]);
+					
+				}
+				
+				$oOrder = wpsg_order::getInstance($_REQUEST['edit_id']);
+				
+				$log_title = wpsg_translate(__('SMS: #1# / #2#', 'wpsg'), $_REQUEST['phone'], $r[1]);
+				$log_text  = "EmpfÃ€nger  : ".$_REQUEST['phone']."\r\n";
+				$log_text .= "API Return : ".$r[0].': '.$r[1]."\r\n";
+				$log_text .= "RAW        : ".$r[2];
+				
+				$oOrder->addLogEntry($log_title, $log_text);
+				
+				$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$_REQUEST['edit_id']);
+				exit;
 				
 			}
@@ -92,5 +216,84 @@
 		} // public function admin_emailconf_save()
 		
+		public function laender_edit() {
+						
+			echo wpsg_drawForm_Textarea('country[telprefix]', __('MÃ¶gliche Vorwahlen fÃŒr SMS Versand. (kommagetrennt)', 'wpsg'),($this->shop->view['land']['telprefix']??''), ['help' => 'country_telprefix']);
+			
+		}
+		
 		/* Modulfunktionen */
+		 
+		private function isValidPhoneNumber($phone) {
+			
+			$arLaender = $this->shop->cache->getCountry();
+			$arPrefix = [];
+			
+			foreach ($arLaender as $l_db) {
+				
+				$arPrefix = array_merge($arPrefix, explode(',', $l_db['telprefix']));
+				
+			}
+			
+			$arPrefix = array_unique($arPrefix);
+			$arPrefix = wpsg_trim($arPrefix);
+			
+			foreach ($arPrefix as $p) {
+				
+				if (substr($phone, 0, strlen($p)) === $p) return true;
+				
+			}
+			
+			return false;
+			
+		}
+		
+		/**
+		 * Gibt true zurÃŒck, wenn das SMS Versandmodul aktiv ist und komplett konfiguriert
+		 */
+		private function isPossibleSMSSend($tel = false) {
+			
+			if ($this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_active') !== '1') return false;
+			
+			if ($tel !== false) {
+				
+				return $this->isValidPhoneNumber($tel);
+				
+			}
+			
+			return true;
+			
+		}
+						
+		public function sendSMS($to, $text) {
+			
+			if (!$this->isPossibleSMSSend()) throw new \wpsg\Exception(__('SMS Versand nicht aktiviert.', 'wspg'));
+						
+			$arFields = [
+				'key' => $this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_key'),
+				'from' => $this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_from'),
+				'to' => $to,
+				'text' => $text,
+				'type' => $this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_type'),
+				'status' => $this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_status'),
+				'reply' => $this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_reply'),
+				'replytomail' => $this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_replytomail')
+			];
+			
+			$ch = curl_init();       
+			
+			curl_setopt($ch,CURLOPT_URL,$this->shop->get_option('wpsg_mod_kundenkontakt_smsflatrate_url'));
+			curl_setopt($ch, CURLOPT_POST, 1);
+			curl_setopt($ch,CURLOPT_POSTFIELDS, $arFields);
+			curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
+			
+			$result = curl_exec($ch);
+			
+			curl_close($ch);
+			
+			$send_sms_return = substr($result, 0, 3); 
+						
+			return array($send_sms_return, (self::$arSMSStatus[$send_sms_return]??__('Unbekannte API Antwort', 'wpsg')), $result);
+			
+		}
 		
 		/**
@@ -202,4 +405,2 @@
 	
 	} // class wpsg_mod_kundenkontakt extends wpsg_mod_basic 
-	
-?>
Index: /views/mods/mod_coverletter/order_view.phtml
===================================================================
--- /views/mods/mod_coverletter/order_view.phtml	(revision 7266)
+++ /views/mods/mod_coverletter/order_view.phtml	(revision 7267)
@@ -22,5 +22,5 @@
 				</span>
 				<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_coverletter&noheader=1&action=ajax&order_id=<?php echo $a['order_id']; ?>&cl_id=<?php echo $a['id']; ?>&wpsg_mod_coverletter_get" target="_new">
-					<?php echo __('Download', 'wpsg'); ?>
+					<?php echo __('Ansehen', 'wpsg'); ?>
 				</a>
 			</div>
@@ -54,5 +54,5 @@
 				<?php } ?>
 
-				<?php echo wpsg_drawForm_Textarea('text', __('Text', 'wpsg'),'', ['noLabel' => true, 'fullLabel' => __('Text fÃŒr das Anschreiben', 'wpsg'), 'style' => 'height:200px']); ?>
+				<?php echo wpsg_drawForm_Textarea('text', __('Text', 'wpsg'),$this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_coverletter_text'), $this->view['data']['id']), ['noLabel' => true, 'fullLabel' => __('Text fÃŒr das Anschreiben', 'wpsg'), 'style' => 'height:200px']); ?>
 				
 				<br />
Index: /views/mods/mod_coverletter/settings_edit.phtml
===================================================================
--- /views/mods/mod_coverletter/settings_edit.phtml	(revision 7266)
+++ /views/mods/mod_coverletter/settings_edit.phtml	(revision 7267)
@@ -31,6 +31,9 @@
 			</div>
 			<?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_coverletter_bp')); ?>
-
-			<hr>
+			
+			<hr />
+			
+			<?php echo wpsg_drawForm_Input('wpsg_mod_coverletter_subject', __('Titel', 'wpsg'),$this->get_option('wpsg_mod_coverletter_subject'), ['help' => 'wpsg_mod_coverletter_subject']); ?>
+			<?php echo wpsg_drawForm_Textarea('wpsg_mod_coverletter_text', __('Textvorgabe', 'wpsg'), $this->get_option('wpsg_mod_coverletter_text'), ['help' => 'wpsg_mod_coverletter_text']); ?>
 			
 			<?php echo wpsg_drawForm_TextStart(); ?>
@@ -188,5 +191,5 @@
 	{
 
-		var url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_coverletter&do=orderAjax&noheader=1&wpsg_coverletter_preview=1";
+		var url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_coverletter&do=orderAjax&noheader=1&wpsg_mod_coverletter_preview=1";
 
 		window.open(url, '_blank');
Index: /views/mods/mod_kundenkontakt/order_view.phtml
===================================================================
--- /views/mods/mod_kundenkontakt/order_view.phtml	(revision 7266)
+++ /views/mods/mod_kundenkontakt/order_view.phtml	(revision 7267)
@@ -170,7 +170,85 @@
 				
 			</form>
-			
+						
 		</div>
 	</div>
 
 <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('SMS Versand', 'wpsg'));?>
+
+	<div class="inside">
+		<div style="padding:5px;">
+	
+			<form id="sms_form" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&edit_id=<?php echo $this->view['data']['id']; ?>&do=sms_submit&noheader=1">
+	
+				<input type="hidden" name="_wpnonce" value="<?php echo \wp_create_nonce('wpsg_mod_kundenkontakt_sms_form_'.$this->view['data']['id']); ?>" />
+				
+				<p>Mit diesem Formular kann eine SMS an den Kunden versendet werden.</p>
+									
+				<br />
+			
+				<div id="numbercheck">
+					<?php if ($this->view['valid'] === true) { ?>
+					
+						<div class="alert alert-success">
+							<?php echo wpsg_translate(__('Die Telefonnummer #1# ist gÃŒltig.', 'wpsg'), $this->view['phone']); ?>
+						</div>
+						
+					<?php } else { ?>
+	
+						<div class="alert alert-danger">
+							<?php echo wpsg_translate(__('Die Telefonnummer #1# ist nicht gÃŒltig.', 'wpsg'), $this->view['phone']); ?>
+						</div>
+					
+					<?php } ?>
+				</div>			
+
+				<br />
+				
+				<?php echo wpsg_drawForm_Input('phone', __('EmpfÃ€nger', 'wpsg'), $this->view['phone']); ?>
+				
+				<br />
+	
+				<textarea id="text" name="text" <?php echo (($this->view['valid'] === true)?'':'disabled="disabled"'); ?> style="width:100%; height:100px;"></textarea>
+	
+				<input type="submit" id="sms_submit" <?php echo (($this->view['valid'] === true)?'':'disabled="disabled"'); ?> value="<?php echo __('SMS Senden', 'wpsg'); ?>" class="button" style="float:right; margin-top:15px;" />
+	
+				<script>
+					
+					jQuery('#phone').on('input', function() {
+
+						jQuery('#numbercheck').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+						
+						jQuery('#text').prop('disabled', true);
+						jQuery('#sms_submit').prop('disabled', true);
+						
+						jQuery.ajax( {
+							url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_kundenkontakt&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>&do=validateNumber',
+							data: {
+								'phone': jQuery('#phone').val()
+							},
+							success: function(data) {
+
+								if (data.valid) {
+								
+									jQuery('#text').prop('disabled', false);
+									jQuery('#sms_submit').prop('disabled', false);
+									
+								}
+
+								jQuery('#numbercheck').html(data.text);
+								
+							}
+						} );
+						
+					} );
+					
+				</script>
+				
+			</form>		
+		
+		</div>
+	</div>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: /views/mods/mod_kundenkontakt/settings_edit.phtml
===================================================================
--- /views/mods/mod_kundenkontakt/settings_edit.phtml	(revision 7267)
+++ /views/mods/mod_kundenkontakt/settings_edit.phtml	(revision 7267)
@@ -0,0 +1,41 @@
+<?php
+	
+	/**
+	 * Einstellungen fÃŒr das Kundenkontaktmodul
+	 */
+	
+	namespace wpsg;
+	
+?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenkontakt[smsflatrate][active]', __('SMS Flatrate Dienst nutzen', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_active'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_active']); ?>
+     
+<div id="smsflatrate_layer" style="display:<?php echo (($this->get_option('wpsg_mod_kundenkontakt_smsflatrate_active') === '1')?'block':'none'); ?>;">
+	
+	<?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt[smsflatrate][url]',__('URL Endpunkt', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_url'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_url']); ?>
+	<?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt[smsflatrate][key]',__('SchlÃŒssel', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_key'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_key']); ?>
+	<?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt[smsflatrate][from]',__('Absender', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_from'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_from']); ?>
+	<?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt[smsflatrate][type]',__('Feld d / "type"', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_type'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_type']); ?>
+	<?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt[smsflatrate][status]',__('Feld e / "status"', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_status'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_status']); ?>
+	<?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt[smsflatrate][reply]',__('Feld f / "reply"', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_reply'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_reply']); ?>
+	<?php echo wpsg_drawForm_Input('wpsg_mod_kundenkontakt[smsflatrate][replytomail]',__('Feld g / "replytomail"', 'wpsg'), $this->get_option('wpsg_mod_kundenkontakt_smsflatrate_replytomail'), ['help' => 'wpsg_mod_kundenkontakt_smsflatrate_replytomail']); ?>
+	
+</div>
+
+<script>
+	
+	jQuery('#wpsg_mod_kundenkontaktsmsflatrateactive').on('click', function() {
+		
+		if (jQuery(this).prop('checked')) {
+			
+			jQuery('#smsflatrate_layer').show();
+			
+		} else {
+
+			jQuery('#smsflatrate_layer').hide();
+			
+		}
+		
+	} );
+	
+</script>
