From d6d321a1f32b4b77cd9fb5c9152d73285d943c02 Mon Sep 17 00:00:00 2001
From: isaack <drericlaufer@gmx.de>
Date: Sun, 6 Dec 2020 02:30:49 +0100
Subject: [PATCH] =?UTF-8?q?Planung=20gro=C3=9Fes=20kommende=20Update=20der?=
 =?UTF-8?q?=20Websiteeinstellungen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In diesem Update ist folgendes Passiert:

- Erweiterung der cousom.js DataTables können jetzt mit id="DataTable"
erreicht werden
- Bilanzsystem durch Tabelle und Detailseite ersetz
- User Loginseite jetzt Responsiv
- Startseitenvergütung kann geloggt und angezeigt werden
- Multikontenübersicht dazu gekommen
- User können sich Währung und zweite Währung senden
- Es kann eingestellt werden, ob neue User per Aktivierungslink oder
manuelle freischaltung aktiviert werden
- Grundeinstellungen neu sortiert und Design Überarbeitet
- Zweite Währung dazu gekommen (deaktivierbar)
- kontobuchung.class.php angepasst, diese Unterscheidet die Währungen
- Grundeinstellungstexte alle in die lang.de.php eingetragen
---
 .../lib/class/grundeinstellung.class.php      |   2 +-
 adminforce/lib/class/start.class.php          |  31 ++++
 adminforce/lib/lang/lang.de.php               |  87 +++++++++++
 adminforce/page/bilanzsystem.php              | 109 +++++---------
 .../config_include/admin_pw.php               |   2 +-
 .../interfacedaten/config_include/betteln.php |  58 +++----
 .../interfacedaten/config_include/nutzer.php  |  33 ++--
 .../config_include/sitesetting.php            | 141 ++++++++++--------
 .../interfacedaten/config_include/smtp.php    |  59 ++++----
 .../config_include/startseite.php             |  29 ++++
 .../config_include/waehrung.php               |  72 ++++-----
 .../page/interfacedaten/multi_konten.php      |  46 ++++++
 adminforce/page/interfacedaten/pageconfig.php |  12 +-
 adminforce/page/interfacedaten/start.php      |  19 +++
 index.php                                     |   8 +-
 install/mysql.txt                             |  12 +-
 js/custom.js                                  |  25 ++++
 lib/class/anmelden.class.php                  |  12 +-
 lib/class/kontobuchung.class.php              | 133 +++++++++++++----
 lib/class/start.class.php                     |  10 ++
 lib/funktionen/konto/ueberweisen.php          |  34 +----
 lib/lang/lang.de.php                          |  11 ++
 page/intern/anmelden.php                      |  21 ++-
 page/konto/ueberweisen.php                    |   6 +-
 24 files changed, 629 insertions(+), 343 deletions(-)
 create mode 100644 adminforce/lib/class/start.class.php
 create mode 100644 adminforce/page/interfacedaten/config_include/startseite.php
 create mode 100644 adminforce/page/interfacedaten/multi_konten.php
 create mode 100644 adminforce/page/interfacedaten/start.php

diff --git a/adminforce/lib/class/grundeinstellung.class.php b/adminforce/lib/class/grundeinstellung.class.php
index f2e2463..655d6e9 100644
--- a/adminforce/lib/class/grundeinstellung.class.php
+++ b/adminforce/lib/class/grundeinstellung.class.php
@@ -30,7 +30,7 @@ class grundeinstellung{
 	
 	private function make_array($post){
 		foreach($post AS $key => $value){
-			if($key != '' && $key != 'run'){
+			if($key != '' && $key != 'run'&& $value != ''){
 				if($key == 'wartung'){if($key == 'wartung'){$value = 1;}else{$value = 0;}}
 				if($key == 'anzeige_chat'){if($key == 'anzeige_chat'){ $value = 1;}else{ $value = 0;}}
 				if($key == 'anzeige_text'){if($key == 'anzeige_text'){ $value = 1;}else{ $value = 0;}}
diff --git a/adminforce/lib/class/start.class.php b/adminforce/lib/class/start.class.php
new file mode 100644
index 0000000..6085384
--- /dev/null
+++ b/adminforce/lib/class/start.class.php
@@ -0,0 +1,31 @@
+<?php
+
+class start{
+	private $db;
+	private $error = 0;
+	private $meldung;
+	private $gconfig;
+	
+	public function __construct(){
+		global $datenbank,$grundconfig;
+		$this->db = $datenbank;
+		$this->gconfig = $grundconfig;
+	}
+	
+	public function Liste(){
+		$aus = '';
+		foreach($this->db->get_results("SELECT uid,datum,betrag FROM ". PREFIX . START_LOG ." ") AS $res){
+			$aus .= '
+				<tr>
+					<td>'. $res->uid .'</td>
+					<td>'. date("d.m.Y H:i",$res->datum) .'</td>
+					<td>'. number_format($res->betrag) .' </td>
+				</tr>
+			';
+		}
+		
+		return $aus;
+	}
+}
+
+?>
\ No newline at end of file
diff --git a/adminforce/lib/lang/lang.de.php b/adminforce/lib/lang/lang.de.php
index 060fcc0..5ea83b6 100644
--- a/adminforce/lib/lang/lang.de.php
+++ b/adminforce/lib/lang/lang.de.php
@@ -11,6 +11,85 @@
 	define("TEXT_SAVE_TRUE","Der Text wurde erfolgreich gespeichert.<br>");
 	define("TEXT_SAVE_FALSE","Der Text konnte nicht gespeichert werden.<br>");
 	define("TEXTE_SAVE_TRUE","Der Text wurde erfolgreich gespeichert.<br>");
+	define("GLOBALSETTING", array(
+			"SETTING" => array(
+				"GRUND" => array(
+					"EMAIL" => 'Betreiber E-Mail Adresse',
+					"EMAILN" => 'Diese E-Mail Adresse steht als Absender da.',
+					"CRON_PW" => 'Cronjob Passwort',
+					"CRON_PWN" => 'Mit dem Passwort identifizieren sich die Cronjobs.',
+					"WARTUNG" => 'Wartungsmodus',
+					"WARTUNGN" => 'Soll der Wartungsmodus aktiviert werden?',
+					"DOMAIN" => 'Domain deiner Seite',
+					"DOMAINN" => 'Hier ist die Domain einzutragen, wo deine Seite zu erreichen ist.',
+					"SEITN" => 'Seitenname',
+					"SEITNN" => 'Hier bitte den Seitenname eintragen.',
+					"DSTART" => 'Seitenstart',
+					"DSTARTN" => 'Wann ist deine Seite gestartet?',
+					"USTART" => 'Startseite Userbereich',
+					"USTARTN" => 'Hier kann ausgew&auml;hlt werden, was eingeloggte User auf der Startseite sehen k&ouml;nnen.',
+					"NEWSK" => 'News kommentieren',
+					"NEWSKN" => 'Sollen die User die News kommentieren k&ouml;nnen?',
+					"BUCHL" => 'Buchungen l&ouml;schen',
+					"BUCHLN" => 'Sollen Buchungen ab einem gewissen alter automatisch gel&ouml;scht werden?',
+					"IPLAND" => 'Erlaubte IP L&auml;nder',
+					"IPLANDN" => 'Länder werden per IP abgefragt und bei nicht entsprechen geblockt Internationale Abkürzungen eintragen (DE,AT,CH) und mit , trennen Freilassen, wenn deaktiviert sein soll',
+					"DENIEDE" => 'Gesperrte E-Mail Anbieter',
+					"DENIEDEN" => 'Bestimmte E-Mail Anbieter von der Registrierung ausschlie&szlig;en'
+				),
+				"GRUNDW" => array(
+					"GRUND" => 'Grundw&auml;hrung',
+					"NAME" => 'Name der Grundw&auml;hrung',
+					"NOTICE" => 'Wie soll deine Hauptw&auml;hrung heisen?'
+				),
+				"GRUNDZ" => array(
+					"GRUND" => 'Zweite W&auml;hrung',
+					"AKTIV" => 'Zweite W&auml;hrung aktiv?',
+					"NAME" => 'Name der zweiten W&auml;hrung',
+					"NOTICE" => 'Wie soll deine zweite W&auml;hrung heisen?',
+					"STATUS" => 'Status'
+				),
+				"STARTV" => array(
+					"VERDI" => 'Verdienst Startseitenaufruf',
+					"VERDIN" => 'Wie hoch soll die Gutschrift sein?',
+					"RELOAD" => 'Reloadzeit',
+					"RELOADN" => 'Reloadzeit bis zum neuen Aufruf in Sekunden',
+					"LOG" => 'Loggen der Startseitenveraufrufe',
+					"POP" => 'Verg&uuml;tung in PopUp',
+					"POPN" => 'Soll die Startseitenverg&uuml;tung im PopUp geschehen?'
+				),
+				"BETTEL" => array(
+					"MIN" => 'Mindestbettelgewinn',
+					"MINN" => 'Was sollen die User mindestens bei einem Bettelaufruf erhalten?',
+					"MAX" => 'Maximaler Bettelgewinn',
+					"MAXN" => 'Was sollen die User maximal bei eibem Bettelaufruf erhalten?',
+					"DIREKT" => 'Direktaufrug von Bettellink',
+					"DIREKTN" => 'Direktaufruf ohne Refferer verg&uuml;ten?',
+					"INFO" => 'Infotext f&uuml;r User',
+					"RELOAD" => 'Reloadzeit f&uuml;r Bettelaufruf',
+					"RELOADN" => 'Wie lang ist ein Angebettelter f&uuml;r den neuen Bettelaufruf gesperrt?'
+				),
+				"SMTP" => array(
+					"HOST" => 'Host',
+					"HOSTN" => 'Hostname des Mailservers (in der Regel "localhost")',
+					"PORT" => 'Port des Mailservers',
+					"PORTN" => 'Port unter dem der Mailserver ereichbar ist (Achtung, Verbindungstyp ausschlaggebend)',
+					"VERBI" => 'Verbidung',
+					"VERBIN" => 'Hier muss zwischen SSL und TLS ausgew&auml;hlt werden.',
+					"NICK" => 'Nutzername',
+					"NICKN" => 'Nutzername mit dem sich das Script anmelden kann',
+					"PASS" => 'Passwort',
+					"PASSN" => 'Passwort zum Nutzername zur Anmeldung<br><b><u>Nur eintragen, wenn es sich &auml;ndert</u></b>'
+				),
+				"NUTZER" => array(
+					"REGFREE" => 'Automatische Freischaltung',
+					"REGFREEN" => 'Sollen die User sich per Aktivierungslink selber aktivieren oder soll erst ein Admin dies Pr&uuml;fen?',
+					"SELF" => 'Selbstaktivierung',
+					"ADMIN" => 'Pr&uuml;fung durch Admin'
+				)
+			)
+		)
+	);
 
 //Betreiberdaten
 	define("POST_PRUEF_BETREIBERDATEN_BID_FALSE","Bitte eine g&uuml;ltige Betreiber ID eingeben.<br>");
@@ -134,4 +213,12 @@
 			)
 		)		
 	);
+	
+	define("MULTIT",array(
+		"DEL" => array(
+			"TRUE" => 'Die Multikonten wurden erfolgreich gel&ouml;scht.',
+			"FALSE" => 'Die Multikonten konnten nicht gel&ouml;scht werden.'
+			)
+		)
+	);
 ?>
diff --git a/adminforce/page/bilanzsystem.php b/adminforce/page/bilanzsystem.php
index 0609ee0..e6525d2 100644
--- a/adminforce/page/bilanzsystem.php
+++ b/adminforce/page/bilanzsystem.php
@@ -1,75 +1,40 @@
 <?php
-	$aus = '';
-	foreach($datenbank->get_results("SELECT datum FROM ". PREFIX . BILANZ ." GROUP BY datum ORDER BY datum ASC ") AS $d){
-		
-		$tag = '';
-		$saldo_tag = 0;
-		foreach($datenbank->get_results("SELECT gruppe FROM ". PREFIX . BILANZ ." WHERE datum = '". $d->datum ."' GROUP BY gruppe") AS $g){
-			$gruppe = '
-				<div class="panel panel-default">
-					<div class="panel-heading">
-						<h3 class="panel-title">'. $g->gruppe .'</h3>
-					</div>
-					<div class="panel-body">
-						<table class="table table-hover">
-							<tr>
-								<th>Typ</th>
-								<th>Einnahmen</th>
-								<th>Ausgaben</th>
-							</tr>
-			';
-			$saldo = 0;
-			foreach($datenbank->get_results("SELECT * FROM ". PREFIX . BILANZ ." WHERE gruppe = '". $g->gruppe ."' AND datum = '". $d->datum ."' ") AS $b){
-				$saldo_plus = 0;
-				$saldo_minus = 0;
-				if($b->ein < $b->aus){
-					$class = 'alert alert-danger';
-					$saldo_plus += $b->ein;
-					$saldo_minus += $b->aus;
-				}else{
-					$class = 'alert alert-success';
-					$saldo_plus += $b->ein;
-					$saldo_minus += $b->aus;
-				}
-				$saldo = $saldo_tag+$b->ein-$b->aus;
-				$saldo_tag = $saldo_tag+$b->ein-$b->aus;
-				
-				$gruppe .= '
-							<tr class="'. $class .'">
-								<td>'. $b->name .'</td>
-								<td>'. $b->ein .'</td>
-								<td>'. $b->aus .'</td>
-							</tr>
-				';
-			}
-			$gruppe .= '
-						</table>
-						Gewinn/Verlust: '. number_format($saldo,0,',','.') .'
-					</div>
-				</div>
-			';
-			$tag .= $gruppe;
-		}
-		$tag .= 'Tagessaldo:'. number_format($saldo_tag,0,',','.');
-		if($saldo_tag >= 0){ $farbe_tag = 'alert alert-success';}else{ $farbe_tag = 'alert alert-danger';}
-		$aus .= '
-			<div class="panel-group '. $farbe_tag .'" id="accordion" role="tablist" aria-multiselectable="true">
-				<div class="panel panel-default">
-					<div class="panel-heading" role="tab" id="'. $d->datum .'">
-						<h4 class="panel-title">
-							<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse'. $d->datum .'" aria-expanded="false" aria-controls"collapse'. $d->datum .'">
-								'. date("d.m.Y", $d->datum) .' || Tagessaldo: '. number_format($saldo_tag,0,',','.').'
-							</a>
-						</h4>
-					</div>
-					<div id="collapse'. $d->datum .'" class="panel-collapse collapse" role="tabpanel" aria-labelledby="'. $d->datum .'">
-						<div class="panel-body">';
-		$aus .= $tag.'	
-						</div>
-					</div>
-				</div>
-			</div>
-		';
+
+$Class = Classloader('bilanz',true);
+
+head("Bilanzsystem");
+	if(!isset($_GET['TID'])){
+		echo $Class->ShowTable();
+	}else{
+		echo $Class->ShowDate($_GET['TID']);
 	}
-	echo $aus;
+foot();
+
 ?>
+
+<script>
+$( document ).ready(function() {
+    $('#BilanzTable').DataTable({
+      'paging'      : true,
+      'lengthChange': false,
+      'searching'   : true,
+      'ordering'    : true,
+      'info'        : true,
+      'autoWidth'   : false,
+	  "language": {
+            "lengthMenu": "Display _MENU_ Einträge pro Seite",
+            "zeroRecords": "Nichts gefunden Entschuldigung",
+            "info": "Zeige Seite _PAGE_ von _PAGES_",
+            "infoEmpty": "Keine Einträge vorhanden",
+            "infoFiltered": "(filtered from _MAX_ total records)",
+			"paginate": {
+				"first":      "erste",
+				"last":       "letzte",
+				"next":       "Weiter",
+				"previous":   "Zur&uuml;ck"
+			}
+      },
+	  "order": [[ 0, "asc" ]]
+    });
+});
+</script>
\ No newline at end of file
diff --git a/adminforce/page/interfacedaten/config_include/admin_pw.php b/adminforce/page/interfacedaten/config_include/admin_pw.php
index 036fe94..4e6d587 100644
--- a/adminforce/page/interfacedaten/config_include/admin_pw.php
+++ b/adminforce/page/interfacedaten/config_include/admin_pw.php
@@ -7,7 +7,7 @@
 			<table class="table">
 				<tr>
 					<th><b>Loginname (Adminforce)</b></th>
-					<td><input class="form-control" type="Text" name="admin_name" value="<?php echo base64_decode($interface->admin_name);?>"></td>
+					<td><input class="form-control" type="Text" name="admin_name" value="<?php echo base64_decode($grundconfig->admin_name);?>"></td>
 				</tr>
 				<tr>
 					<th><b>Passwort (Adminforce)</b></th>
diff --git a/adminforce/page/interfacedaten/config_include/betteln.php b/adminforce/page/interfacedaten/config_include/betteln.php
index 0f0fd5b..e46683d 100644
--- a/adminforce/page/interfacedaten/config_include/betteln.php
+++ b/adminforce/page/interfacedaten/config_include/betteln.php
@@ -1,27 +1,31 @@
-<table class="table table-striped">
-	<tr>
-		<td><b>min. Verdienst (Bettelaufruf)</b></td>
-		<td><input class="form-control" type="Text" name="min_betteln" value="<?php echo $interface->min_betteln;?>"></td>
-	</tr>
-	<tr>
-		<td><b>max. Verdienst (Bettelaufruf)</b></td>
-		<td><input class="form-control" type="Text" name="max_betteln" value="<?php echo $interface->max_betteln;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Direktaufruf von Bettellink</b></td>
-		<td>
-			<select name="bettel_direkt" class="form-control">
-				<option value="0" <?php if($grundconfig->bettel_direkt == 0) echo 'selected="selected"';?>>nicht erlauben</option>
-				<option value="1" <?php if($grundconfig->bettel_direkt == 1) echo 'selected="selected"';?>>erlauben</option>
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td><b>Infotext f&uuml;r User</b></td>
-		<td><textarea name="bettel_infotext" class="form-control"><?php echo $interface->bettel_infotext;?></textarea></td>
-	</tr>
-	<tr>
-		<td><b>Reloadzeit (Bettelaufruf)</b><br><i>Angaben in Sekunden (3600 = 1 Stunde) (0 = Bettellink deaktiviert)</i></td>
-		<td><input class="form-control" type="Text" name="reload_betteln" value="<?php echo $interface->reload_betteln;?>"></td>
-	</tr>
-</table>
\ No newline at end of file
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['BETTEL']['MIN'];?></label>
+	<input type="text" class="form-control" name="min_bettel" value="<?php echo $grundconfig->min_betteln;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['BETTEL']['MINN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['BETTEL']['MAX'];?></label>
+	<input type="text" class="form-control" name="max_bettel" value="<?php echo $grundconfig->max_betteln;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['BETTEL']['MAXN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['BETTEL']['RELOAD'];?></label>
+	<input type="text" class="form-control" name="reload_betteln" value="<?php echo $grundconfig->reload_betteln;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['BETTEL']['RELOADN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['BETTEL']['INFO'];?></label>
+	<textarea name="bettel_infotext" class="form-control"><?php echo $grundconfig->bettel_infotext;?></textarea>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['BETTEL']['DIREKT'];?></label>
+	<select name="bettel_direkt" class="form-control">
+		<option value="0" <?php if($grundconfig->bettel_direkt == 0) echo 'selected="selected"';?>>nicht erlauben</option>
+		<option value="1" <?php if($grundconfig->bettel_direkt == 1) echo 'selected="selected"';?>>erlauben</option>
+	</select>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['BETTEL']['DIREKTN'];?></small>
+</div>
\ No newline at end of file
diff --git a/adminforce/page/interfacedaten/config_include/nutzer.php b/adminforce/page/interfacedaten/config_include/nutzer.php
index 8d331c1..935c1af 100644
--- a/adminforce/page/interfacedaten/config_include/nutzer.php
+++ b/adminforce/page/interfacedaten/config_include/nutzer.php
@@ -1,24 +1,9 @@
-<table class="table table-striped">
-	<tr>
-		<td><b>Refebene 1</b><br><i>Angaben in Prozent!</i></td>
-		<td><input class="form-control" type="Text" name="re1" value="<?php echo $interface->re1;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Refebene 2</b><br><i>Angaben in Prozent!</i></td>
-		<td><input class="form-control" type="Text" name="re2" value="<?php echo $interface->re2;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Refebene 3</b><br><i>Angaben in Prozent!</i></td>
-		<td><input class="form-control" type="Text" name="re3" value="<?php echo $interface->re3;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Auszahlungssperre bei Neuanmeldung</b><br>
-							<i>Jede Neuanmeldung muss erst manuell freigeschaltet werden</i></td>
-		<td>
-			<select name="auszahlung_sperre">
-				<option value="0" <?php if ($interface->auszahlung_sperre == 1) echo 'SELECTED';?>>Deaktiviert</option>
-				<option value="1" <?php if ($interface->auszahlung_sperre == 0) echo 'SELECTED';?>>Aktiviert</option>
-			</select>
-		</td>
-	</tr>
-</table>
\ No newline at end of file
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['NUTZER']['REGFREE'];?></label>
+	<select name="reg_free" class="form-control">
+		<option value="0" <?php if($grundconfig->reg_free == 0) echo 'selected="selected"';?>><?php echo GLOBALSETTING['SETTING']['NUTZER']['SELF'];?></option>
+		<option value="1" <?php if($grundconfig->reg_free == 1) echo 'selected="selected"';?>><?php echo GLOBALSETTING['SETTING']['NUTZER']['ADMIN'];?></option>
+	</select>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['NUTZER']['REGFREEN'];?></small>
+</div>
+
diff --git a/adminforce/page/interfacedaten/config_include/sitesetting.php b/adminforce/page/interfacedaten/config_include/sitesetting.php
index ab24240..a1cee28 100644
--- a/adminforce/page/interfacedaten/config_include/sitesetting.php
+++ b/adminforce/page/interfacedaten/config_include/sitesetting.php
@@ -1,71 +1,84 @@
-<table class="table table-striped">
-	<tr>
-		<td><b>Betreiber E-Mail Adresse</b><br><i>Deine E-Mail Adresse von der alle Mails kommen sollen.</i></td>
-		<td><input class="form-control" type="Text" name="betreibermail" value="<?php echo $interface->betreibermail;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Cron-PW</b><br><i>Passwort f&uuml;r die Crons</i></td>
-		<td><input class="form-control" type="Text" name="cron_pw" value="<?php echo $interface->cron_pw;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Wartungsmodus</b><br><i>Wartungstext muss bearbeitet werden!</i></td>
-		<td><input class="form-control" type="checkbox" name="wartung" <?php if ($interface->wartung == 1) echo 'checked';?>></td>
-	</tr>
-	<tr>
-		<td><b>Domain</b><br><i>URL deiner Seite</i></td>
-		<td><input class="form-control" type="Text" name="domain" value="<?php echo $interface->domain;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Seitenname</b><br><i>Name wie deine Seite hei&szlig;t</i></td>
-		<td><input class="form-control" type="Text" name="seitenname" value="<?php echo $interface->seitenname;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Start der Seite</b></td>
-		<td><input type="date" class="form-control" name="start_seite" value="<?php echo date("Y-m-d",$interface->start_seite);?>"></td>
-	</tr>
-	<tr>
-		<td><b>Startseite Userbereich</b><br><i>Ausw&auml;hlen was angezeigt werden soll auf der Startseite</i></td>
-		<td>
-			<table width="50%">
-				<tr>
-					<td>Chat</td>
-					<td align="center"><input class="form-control" type="checkbox" name="anzeige_chat" value="1" <?php if($interface->anzeige_chat == 1){ echo 'CHECKED';} ?>></td>
-				</tr>
-				<tr>
-					<td>Startseitentext</td>
-					<td align="center"><input class="form-control" type="checkbox" name="anzeige_text" value="1" <?php if($interface->anzeige_text == 1){ echo 'CHECKED';} ?>></td>
-				</tr>
-			</table>
-		</td>
-	</tr>
-	<tr>
-		<td><b>News Kommentar</b><br><i>Damit k&ouml;nnen die User die News kommentieren</a></td>
-		<td><select name="news_komment">
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['EMAIL'];?></label>
+	<input type="text" class="form-control" name="betreibermail" value="<?php echo $grundconfig->betreibermail;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['EMAILN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['CRON_PW'];?></label>
+	<input type="text" class="form-control" name="cron_pw" value="<?php echo $grundconfig->cron_pw;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['CRON_PWN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['WARTUNG'];?></label>
+	<select name="wartung" class="form-control">
+		<option value="0" <?php if($grundconfig->wartung == 0) echo 'selected="selected"';?>>deaktiviert</option>
+		<option value="1" <?php if($grundconfig->wartung == 1) echo 'selected="selected"';?>>aktiviert</option>
+	</select>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['WARTUNGN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['DOMAIN'];?></label>
+	<input type="text" class="form-control" name="domain" value="<?php echo $grundconfig->domain;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['DOMAINN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['SEITN'];?></label>
+	<input type="text" class="form-control" name="seitenname" value="<?php echo $grundconfig->seitenname;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['SEITNN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['DSTART'];?></label>
+	<input type="date" class="form-control" name="start_seite" value="<?php echo date("Y-m-d", $grundconfig->start_seite);?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['DSTARTN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['USTART'];?></label>
+	<div class="row">
+		<div class="col-md-6">
+			Chat<input class="form-control" type="checkbox" name="anzeige_chat" value="1" <?php if($interface->anzeige_chat == 1){ echo 'CHECKED';} ?>>
+		</div>
+		<div class="col-md-6">
+			Startseitentext<input class="form-control" type="checkbox" name="anzeige_text" value="1" <?php if($interface->anzeige_text == 1){ echo 'CHECKED';} ?>>
+		</div>
+	</div>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['USTARTN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['NEWSK'];?></label>
+		<select name="news_komment" class="form-control">
 			<option value="0" <?php if ($interface->news_komment == 0) echo 'SELECTED';?>>Deaktiviert</option>
 			<option value="1" <?php if ($interface->news_komment == 1) echo 'SELECTED';?>>Aktiviert</option>
-		</select>	
-		</td>
-	</tr>
-	<tr>
-		<td><b>Buchungen l&ouml;schen</b><br><i>Sollen Buchungen automatisch gel&ouml;scht werden?</td>
-		<td><select name="buchungen_loeschen">
+		</select>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['NEWSKN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['BUCHL'];?></label>
+		<select name="buchungen_loeschen" class="form-control">
 			<option value="0" <?php if ($interface->buchungen_loeschen == 0) echo 'SELECTED';?>>Deaktiviert</option>
 			<option value="1" <?php if ($interface->buchungen_loeschen == 1) echo 'SELECTED';?>>Aktiviert</option>
 		</select>
 		<?php
-		if ($interface->buchungen_loeschen == 1){
-			echo '<input class="form-control" style="width:100px;" type="text" name="buchungen_loeschen_tage" value="'.$interface->buchungen_loeschen_tage.'"> Tage';
-		}else{
-			echo '<input class="form-control" style="width:100px;" type="hidden" name="buchungen_loeschen_tage" value="'.$interface->buchungen_loeschen_tage.'">';
-		}
+		if ($interface->buchungen_loeschen == 1) echo '<input class="form-control" style="width:100px;" type="text" name="buchungen_loeschen_tage" value="'.$interface->buchungen_loeschen_tage.'"> Tage';
 		?>
-	</tr>
-	<tr>
-		<td><b>Erlaube IP-L&auml;nder</b><br><i>L&auml;nder werden per IP abgefragt und bei nicht entsprechen geblockt<br>Internationale Abk&uuml;rzungen eintragen (DE,AT,CH) und mit , trennen<br>Freilassen, wenn deaktiviert sein soll</i></td>
-		<td><input type="text" class="form-control" name="ip_erlaubt" value="<?php echo $interface->ip_erlaubt;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Nicht erlaubte eMail-Domains</b><br><i>(Durch ; getrennt)</i></td>
-		<td><input class="form-control" type="Text" name="denied_domains" value="<?php echo $interface->denied_domains;?>"></td>
-	</tr>
-</table>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['BUCHLN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['DENIEDE'];?></label>
+	<input type="text" class="form-control" name="denied_domains" value="<?php echo $grundconfig->denied_domains;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['DENIEDEN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['GRUND']['IPLAND'];?></label>
+	<input type="text" class="form-control" name="ip_erlaubt" value="<?php echo $grundconfig->ip_erlaubt;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUND']['IPLANDN'];?></small>
+</div>
diff --git a/adminforce/page/interfacedaten/config_include/smtp.php b/adminforce/page/interfacedaten/config_include/smtp.php
index 45f9e64..7c571b9 100644
--- a/adminforce/page/interfacedaten/config_include/smtp.php
+++ b/adminforce/page/interfacedaten/config_include/smtp.php
@@ -1,27 +1,32 @@
-<table class="table table-striped">
-	<tr>
-		<td>Host</td>
-		<td><input type="text" name="SMTP_HOST" value="<?php echo $interface->SMTP_HOST;?>" class="form-control"></td>
-	</tr>
-	<tr>
-		<td>Port</td>
-		<td><input type="text" name="SMTP_PORT" value="<?php echo $interface->SMTP_PORT;?>" class="form-control"></td>
-	</tr>
-	<tr>
-		<td>Verbindung</td>
-		<td>
-			<select name="SMTP_VERBINDUNG">
-				<option value="ssl" <?php if($interface->SMTP_VERBINDUNG == 'ssl'){ echo 'selected="selected"';}?>>SSL</option>
-				<option value="tls" <?php if($interface->SMTP_VERBINDUNG == 'tls'){ echo 'selected="selected"';}?>>TLS</option>
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>Loginname</td>
-		<td><input type="text" name="SMTP_LOGIN" value="<?php echo $interface->SMTP_LOGIN;?>" class="form-control"></td>
-	</tr>
-	<tr>
-		<td>Passwort</td>
-		<td><input type="text" name="SMTP_PASS" value="<?php echo $interface->SMTP_PASS;?>" class="form-control"></td>
-	</tr>
-</table>
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['SMTP']['HOST'];?></label>
+	<input type="text" class="form-control" name="SMTP_HOST" value="<?php echo $grundconfig->SMTP_HOST;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['SMTP']['HOSTN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['SMTP']['PORT'];?></label>
+	<input type="text" class="form-control" name="SMTP_PORT" value="<?php echo $grundconfig->SMTP_PORT;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['SMTP']['PORTN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['SMTP']['VERBI'];?></label>
+	<select name="SMTP_VERBINDUNG" class="form-control">
+		<option value="ssl" <?php if($grundconfig->SMTP_VERBINDUNG == 'ssl'){ echo 'selected="selected"';}?>>SSL</option>
+		<option value="tls" <?php if($grundconfig->SMTP_VERBINDUNG == 'tls'){ echo 'selected="selected"';}?>>TLS</option>
+	</select>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['SMTP']['VERBIN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['SMTP']['NICK'];?></label>
+	<input type="text" class="form-control" name="SMTP_LOGIN" value="<?php echo $grundconfig->SMTP_LOGIN;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['SMTP']['NICKN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['SMTP']['PASS'];?></label>
+	<input type="text" class="form-control" name="SMTP_PASS">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['SMTP']['PASSN'];?></small>
+</div>
diff --git a/adminforce/page/interfacedaten/config_include/startseite.php b/adminforce/page/interfacedaten/config_include/startseite.php
new file mode 100644
index 0000000..e30f43f
--- /dev/null
+++ b/adminforce/page/interfacedaten/config_include/startseite.php
@@ -0,0 +1,29 @@
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['STARTV']['VERDI'];?></label>
+	<input type="text" class="form-control" name="verdienst_start" value="<?php echo $grundconfig->verdienst_start;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['STARTV']['VERDIN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['STARTV']['RELOAD'];?></label>
+	<input type="text" class="form-control" name="reload_start" value="<?php echo $grundconfig->reload_start;?>">
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['STARTV']['RELOADN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['STARTV']['LOG'];?></label>
+	<select name="start_log" class="form-control">
+		<option value="0" <?php if($grundconfig->start_log == 0) echo 'selected="selected"';?>>deaktiviert</option>
+		<option value="1" <?php if($grundconfig->start_log == 1) echo 'selected="selected"';?>>aktiviert</option>
+	</select>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['STARTV']['POPN'];?></small>
+</div>
+
+<div class="form-group">
+	<label><?php echo GLOBALSETTING['SETTING']['STARTV']['POP'];?></label>
+	<select name="popup_start" class="form-control">
+		<option value="0" <?php if($grundconfig->popup_start == 0) echo 'selected="selected"';?>>deaktiviert</option>
+		<option value="1" <?php if($grundconfig->popup_start == 1) echo 'selected="selected"';?>>aktiviert</option>
+	</select>
+	<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['STARTV']['POPN'];?></small>
+</div>
\ No newline at end of file
diff --git a/adminforce/page/interfacedaten/config_include/waehrung.php b/adminforce/page/interfacedaten/config_include/waehrung.php
index 1880c1d..ac3051d 100644
--- a/adminforce/page/interfacedaten/config_include/waehrung.php
+++ b/adminforce/page/interfacedaten/config_include/waehrung.php
@@ -1,39 +1,33 @@
-<table class="table table-striped">
-	<tr>
-		<td><b>Name der W&auml;hrung</b><br><i>Name deiner W&auml;hrung</i></td>
-		<td><input class="form-control" type="Text" name="waehrung" value="<?php echo $interface->waehrung;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Einzahlgrenze</b><br><i>Max. Guthaben pro User! (Ganzzahl)</i></td>
-		<td><input class="form-control" type="Text" name="einzahlgrenze" value="<?php echo $interface->einzahlgrenze;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Verdienst (Startseitenaufruf)</b></td>
-		<td><input class="form-control" type="Text" name="verdienst_start" value="<?php echo $interface->verdienst_start;?>"></td>
-	</tr>
-	<tr>
-		<td><b>Reloadzeit (Startseitenaufruf)</b></td>
-		<td><input class="form-control" type="Text" name="reload_start" value="<?php echo $interface->reload_start;?>"> In Sekunden</td>
-	</tr>
-	<tr>
-		<td><b>Vergütung als Popup</b><br><i>Startseitenvergütung!</i></td>
-		<td>
-			<select name="popup_start">
-				<option value="0" <?php if ($interface->popup_start == 0) echo 'SELECTED';?>>Deaktiviert</option>
-				<option value="1" <?php if ($interface->popup_start == 1) echo 'SELECTED';?>>Aktiviert</option>
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td><b>Geburtstagsaddon aktivieren</b></td>
-		<td><select name="geb_addon">
-			<option value="0" <?php if ($interface->geb_addon == 0) echo 'SELECTED';?>>Deaktiviert</option>
-			<option value="1" <?php if ($interface->geb_addon == 1) echo 'SELECTED';?>>Aktiviert</option>
-		</select>
-		<?php
-		if ($interface->geb_addon == 1){ echo '<a href="#">Link</a><div id="hiddendiv"></div>';}
-		?>
-		
-		</td>
-	</tr>
-</table>
\ No newline at end of file
+<div class="row">
+	<div class="col-md-6">
+		<div class="card">
+			<div class="card-header"><h2><?php echo GLOBALSETTING['SETTING']['GRUNDW']['GRUND'];?></h2></div>
+			<div class="card-body">
+				<div class="form-group">
+					<label><?php echo GLOBALSETTING['SETTING']['GRUNDW']['NAME'];?></label>
+					<input type="text" class="form-control" name="waehrung" value="<?php echo $grundconfig->waehrung;?>">
+					<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUNDW']['NOTICE'];?></small>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div class="col-md-6">
+		<div class="card">
+			<div class="card-header"><h2><?php echo GLOBALSETTING['SETTING']['GRUNDZ']['GRUND'];?></h2></div>
+			<div class="card-body">
+				<div class="form-group">
+					<label><?php echo GLOBALSETTING['SETTING']['GRUNDZ']['STATUS'];?></label>
+					<select name="waehrung_zwei" class="form-control">
+						<option value="0" <?php if($grundconfig->waehrung_zwei == 0) echo 'selected="selected"';?>>deaktiviert</option>
+						<option value="1" <?php if($grundconfig->waehrung_zwei == 1) echo 'selected="selected"';?>>aktiv</option>
+					</select>
+				</div>
+				<div class="form-group">
+					<label><?php echo GLOBALSETTING['SETTING']['GRUNDZ']['NAME'];?></label>
+					<input type="text" class="form-control" name="waehrung" value="<?php echo $grundconfig->waehrung;?>">
+					<small class="form-text text-muted"><?php echo GLOBALSETTING['SETTING']['GRUNDZ']['NOTICE'];?></small>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
\ No newline at end of file
diff --git a/adminforce/page/interfacedaten/multi_konten.php b/adminforce/page/interfacedaten/multi_konten.php
new file mode 100644
index 0000000..440f00b
--- /dev/null
+++ b/adminforce/page/interfacedaten/multi_konten.php
@@ -0,0 +1,46 @@
+<?php
+
+$Class = Classloader('multiKonten',true);
+$row = $Class->ListeMultiKonten();
+
+
+head("Liste aller Multikonten");
+?>
+
+<table class="table table-hover" id="DataTables">
+	<thead>
+		<?php echo $row['head'];?>
+	</thead>
+	<tbody>
+		<?php echo $row['body'];?>
+	</tbody>
+</table>
+
+<?php foot();?>
+
+<script>
+$( document ).ready(function() {
+    $('#DataTables').DataTable({
+      'paging'      : true,
+      'lengthChange': false,
+      'searching'   : true,
+      'ordering'    : true,
+      'info'        : true,
+      'autoWidth'   : false,
+	  "language": {
+            "lengthMenu": "Display _MENU_ Einträge pro Seite",
+            "zeroRecords": "Nichts gefunden Entschuldigung",
+            "info": "Zeige Seite _PAGE_ von _PAGES_",
+            "infoEmpty": "Keine Einträge vorhanden",
+            "infoFiltered": "(filtered from _MAX_ total records)",
+			"paginate": {
+				"first":      "erste",
+				"last":       "letzte",
+				"next":       "Weiter",
+				"previous":   "Zur&uuml;ck"
+			}
+      },
+	  "order": [[ 0, "desc" ]]
+    });
+});
+</script>
\ No newline at end of file
diff --git a/adminforce/page/interfacedaten/pageconfig.php b/adminforce/page/interfacedaten/pageconfig.php
index 56c2273..2107721 100644
--- a/adminforce/page/interfacedaten/pageconfig.php
+++ b/adminforce/page/interfacedaten/pageconfig.php
@@ -1,15 +1,13 @@
 <?php
 
-
-$interface = $datenbank->get_row("SELECT * FROM ". PREFIX . CONFIG ." LIMIT 1",true);
-
 head("Webseiteneinstellungen"); ?>
 
 <div>
-	<ul class="nav nav-pills mb-3" role="tablist">
+	<ul class="nav nav-tabs" id="myTab" role="tablist">
 		<li role="presentation" class="nav-item"><a href="#start" class="nav-link active" role="tab" data-toggle="tab">Seiteneinstellung</a></li>
 		<li role="presentation" class="nav-item"><a href="#waehrung" class="nav-link" role="tab" data-toggle="tab">W&auml;hrung</a></li>
 		<li role="presentation" class="nav-item"><a href="#bettel" class="nav-link" role="tab" data-toggle="tab">Bettellink</a></li>
+		<li role="presentation" class="nav-item"><a href="#startseite" class="nav-link" role="tab" data-toggle="tab">Startseite</a></li>
 		<li role="presentation" class="nav-item"><a href="#nutzer" class="nav-link" role="tab" data-toggle="tab">Nutzer</a></li>
 		<li role="presentation" class="nav-item"><a href="#smtp" class="nav-link" role="tab" data-toggle="tab">SMTP</a></li>
 		<li role="presentation" class="nav-item"><a href="#ref" class="nav-link" role="tab" data-toggle="tab">Refeinstellung</a></li>
@@ -35,6 +33,12 @@ head("Webseiteneinstellungen"); ?>
 				<input type="submit" name="run[GrunConfigUpdate]" value="Bettellink Einstellung Speichern" class="btn btn-default">
 			</form>
 		</div>
+		<div role="tabpanel" class="tab-pane" id="startseite">
+			<form action="" method="post">
+				<?php require('page/interfacedaten/config_include/startseite.php');?>
+				<input type="submit" name="run[GrunConfigUpdate]" value="Startseiten Einstellung Speichern" class="btn btn-default">
+			</form>
+		</div>
 		<div role="tabpanel" class="tab-pane" id="nutzer">
 			<form action="" method="post">
 				<?php require('page/interfacedaten/config_include/nutzer.php');?>
diff --git a/adminforce/page/interfacedaten/start.php b/adminforce/page/interfacedaten/start.php
new file mode 100644
index 0000000..e96c60e
--- /dev/null
+++ b/adminforce/page/interfacedaten/start.php
@@ -0,0 +1,19 @@
+<?php
+
+$Class = Classloader('start',true);
+
+?>
+
+<table class="table table-striped" id="DataTable">
+	<thead>
+		<tr>
+			<th>#</th>
+			<th>UID</th>
+			<th>Datum</th>
+			<th>Betrag</th>
+		</tr>
+	</thead>
+	<tbody>
+		<?php echo $Class->Liste();?>
+	</tbody>
+</table>
\ No newline at end of file
diff --git a/index.php b/index.php
index 2746fef..6728918 100644
--- a/index.php
+++ b/index.php
@@ -149,18 +149,18 @@ if ($datenbank->num_rows($start_reload) != 0) {
 	<br>
 	<div class="container-fluid" role="main">
 		<div class="row">
-			<div class="col-1"></div>
-			<div class="col-2">
+			<div class="col-md-1"></div>
+			<div class="col-md-2">
 				<?php require_once('lib/menue_links.php');?>
 			</div>
-			<div class="col-8">
+			<div class="col-md-8">
 				<div class="jumbotron">
 					<?php
 					require_once ('./page/' . $_GET['page'] . '.php');
 					?>
 				</div>
 			</div>
-			<div class="col-1"></div>
+			<div class="col-md-1"></div>
 		</div>
 	</div>
 	
diff --git a/install/mysql.txt b/install/mysql.txt
index 14c8d43..9c75f04 100644
--- a/install/mysql.txt
+++ b/install/mysql.txt
@@ -508,7 +508,9 @@ INSERT INTO `vms_run_inc` (`id`, `name`, `value`, `datei`, `beschreibung`, `bere
 (77, 'manuelle_buchung', 'Buchen', 'user/buchung.php', 'Manuelle Kontobuchung', 1),
 (78, 'refback_save', 'Save', 'konto/refback.php', 'Speichern des Refbacks', 0),
 (79, 'berechtigungAdmin', 'Speichern', 'user/AdminRechte.php', 'Seitenberechtigung im Adminbereich speichern', 1),
-(80, 'MultiDelete', 'Löschen', 'multi_konto/del.php', 'Löschen von Multi Konten Bindungen', 1);
+(80, 'MultiDelete', 'Löschen', 'multi_konto/del.php', 'Löschen von Multi Konten Bindungen', 1),
+(81, 'GrunConfigUpdate', 'Startseiten Einstellung Speichern', 'setting/grundeinstellung.php', 'Grundeinstellungen Speichern', 1),
+(82, 'GrunConfigUpdate', 'Bettellink Einstellung Speichern', 'setting/grundeinstellung.php', 'Grundeinstellungen Speichern', 1);
 
 CREATE TABLE `vms_schnittstelle` (
   `name` text NOT NULL,
@@ -547,6 +549,7 @@ CREATE TABLE `vms_seitenkonfig` (
   `betreibermail` text NOT NULL,
   `cron_pw` text NOT NULL,
   `start_seite` int(11) NOT NULL,
+  `start_log` int(11) NOT NULL DEFAULT '0',
   `einzahlgrenze` int(11) NOT NULL DEFAULT '0',
   `re1` double(10,2) NOT NULL DEFAULT '0.00',
   `re2` double(10,2) NOT NULL DEFAULT '0.00',
@@ -556,6 +559,8 @@ CREATE TABLE `vms_seitenkonfig` (
   `min_betteln` double(10,2) NOT NULL DEFAULT '0.00',
   `max_betteln` double(10,2) NOT NULL DEFAULT '0.00',
   `reload_betteln` int(11) NOT NULL DEFAULT '0',
+  `bettel_direkt` int(11) NOT NULL,
+  `bettel_infotext` longtext NOT NULL,
   `denied_domains` text NOT NULL,
   `admin_name` varchar(255) NOT NULL,
   `admin_pass` varchar(255) NOT NULL,
@@ -578,8 +583,9 @@ CREATE TABLE `vms_seitenkonfig` (
   `SMTP_LOGIN` text NOT NULL,
   `SMTP_PASS` text NOT NULL,
   `SMTP_VERBINDUNG` text NOT NULL,
-  `kontostand_b` int(11) NOT NULL DEFAULT '0',
-  `kontostand_b_name` text NOT NULL
+  `waehrung_zwei` int(11) NOT NULL DEFAULT '0',
+  `waehrung_zwei_name` text NOT NULL,
+  `reg_free` int(11) NOT NULL DEFAULT '0'
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
 CREATE TABLE `vms_texte` (
diff --git a/js/custom.js b/js/custom.js
index 70b6308..b459f16 100644
--- a/js/custom.js
+++ b/js/custom.js
@@ -250,4 +250,29 @@ $(document).ready(function() {
 
   /*======== 10. PROGRESS BAR ========*/
   NProgress.done();
+  
+	if($('#DataTable')){
+		$('#DataTable').DataTable({
+			'paging'      : true,
+			'lengthChange': false,
+			'searching'   : true,
+			'ordering'    : true,
+			'info'        : true,
+			'autoWidth'   : false,
+			"language": {
+				"lengthMenu": "Display _MENU_ Einträge pro Seite",
+				"zeroRecords": "Nichts gefunden Entschuldigung",
+				"info": "Zeige Seite _PAGE_ von _PAGES_",
+				"infoEmpty": "Keine Einträge vorhanden",
+				"infoFiltered": "(filtered from _MAX_ total records)",
+				"paginate": {
+					"first":      "erste",
+					"last":       "letzte",
+					"next":       "Weiter",
+					"previous":   "Zur&uuml;ck"
+				}
+			},
+			"order": [[ 0, "desc" ]]
+		});
+	}
 });
diff --git a/lib/class/anmelden.class.php b/lib/class/anmelden.class.php
index 00582a6..6727ba5 100644
--- a/lib/class/anmelden.class.php
+++ b/lib/class/anmelden.class.php
@@ -32,13 +32,15 @@ class ANMELDEN{
 		$this->make_array($_POST);
 		$this->pruef();
 		if($this->error == 0){
-			$this->konto($this->post['password1']);
+			$this->konto();
 			$this->email();
 			$this->user();
 			$this->werber();
 			$this->nickpage();
-			$this->aktivierung();
-			$this->ak_senden();
+			if($this->grundconfig->reg_free == 1){
+				$this->aktivierung();
+				$this->ak_senden();
+			}
 			if($this->error == 0){
 				return true;
 			}else{
@@ -110,8 +112,8 @@ class ANMELDEN{
 		$this->db->insert(PREFIX . USER , $insert);
 	}
  
-	function konto($pass){
-		$pw = pw_erstellen($pass);
+	function konto(){
+		$pw = pw_erstellen($this->post['password1']);
 		$this->db->insert(PREFIX . KONTO, array("passwort" => $pw, "status" => 0));
 		$this->uid = $this->db->lastid();
 	}
diff --git a/lib/class/kontobuchung.class.php b/lib/class/kontobuchung.class.php
index fc65ea2..729e2c6 100644
--- a/lib/class/kontobuchung.class.php
+++ b/lib/class/kontobuchung.class.php
@@ -6,29 +6,50 @@ class kontobuchung{
 	private $betrag;
 	private $art;
 	private $verwendung;
-	private $empfanger;
+	private $empfanger = 0;
 	private $db;
+	private $post = array();
+	private $session;
+	private $KontoArt = 'kontostand_a';
+	private $error = 0;
+	private $meldung;
+	private $Table = BUCH;
 	
 	public function __construct(){
-		global $datenbank;
+		global $datenbank,$_SESSION;
 		$this->db = $datenbank;
+		$this->session = $_SESSION;
 	}
 	
-	public function set_var($uid,$betrag,$art,$verwendung,$empfaenger = 0){
+	private function make_array($post){
+		foreach($post AS $key => $value){
+			if($key != '' && $key != 'run' && $value != ''){
+				$this->post[$this->db->escape($key)] = $this->db->escape($value);
+			}
+		}
+	}
+	
+	public function set_var($uid,$betrag,$art,$verwendung,$empfaenger = 0,$waehrung = 1){
+		
 		$this->set_uid($uid);
 		$this->set_betrag($betrag);
 		$this->set_art($art);
 		$this->set_verw($verwendung);
-		if($empfaenger != 0){ $this->set_empfaenger($empfaenger);}
-		if($art == '-'){
-			$this->abzug();
-		}else{
-			$this->gutschrift();
-		}
+		if($waehrung != 2) $this->SetKontoArt($waehrung);
+		if($empfaenger !== 0){ $this->set_empfaenger($empfaenger);}
+		if($this->error == 0) $this->Buchung();
 	}
 	
 	private function set_empfaenger($uid){
-		$this->empfanger = $uid;
+		$uid = $this->db->escape($uid);
+		$query = "SELECT uid FROM ". PREFIX . USER ." WHERE uid = '$uid' OR nickname = '$uid' ";
+		if($this->db->num_rows($query) == 1){
+			$row = $this->db->get_row($query);
+			$this->empfanger = $row[0];
+		}else{
+			$this->error = 1;
+			$this->meldung = UEBERWEISUNG['ERROR']['UNKNOW'];
+		}
 	}
 	
 	private function set_verw($verw){
@@ -47,33 +68,81 @@ class kontobuchung{
 		$this->art = $art;
 	}
 	
-	private function abzug(){
-		$konto = $this->kontostand();
-		$konto_neu = $konto - $this->betrag;
-		$buchung_ok = $this->db->update(PREFIX . KONTO , array("kontostand_a" => $konto_neu) , array("uid" => $this->uid),1 );
-		$this->buchungsliste($buchung_ok);
+	private function SetKontoArt($waehrung){
+		if($waehrung == 2){
+			$this->KontoArt = 'kontostand_b';
+			$this->Table = BUCH_B;
+		}
 	}
-	private function gutschrift(){
+	
+	private function Buchung(){
 		$konto = $this->kontostand();
-		$konto_neu = $konto + $this->betrag;
-		$buchung_ok = $this->db->update(PREFIX . KONTO , array("kontostand_a" => $konto_neu) , array("uid" => $this->uid),1 );
-		$this->buchungsliste($buchung_ok);
+		$neu = $konto . $this->art . $this->betrag;
+		eval("\$konto_neu = $neu;");
+		$this->buchungsliste($this->db->update(PREFIX . KONTO , array($this->KontoArt => $konto_neu) , array("uid" => $this->uid),1 ),false);
+		
+		
+		if($this->empfanger !== 0){
+			$konto = $this->kontostand($this->empfanger);
+			$konto_neu = $konto+$this->betrag;
+			$this->buchungsliste($this->db->update(PREFIX . KONTO , array($this->KontoArt => $konto_neu) , array("uid" => $this->empfanger),1 ),true);
+		}
+	}
+	
+	private function buchungsliste($buchung_ok,$u = false){
+		if($u == false){
+			$buch = array(
+				"uid" => $this->uid,
+				"buchungszeit" => time(),
+				"buchungs_id" => create_code(11),
+				"buchungsmenge" => $this->art . $this->betrag,
+				"verwendungszweck" => $this->verwendung
+			);
+			if($buchung_ok == true){ $buch['buchung_ok'] = 1;}
+			$this->db->insert(PREFIX . $this->Table , $buch);
+		}
+		
+		if($this->empfanger !== 0 && $u == true){
+			$buch = array(
+				"uid" => $this->empfanger,
+				"buchungszeit" => time(),
+				"buchungs_id" => create_code(11),
+				"buchungsmenge" => '+'. $this->betrag,
+				"verwendungszweck" => $this->verwendung
+			);
+			if($buchung_ok == true){ $buch['buchung_ok'] = 1;}
+			$this->db->insert(PREFIX . $this->Table , $buch);
+			
+			$this->meldung = UEBERWEISUNG['TRUE']['TRUE'];
+		}
 	}
 	
-	private function buchungsliste($buchung_ok){
-		$buch = array(
-			"uid" => $this->uid,
-			"buchungszeit" => time(),
-			"buchungs_id" => create_code(11),
-			"buchungsmenge" => $this->art . $this->betrag,
-			"verwendungszweck" => $this->verwendung
-		);
-		if($buchung_ok == true){ $buch['buchung_ok'] = 1;}
-		$this->db->insert(PREFIX . BUCH , $buch);
+	private function kontostand($uid = false){
+		if($uid !== false) $this->uid = $uid;
+		$return = $this->db->get_row("SELECT ". $this->KontoArt ." AS kontostand FROM ". PREFIX . KONTO ." WHERE uid = '$this->uid' ",true);
+		return $return->kontostand;
 	}
 	
-	private function kontostand(){
-		$return = $this->db->get_row("SELECT kontostand_a FROM ". PREFIX . KONTO ." WHERE uid = '$this->uid' ",true);
-		return $return->kontostand_a;
+	private function CheckValue($konto){
+		if($konto < $this->post['betrag']){
+			$this->error = 1;
+			$this->meldung = UEBERWEISUNG['ERROR']['NEG'];
+		}
+		if(!is_numeric($this->post['betrag'])){
+			$this->error = 1;
+			$this->meldung = UEBERWEISUNG['ERROR']['FORMAT'];
+		}
+	}
+	
+	public function Ueberweisen($post){
+		$this->make_array($post);
+		$this->post['betrag'] = str_replace(",",".",$this->post['betrag']);
+		$this->set_uid($this->session['uid']);
+		$this->SetKontoArt($this->post['waehrung']);
+		$konto = $this->kontostand();
+		$this->CheckValue($konto);
+		if($this->error == 0) $this->set_var($this->session['uid'],$this->post['betrag'],'-',$this->post['verwendungszweck'],$this->post['empfaenger'],$this->post['waehrung']);
+		
+		meldung($this->error,$this->meldung);
 	}
 }
diff --git a/lib/class/start.class.php b/lib/class/start.class.php
index e7846f6..ecb4d4d 100644
--- a/lib/class/start.class.php
+++ b/lib/class/start.class.php
@@ -26,12 +26,22 @@ class START{
 			$this->db->insert(PREFIX . RELOAD, array("ip" => $this->ip,"uid" => $this->db->escape($this->session['uid']),"tan" => 'startseitenaufruf',"bis" => $new_reload));
 			$this->StatistikUpgrade();
 			$this->konto->set_var($this->session['uid'],$this->grund->verdienst_start,'+','System Startseitenverg&uuml;tung');
+			$this->StartLog();
 			$this->meldung = '<b>Du hast gerade '.number_format($this->grund->verdienst_start,2,',','.').' für diesen Aufruf erhalten!</b>';
 		}
 		$aus = array("error" => $this->error, "meldung" => $this->meldung);
 		return $aus;
 	}
 	
+	private function StartLog(){
+		$array = array(
+			"uid" => $this->session['uid'],
+			"datum" => time(),
+			"betrag" => $this->grund->verdienst_start
+		);
+		$this->db->insert(START_LOG, $array);
+	}
+	
 	private function StatistikUpgrade(){
 		$row = $this->db->get_row("SELECT s_verdienst,s_aufrufe FROM ". PREFIX . KONTO ." WHERE uid = '". $this->session['uid'] ."' ",true);
 		$s_aufruf = $row->s_aufrufe + 1;
diff --git a/lib/funktionen/konto/ueberweisen.php b/lib/funktionen/konto/ueberweisen.php
index f56d30e..4fa64fa 100644
--- a/lib/funktionen/konto/ueberweisen.php
+++ b/lib/funktionen/konto/ueberweisen.php
@@ -1,32 +1,6 @@
 <?php
-	$error = 0;
-	$user = db_query("SELECT uid FROM ".$db_prefix."_userdaten WHERE nickname = '". mysqli_real_escape_string($sql_open,$_POST['empfaenger']) ."' OR uid = '". mysqli_real_escape_string($sql_open,$_POST['empfanger']) ."'");
-	$kontostand = mysqli_fetch_array(db_query("SELECT kontostand,b_kontostand FROM ".$db_prefix."_kontodaten WHERE uid = '". mysqli_real_escape_string($sql_open,$_SESSION['uid']) ."' "));
-	
-	if(mysqli_num_rows($user) != 1){ $error = 1; $meldung = 'User nicht gefunden.';}
-	if($_POST['waehrung'] == 1){
-		if($_POST['betrag'] > $kontostand['kontostand']){ $error = 1; $meldung = 'Dein Guthaben reicht nicht aus.';}
-	}else{
-		if($_POST['betrag'] > $kontostand['b_kontostand']){ $error = 1, $meldung = 'Dein guthaben reicht nicht aus.'; }
-	}
-	if($_POST['waehrung'] == 1){ $waehrung = 1;}else{ $waehrung = 2;}
-	if(empty($_POST['verwendungszweck'])){ $verwendung = '&Uuml;berweisung'; }else{ $verwendung = $_POST['verwendungszweck']; }
-	
-	
-	if($error == 0){
-		$uid = mysqli_fetch_array($user);
-		$bid = create_code(14);
-		
-		//Sender
-		kontobuchung ('-', $_POST['betrag'], $_SESSION['uid'], $waehrung);
-		buchungsliste ($bid, '-'.$_POST['betrag'], $verwendung, $_SESSION['uid']);
-		
-		//Empfänger
-		kontobuchung ('+', $_POST['betrag'], $uid['uid'], $waehrung);
-		buchungsliste ($bid, $_POST['betrag'], $verwendung, $uid['uid']);
-		
-		$meldung = 'Guthaben wurde gesendet.'
-	}
-	
-	$meldung = meldung(0,$meldung);
+
+$Class = Classloader('kontobuchung');
+$Class->Ueberweisen($_POST);
+
 ?>
\ No newline at end of file
diff --git a/lib/lang/lang.de.php b/lib/lang/lang.de.php
index f5d4609..13e55df 100644
--- a/lib/lang/lang.de.php
+++ b/lib/lang/lang.de.php
@@ -44,6 +44,17 @@
 	define("AUSZAHLUNG_ANFRAGEN_USER_FALSE","Die Auszahlungen sind f&uuml;r heute verbraucht.<br>");
 	define("AUSZAHLUNG_TRUE","Die Auszahlung wurde erfolgreich durchgef&uuml;hrt.<br>");
 	define("EINZAHLUNG_TRUE","Die Einzahlung wurde erfolgreich durchgef&uuml;hrt.<br>");
+	define("UEBERWEISUNG", array(
+		"ERROR" => array(
+				"NEG" => 'Das Guthaben reicht leider nicht aus.',
+				"FORMAT" => 'Bitte gib eine g&uuml;ltige Zahl an.',
+				"UNKNOW" => 'Der Empf&auml;nger ist unbekannt.'
+			),
+		"TRUE" => array(
+				"TRUE" => 'Die &Uuml;berweisung wurde erfolgreich ausgef&uuml;hrt.'
+			)
+		)
+	);
 	
 	//KONTO
 	define("PASS_FALSE","Das angegebene Passwort ist nicht richtig");
diff --git a/page/intern/anmelden.php b/page/intern/anmelden.php
index 7b29216..562b4d5 100644
--- a/page/intern/anmelden.php
+++ b/page/intern/anmelden.php
@@ -79,12 +79,19 @@ if ($anmeldeok != true) {
     <?php foot();
 } else {
     head("$grundconfig->seitenname - Anmeldung erfolgreich!");
-        echo 'Deine Anmeldung bei '.$grundconfig->seitenname.' war erfolgreich, Du bekommst jetzt eine Email mit Deinen Daten und einen Aktivierungslink.
-        Sobald Du deinen Account aktiviert hast kannst Du dich bei uns einloggen und diese Seite im vollen Umfang nutzen.<br>
-        <br>
-        Bitte beachte dass es auch etwas dauern kann bis die Aktivierungsmail bei Dir ankommt, dieses ist anhängig von Deinem Emailanbieter.<br>
-        <br>
-        Mit freundlichen Grüßen<br>
-        Das '.$grundconfig->seitenname.' Team<br>';
+		if($grundconfig->reg_free == 1){
+			echo 'Deine Anmeldung bei '.$grundconfig->seitenname.' war erfolgreich, Du bekommst jetzt eine Email mit Deinen Daten und einen Aktivierungslink.
+			Sobald Du deinen Account aktiviert hast kannst Du dich bei uns einloggen und diese Seite im vollen Umfang nutzen.<br>
+			<br>
+			Bitte beachte dass es auch etwas dauern kann bis die Aktivierungsmail bei Dir ankommt, dieses ist anhängig von Deinem Emailanbieter.<br>
+			';
+		}else{
+			echo 'Deine Anmeldung wurde erfolgreich registriert.<br>
+			Ein Admin wird nun diese Prüfen und gegebenfalls freischalten.<br>
+			&Uuml;ber diesen Vorgang wirst du per E-Mail Informiert.'
+		}
+		echo '<br>
+			Mit freundlichen Grüßen<br>
+			Das '.$grundconfig->seitenname.' Team<br>';
     foot();
 }
diff --git a/page/konto/ueberweisen.php b/page/konto/ueberweisen.php
index 80fb9fc..8701a32 100644
--- a/page/konto/ueberweisen.php
+++ b/page/konto/ueberweisen.php
@@ -12,9 +12,9 @@ echo '
 				<td>W&auml;hrung</td>
 				<td>
 					<select name="waehrung">
-						<option value="1">'.$waehrung.'</option>';
-						if($grundconfig['waehrung_zwei'] == 1){
-							echo '<option value="2">'.$grundconfig['waehrung_zwei_name'].'</option>';
+						<option value="1">'. $grundconfig->waehrung .'</option>';
+						if($grundconfig->waehrung_zwei == 1){
+							echo '<option value="2">'.$grundconfig->waehrung_zwei_name .'</option>';
 						}
 					echo '
 					</select>
-- 
GitLab