diff --git a/Anleitung.txt b/Anleitung.txt
new file mode 100644
index 0000000000000000000000000000000000000000..cb03d3635df5cab7c84bfe6eac25be94fab518b6
--- /dev/null
+++ b/Anleitung.txt
@@ -0,0 +1,11 @@
+1) Alle Dateien aus dem Ordner files hochladen
+2) vms.sql in phpMyAdmin importieren
+3) Datei lib/functions.lib.php anpassen neben allen Variablen die angepasst werden müssen ist eine Beschreibung
+4) www.ihre-domain.de/adminforce/ öffnen und unter 
+	» Seiteneinstell.
+   alle Einstellungen vornehmen das gleiche unter 
+	» Betreiberdaten
+
+
+Weitere Fragen zur Einrichtung oder zum Betrieb des VMS bitte im Forum http://www.designerscripte.net stellen,
+eine Ausführliche Dokumentation ist in Arbeit.
\ No newline at end of file
diff --git a/Nutzungsbedingungen.pdf b/Nutzungsbedingungen.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..2334e3ed3dc96184221c41e9bc8608b5e2a9f65e
Binary files /dev/null and b/Nutzungsbedingungen.pdf differ
diff --git a/adminforce/content/bilanzsystem.php b/adminforce/content/bilanzsystem.php
new file mode 100644
index 0000000000000000000000000000000000000000..2f5301088b5c1118218041df701d61acf66fb12f
--- /dev/null
+++ b/adminforce/content/bilanzsystem.php
@@ -0,0 +1,28 @@
+<?
+head("Bilanzsystem");?>
+Hier eine übersicht über die Einnahmen und Ausgaben der Seite
+<?foot();?>
+
+<?head("Letzten 14 Tage");?>
+<table border="0" width="100%">
+<tr>
+    <td align="center">Datum</td>
+    <td align="center">Einnahmen</td>
+    <td align="center">Ausgaben</td>
+    <td align="center">Bilanz</td>
+</tr>
+<?
+$sql = db_query("SELECT ein,aus,date FROM ".$db_prefix."_bilanz ORDER BY date DESC");
+while ($bilanz = mysql_fetch_assoc($sql)){
+      echo '
+      <tr>
+          <td align="center">'.date("d.m.Y",$bilanz['date']).'</td>
+          <td align="center">'.$bilanz['ein'].'</td>
+          <td align="center">'.$bilanz['aus'].'</td>
+          <td align="center">'.round($bilanz['ein']-$bilanz['aus'],2).'
+      </tr>                              
+      ';
+}
+?>
+</table>                
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/error/kein_zutritt.php b/adminforce/content/error/kein_zutritt.php
new file mode 100644
index 0000000000000000000000000000000000000000..a954a35334f3e2119757dad8de930ca7387e8b13
--- /dev/null
+++ b/adminforce/content/error/kein_zutritt.php
@@ -0,0 +1,14 @@
+<?head("Zutritt verweigert");?>
+Der Zutritt zu diesem Bereich wurde Dir verweigert!<br>
+Bevor Du dich an den Support wendest, prüfe bitte erst die unten aufgezählten Möglichkeiten
+um so unnötige Supportanfragen zu vermeiden!<br>
+<br>
+<b>Mögliche Gründe</b><br>
+<ul>
+<li>Du bist nicht eingeloggt (bitte erst einloggen)</li>
+<li>Die Kontonummer/Passwortkombination stimmt nicht (Loginfehler)</li>
+<li>Du hast deinen Account noch nicht freigeschaltet (bitte Email prüfen)</li>
+<li>Die Session ist abgelaufen (verwende doch den Autologin)</li>
+</ul>
+<?foot();?>
+
diff --git a/adminforce/content/error/keine_seite.php b/adminforce/content/error/keine_seite.php
new file mode 100644
index 0000000000000000000000000000000000000000..1f35823637283b126909a80436fac0577ffc504d
--- /dev/null
+++ b/adminforce/content/error/keine_seite.php
@@ -0,0 +1,13 @@
+<?head("Seite nicht gefunden");?>
+Die von Dir angeforderte Seite ist nicht erreichbar.<br>
+Bitte wähle aus dem Menü einen gültigen Link, sollte weiterhin das Problem bestehen informiere
+bitte den Webmaster darüber.<br>
+<br>
+<b>Mögliche Gründe</b><br>
+<ul>
+<li>Die Seite wurde aus Wartungsgründen entfernt</li>
+<li>Ein Link im Menü wurde falsch gesetzt</li>
+<li>Du hast eine falsche oder ungültige URL erhalten (extern)</li>
+</ul>
+<?foot();?>
+
diff --git a/adminforce/content/interfacebanner/admin.php b/adminforce/content/interfacebanner/admin.php
new file mode 100644
index 0000000000000000000000000000000000000000..84c5a0bbc20ec1e1863eef173c580db721476ff4
--- /dev/null
+++ b/adminforce/content/interfacebanner/admin.php
@@ -0,0 +1,33 @@
+<?head("Admin ForcedBanner");?>
+<?
+if (!isset($_GET['tan'])) $_GET['tan'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['tan']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE tan='".$_GET['tan']."' and sponsor='administrator' LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor='administrator' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>TAN:</b>&nbsp;'.$anzeigen['tan'].'</td>
+    <td align="center" width="50%"><b>Vergütung:</b>&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="left" colspan="2"><br><b>Ziel:</b> <a href="'.$anzeigen['ziel'].'">'.$anzeigen['ziel'].'</a> <br><b>Banner:</b> <a href="'.$anzeigen['banner'].'">'.$anzeigen['banner'].'</a><br><br></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>Reload:</b>&nbsp;'. $anzeigen['reload']/3600 .'h  <b>Rest:</b>&nbsp;'.number_format($anzeigen['menge'],0,",",".").' Klicks</td>
+    <td align="center" width="50%"><a href="?content=/interfacebanner/admin&amp;loeschen=true&amp;tan='.$anzeigen['tan'].'" target="_self">Löschen</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
+
diff --git a/adminforce/content/interfacebanner/blacklist.php b/adminforce/content/interfacebanner/blacklist.php
new file mode 100644
index 0000000000000000000000000000000000000000..8482503ef9ae048e13b49991a3f761f0d3625681
--- /dev/null
+++ b/adminforce/content/interfacebanner/blacklist.php
@@ -0,0 +1,35 @@
+<?head("ForcedBanner Blacklist");?>
+<?
+if (!isset($_GET['kid'])) $_GET['kid'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+if (!isset($_GET['blacklist'])) $_GET['blacklist'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['kid']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE kid='".$_GET['kid']."' and status = '2' and sponsor='".$_GET['sponsor']."' LIMIT 1");
+}
+if ($_GET['blacklist']=='true' && $_GET['kid']) {
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1' WHERE kid='".$_GET['kid']."' and sponsor='".$_GET['sponsor']."'  LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE werbeart = 'forcedbanner' and status = '2' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+<td align="center" width="50%">TAN:&nbsp;'.$anzeigen['tan'].'<br>KID:&nbsp;'.$anzeigen['kid'].' ('.$anzeigen['sponsor'].')</td>
+<td align="center" width="50%">Bet:&nbsp;'.number_format($anzeigen['preis'],2,",",".").' / User:&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="center" colspan="2"><a href="'.$anzeigen['ziel'].'" target="_blank"><img alt="Sponsorenbanner" src="'.$anzeigen['banner'].'" border="0" width="468" height="60"></a></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="center" width="50%">Reload:&nbsp;'. $anzeigen['reload']/3600 .' Std. / Rest:&nbsp;'.number_format($anzeigen['menge'],0,",",".").'</td>
+<td align="center" width="50%"><a href="?content=/interfacebanner/blacklist&amp;sponsor='.$anzeigen['sponsor'].'&amp;loeschen=true&amp;kid='.$anzeigen['kid'].'" target="_self">Löschen</a>  <a href="?content=/interfacebanner/blacklist&amp;sponsor='.$anzeigen['sponsor'].'&amp;blacklist=true&amp;kid='.$anzeigen['kid'].'" target="_self">Löschen-Blacklist</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
diff --git a/adminforce/content/interfacebanner/fuco-ads.php b/adminforce/content/interfacebanner/fuco-ads.php
new file mode 100644
index 0000000000000000000000000000000000000000..7644ef7e60870341f546b943f50e1d9cbd9d769c
--- /dev/null
+++ b/adminforce/content/interfacebanner/fuco-ads.php
@@ -0,0 +1,35 @@
+<?head("FuCo-Ads ForcedBanner");?>
+<?
+if (!isset($_GET['kid'])) $_GET['kid'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+if (!isset($_GET['blacklist'])) $_GET['blacklist'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['kid']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE kid='".$_GET['kid']."' and sponsor='fuco-ads'  LIMIT 1");
+}
+if ($_GET['blacklist']=='true' && $_GET['kid']) {
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '2' WHERE kid='".$_GET['kid']."' and sponsor='fuco-ads'  LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor='fuco-ads' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>TAN:</b>&nbsp;'.$anzeigen['tan'].'</td>
+    <td align="center" width="50%"><b>Vergütung:</b>&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="left" colspan="2"><br><b>Ziel:</b> <a href="'.$anzeigen['ziel'].'">'.$anzeigen['ziel'].'</a> <br><b>Banner:</b> <a href="'.$anzeigen['banner'].'">'.$anzeigen['banner'].'</a><br><br></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>Reload:</b>&nbsp;'. $anzeigen['reload']/3600 .'h  <b>Rest:</b>&nbsp;'.number_format($anzeigen['menge'],0,",",".").' Klicks</td>
+    <td align="center" width="50%"><a href="?content=/interfacebanner/fuco-ads&amp;loeschen=true&amp;tan='.$anzeigen['tan'].'" target="_self">Löschen</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
diff --git a/adminforce/content/interfacebanner/fucoex.php b/adminforce/content/interfacebanner/fucoex.php
new file mode 100644
index 0000000000000000000000000000000000000000..0b93fbad907b353a19820804284bfa8f9c4a47a7
--- /dev/null
+++ b/adminforce/content/interfacebanner/fucoex.php
@@ -0,0 +1,35 @@
+<?head("FuCoEx ForcedBanner");?>
+<?
+if (!isset($_GET['kid'])) $_GET['kid'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+if (!isset($_GET['blacklist'])) $_GET['blacklist'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['kid']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE kid='".$_GET['kid']."' and sponsor='fucoex'  LIMIT 1");
+}
+if ($_GET['blacklist']=='true' && $_GET['kid']) {
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '2' WHERE kid='".$_GET['kid']."' and sponsor='fucoex'  LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor='fucoex' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>TAN:</b>&nbsp;'.$anzeigen['tan'].'</td>
+    <td align="center" width="50%"><b>Vergütung:</b>&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="left" colspan="2"><br><b>Ziel:</b> <a href="'.$anzeigen['ziel'].'">'.$anzeigen['ziel'].'</a> <br><b>Banner:</b> <a href="'.$anzeigen['banner'].'">'.$anzeigen['banner'].'</a><br><br></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>Reload:</b>&nbsp;'. $anzeigen['reload']/3600 .'h  <b>Rest:</b>&nbsp;'.number_format($anzeigen['menge'],0,",",".").' Klicks</td>
+    <td align="center" width="50%"><a href="?content=/interfacebanner/fucoex&amp;loeschen=true&amp;tan='.$anzeigen['tan'].'" target="_self">Löschen</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
diff --git a/adminforce/content/interfacebanner/hp-lose.php b/adminforce/content/interfacebanner/hp-lose.php
new file mode 100644
index 0000000000000000000000000000000000000000..5a8c25faeacb30e45dd54d34f777fdd637eb789e
--- /dev/null
+++ b/adminforce/content/interfacebanner/hp-lose.php
@@ -0,0 +1,35 @@
+<?head("HP-Lose ForcedBanner");?>
+<?
+if (!isset($_GET['kid'])) $_GET['kid'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+if (!isset($_GET['blacklist'])) $_GET['blacklist'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['kid']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE kid='".$_GET['kid']."' and sponsor='hp-lose' LIMIT 1");
+}
+if ($_GET['blacklist']=='true' && $_GET['kid']) {
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '2' WHERE kid='".$_GET['kid']."' and sponsor='hp-lose' LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor='hp-lose' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>TAN:</b>&nbsp;'.$anzeigen['tan'].'</td>
+    <td align="center" width="50%"><b>Vergütung:</b>&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="left" colspan="2"><br><b>Ziel:</b> <a href="'.$anzeigen['ziel'].'">'.$anzeigen['ziel'].'</a> <br><b>Banner:</b> <a href="'.$anzeigen['banner'].'">'.$anzeigen['banner'].'</a><br><br></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>Reload:</b>&nbsp;'. $anzeigen['reload']/3600 .'h  <b>Rest:</b>&nbsp;'.number_format($anzeigen['menge'],0,",",".").' Klicks</td>
+    <td align="center" width="50%"><a href="?content=/interfacebanner/hp-lose&amp;loeschen=true&amp;tan='.$anzeigen['tan'].'" target="_self">Löschen</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
diff --git a/adminforce/content/interfacebanner/lose-ads.php b/adminforce/content/interfacebanner/lose-ads.php
new file mode 100644
index 0000000000000000000000000000000000000000..3cb8c031330fcebb78e8ea878e70e1ba386caecc
--- /dev/null
+++ b/adminforce/content/interfacebanner/lose-ads.php
@@ -0,0 +1,35 @@
+<?head("Lose-Ads ForcedBanner");?>
+<?
+if (!isset($_GET['kid'])) $_GET['kid'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+if (!isset($_GET['blacklist'])) $_GET['blacklist'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['kid']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE kid='".$_GET['kid']."' and sponsor='lose-ads' LIMIT 1");
+}
+if ($_GET['blacklist']=='true' && $_GET['kid']) {
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '2' WHERE kid='".$_GET['kid']."' and sponsor='lose-ads' LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor='lose-ads' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>TAN:</b>&nbsp;'.$anzeigen['tan'].'</td>
+    <td align="center" width="50%"><b>Vergütung:</b>&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="left" colspan="2"><br><b>Ziel:</b> <a href="'.$anzeigen['ziel'].'">'.$anzeigen['ziel'].'</a> <br><b>Banner:</b> <a href="'.$anzeigen['banner'].'">'.$anzeigen['banner'].'</a><br><br></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>Reload:</b>&nbsp;'. $anzeigen['reload']/3600 .'h  <b>Rest:</b>&nbsp;'.number_format($anzeigen['menge'],0,",",".").' Klicks</td>
+    <td align="center" width="50%"><a href="?content=/interfacebanner/lose-ads&amp;loeschen=true&amp;tan='.$anzeigen['tan'].'" target="_self">Löschen</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
diff --git a/adminforce/content/interfacebanner/losebox.php b/adminforce/content/interfacebanner/losebox.php
new file mode 100644
index 0000000000000000000000000000000000000000..4bad69def3bfecf6939deef27ca40676bbc200a1
--- /dev/null
+++ b/adminforce/content/interfacebanner/losebox.php
@@ -0,0 +1,35 @@
+<?head("Losebox ForcedBanner");?>
+<?
+if (!isset($_GET['kid'])) $_GET['kid'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+if (!isset($_GET['blacklist'])) $_GET['blacklist'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['kid']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE kid='".$_GET['kid']."' and sponsor='losebox' LIMIT 1");
+}
+if ($_GET['blacklist']=='true' && $_GET['kid']) {
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '2' WHERE kid='".$_GET['kid']."' and sponsor='losebox' LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor='losebox' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>TAN:</b>&nbsp;'.$anzeigen['tan'].'</td>
+    <td align="center" width="50%"><b>Vergütung:</b>&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="left" colspan="2"><br><b>Ziel:</b> <a href="'.$anzeigen['ziel'].'">'.$anzeigen['ziel'].'</a> <br><b>Banner:</b> <a href="'.$anzeigen['banner'].'">'.$anzeigen['banner'].'</a><br><br></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>Reload:</b>&nbsp;'. $anzeigen['reload']/3600 .'h  <b>Rest:</b>&nbsp;'.number_format($anzeigen['menge'],0,",",".").' Klicks</td>
+    <td align="center" width="50%"><a href="?content=/interfacebanner/losebox&amp;loeschen=true&amp;tan='.$anzeigen['tan'].'" target="_self">Löschen</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
diff --git a/adminforce/content/interfacebanner/webmasterlose.php b/adminforce/content/interfacebanner/webmasterlose.php
new file mode 100644
index 0000000000000000000000000000000000000000..c4a1d166b4b15c2ac0fc452a9be9e404b906991e
--- /dev/null
+++ b/adminforce/content/interfacebanner/webmasterlose.php
@@ -0,0 +1,35 @@
+<?head("Webmasterlose ForcedBanner");?>
+<?
+if (!isset($_GET['kid'])) $_GET['kid'] = '';
+if (!isset($_GET['loeschen'])) $_GET['loeschen'] = '';
+if (!isset($_GET['blacklist'])) $_GET['blacklist'] = '';
+
+if ($_GET['loeschen']=='true' && $_GET['kid']) {
+db_query("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE kid='".$_GET['kid']."' and sponsor='webmasterlose' LIMIT 1");
+}
+if ($_GET['blacklist']=='true' && $_GET['kid']) {
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '2' WHERE kid='".$_GET['kid']."' and sponsor='webmasterlose' LIMIT 1");
+}
+
+$forcedbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor='webmasterlose' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC");
+while ($anzeigen = mysql_fetch_array($forcedbanner)) {
+echo '
+<table width="100%" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>TAN:</b>&nbsp;'.$anzeigen['tan'].'</td>
+    <td align="center" width="50%"><b>Vergütung:</b>&nbsp;'.number_format($anzeigen['verdienst'],2,",",".").'</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="left" colspan="2"><br><b>Ziel:</b> <a href="'.$anzeigen['ziel'].'">'.$anzeigen['ziel'].'</a> <br><b>Banner:</b> <a href="'.$anzeigen['banner'].'">'.$anzeigen['banner'].'</a><br><br></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td align="center" width="50%"><b>Reload:</b>&nbsp;'. $anzeigen['reload']/3600 .'h  <b>Rest:</b>&nbsp;'.number_format($anzeigen['menge'],0,",",".").' Klicks</td>
+    <td align="center" width="50%"><a href="?content=/interfacebanner/webmasterlose&amp;loeschen=true&amp;tan='.$anzeigen['tan'].'" target="_self">Löschen</a></td>
+</tr>
+</table>
+<br>
+';
+}
+?>
+<?foot();?>
+
diff --git a/adminforce/content/interfacedaten/betreiber.php b/adminforce/content/interfacedaten/betreiber.php
new file mode 100644
index 0000000000000000000000000000000000000000..5d9d9594bfad5ff02226c72a449295df1ca3e9b5
--- /dev/null
+++ b/adminforce/content/interfacedaten/betreiber.php
@@ -0,0 +1,55 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['betreiber_id'])) $_POST['betreiber_id'] = '';
+if (!isset($_POST['betreiber_passwort'])) $_POST['betreiber_passwort'] = '';
+if (!isset($_POST['betreiber_kennung'])) $_POST['betreiber_kennung'] = '';
+if (!isset($_POST['schnittstelle'])) $_POST['schnittstelle'] = '';
+if (!isset($_POST['einzahltext'])) $_POST['einzahltext'] = '';
+if (!isset($_POST['auszahltext'])) $_POST['auszahltext'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_schnittstelle SET betreiber_id='".$_POST['betreiber_id']."', betreiber_passwort='".$_POST['betreiber_passwort']."', betreiber_kennung='".$_POST['betreiber_kennung']."', schnittstelle='".$_POST['schnittstelle']."', einzahltext='".$_POST['einzahltext']."', auszahltext='".$_POST['auszahltext']."', einzahlsumme='".$_POST['einzahlsumme']."', auszahlsumme='".$_POST['auszahlsumme']."', anfragen_tag='".$_POST['anfragen_tag']."', anfragen_user='".$_POST['anfragen_user']."'  LIMIT 1");
+}
+
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_schnittstelle LIMIT 1"));
+?>
+<? head("Interfacedaten Betreiber (EF²,FuCoEx² usw.)"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+    <td align="left" width="55%">Betreiber-ID</td><td align="left"><input type="Text" name="betreiber_id" value="<?=$interface['betreiber_id'];?>" style="width:180px;"></td>
+</tr>
+<tr>
+    <td align="left">Betreiberpasswort</td><td align="left"><input type="Text" name="betreiber_passwort" value="<?=$interface['betreiber_passwort'];?>" style="width:180px;"></td>
+</tr>
+<tr>
+    <td align="left">Betreiberkennung<br><i>Kennung nur bei EF²</i></td><td align="left"><input type="Text" name="betreiber_kennung" value="<?=$interface['betreiber_kennung'];?>" style="width:180px;"></td>
+</tr>
+<tr>
+    <td align="left">Schnittstelle<br><i>Dateiname der Schnittstelle</i></td><td align="left"><input type="Text" name="schnittstelle" value="<?=$interface['schnittstelle'];?>" style="width:180px;">.php                            
+</td>
+</tr>
+<tr>
+    <td align="left">Einzahltext<br><i>Max. 40 Zeichen</i></td><td align="left"><input type="Text" name="einzahltext" value="<?=$interface['einzahltext'];?>"  style="width:180px;" maxlength="40"></td>
+</tr>
+<tr>
+    <td align="left">Auszahltext<br><i>Max. 40 Zeichen</i></td><td align="left"><input type="Text" name="auszahltext" value="<?=$interface['auszahltext'];?>" style="width:180px;" maxlength="40"></td>
+</tr>
+<tr>
+    <td align="left">Minimum Einzahlsumme<br><i>0 = Ohne Einschränkung</i></td><td align="left"><input type="Text" name="einzahlsumme" value="<?=$interface['einzahlsumme'];?>" style="width:180px;" maxlength="40"></td>
+</tr>
+<tr>
+    <td align="left">Minimum Auszahlsumme<br><i>0 = Ohne Einschränkung</i></td><td align="left"><input type="Text" name="auszahlsumme" value="<?=$interface['auszahlsumme'];?>" style="width:180px;" maxlength="40"></td>
+</tr>
+<tr>
+    <td align="left">Max. Schnittstellenanfragen (Tag)<br><i>0 = Ohne Einschränkung<br>Nur für Anmeldungen</i></td><td align="left"><input type="Text" name="anfragen_tag" value="<?=$interface['anfragen_tag'];?>" style="width:180px;" maxlength="40"></td>
+</tr>
+<tr>
+    <td align="left">Max. Schnittstellenanfragen (User)<br><i>0 = Ohne Einschränkung<br>Nur Ein./Auszahlungen</i></td><td align="left"><input type="Text" name="anfragen_user" value="<?=$interface['anfragen_user'];?>" style="width:180px;" maxlength="40"></td>
+</tr>
+<tr>
+    <td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/interfacedaten/crons.php b/adminforce/content/interfacedaten/crons.php
new file mode 100644
index 0000000000000000000000000000000000000000..d83dc7049f5108bd2cc70baf4d49c9f6f3fc3646
--- /dev/null
+++ b/adminforce/content/interfacedaten/crons.php
@@ -0,0 +1,33 @@
+<? head("Crons (Übersicht und manuell Start)");?>
+<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#c0c0c0">
+<tr class="tr_head">
+    <td align="center"><b>Cron</b></td>
+    <td align="center"><b>Laufzeit</b></td>
+    <td align="center">URL</td>
+</tr>
+<?
+$crons = db_query("SELECT * FROM ".$db_prefix."_crons");
+while ($crontabelle = mysql_fetch_array($crons)) {
+$i++;
+$row = ($i % 2 == 0) ? 0 : 1;
+
+echo '
+<tr class="tr_row'.$row.'">
+    <td valign="middle"><b>'.$crontabelle['bezeichnung'].'</b><br>
+        <i>ID: '.$crontabelle['id'].'</i>
+    </td>
+    
+    <td align="center" valign="middle">
+    <font color="#000080">'.date("d.m.Y - H:i:s",$crontabelle['laufzeit']).'</font>
+    </td>
+   
+    <td align="center" valign="middle">
+    <a href="../cron.php?id='.$crontabelle['id'].'&amp;pw='.$cron_pw.'" target="_blank"><img src="images/gruen.gif" width="15" height="15" border="0" alt="Ausführen"></a>
+    </td>
+
+</tr>
+';
+}
+?>
+</table>
+<? foot(); ?>
diff --git a/adminforce/content/interfacedaten/fuco-ads.php b/adminforce/content/interfacedaten/fuco-ads.php
new file mode 100644
index 0000000000000000000000000000000000000000..d6dc47083f6b029424db3f5e1c189716f1362f2c
--- /dev/null
+++ b/adminforce/content/interfacedaten/fuco-ads.php
@@ -0,0 +1,56 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['betreiber'])) $_POST['betreiber'] = '';
+if (!isset($_POST['seite'])) $_POST['seite'] = '';
+if (!isset($_POST['pass'])) $_POST['pass'] = '';
+if (!isset($_POST['eigenverdienst'])) $_POST['eigenverdienst'] = '';
+if (!isset($_POST['min_verguetung'])) $_POST['min_verguetung'] = '';
+if (!isset($_POST['restklicks'])) $_POST['restklicks'] = '';
+if (!isset($_POST['umrechnung'])) $_POST['umrechnung'] = '';
+if (!isset($_POST['aufendhalt'])) $_POST['aufendhalt'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_interface SET surfview='".$_POST['surfview']."',surfklick='".$_POST['surfklick']."',betreiber='".$_POST['betreiber']."', seite='".$_POST['seite']."', pass='".$_POST['pass']."', eigenverdienst='".$_POST['eigenverdienst']."', mindestverguetung='".$_POST['min_verguetung']."', restklicks='".$_POST['restklicks']."', umrechnung='".$_POST['umrechnung']."', aufendhalt='".$_POST['aufendhalt']."' WHERE interface='fuco-ads'");
+}
+
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface='fuco-ads' LIMIT 1"));
+?>
+<? head("Interfacedaten (FuCo-Ads.de)"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Betreiber-ID</td><td align="left"><input type="Text" name="betreiber" value="<?=$interface['betreiber'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Seiten-ID</td><td align="left"><input type="Text" name="seite" value="<?=$interface['seite'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Schnittstellen Passwort</td><td align="left"><input type="Text" name="pass" value="<?=$interface['pass'];?>" style="width:150px;"></td>
+</tr>
+<tr>
+<td align="left">Eigenverdienst in Prozent<br><i>Bitte Refverdienste bedenken</i></td><td align="left"><input type="Text" name="eigenverdienst" value="<?=$interface['eigenverdienst'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="min_verguetung" value="<?=$interface['mindestverguetung'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i><b>Surfview</b> (0=deaktiv)</i></td><td align="left"><input type="Text" name="surfview" value="<?=$interface['surfview'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i><b>Surfklick</b> (0=deaktiv)</i></td><td align="left"><input type="Text" name="surfklick" value="<?=$interface['surfklick'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Wieviel % sollen eingebucht werden?</td><td align="left"><input type="Text" name="restklicks" value="<?=$interface['restklicks'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Umrechnung<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="umrechnung" value="<?=$interface['umrechnung'];?>" style="width:50px;"> <b>Punkt statt Komma</b></td>
+</tr>
+<tr>
+<td align="left">Aufendhalt in Sek. für den User</td><td align="left"><input type="Text" name="aufendhalt" value="<?=$interface['aufendhalt'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/interfacedaten/fucoex.php b/adminforce/content/interfacedaten/fucoex.php
new file mode 100644
index 0000000000000000000000000000000000000000..35a87ecdf2e63e89c90a73170b57f64bd978f984
--- /dev/null
+++ b/adminforce/content/interfacedaten/fucoex.php
@@ -0,0 +1,49 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['betreiber'])) $_POST['betreiber'] = '';
+if (!isset($_POST['seite'])) $_POST['seite'] = '';
+if (!isset($_POST['eigenverdienst'])) $_POST['eigenverdienst'] = '';
+if (!isset($_POST['min_verguetung'])) $_POST['min_verguetung'] = '';
+if (!isset($_POST['restklicks'])) $_POST['restklicks'] = '';
+if (!isset($_POST['umrechnung'])) $_POST['umrechnung'] = '';
+if (!isset($_POST['aufendhalt'])) $_POST['aufendhalt'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_interface SET betreiber='".$_POST['betreiber']."',pass='".$_POST['pass']."', seite='".$_POST['seite']."', eigenverdienst='".$_POST['eigenverdienst']."', mindestverguetung='".$_POST['min_verguetung']."', restklicks='".$_POST['restklicks']."', umrechnung='".$_POST['umrechnung']."', aufendhalt='".$_POST['aufendhalt']."' WHERE interface='fucoex'");
+}
+
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface='fucoex' LIMIT 1"));
+?>
+<? head("Interfacedaten (Fucoex)"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Betreiber-ID</td><td align="left"><input type="Text" name="betreiber" value="<?=$interface['betreiber'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Seiten-ID</td><td align="left"><input type="Text" name="seite" value="<?=$interface['seite'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Schnittstellen Passwort</td><td align="left"><input type="Text" name="pass" value="<?=$interface['pass'];?>" style="width:150px;"></td>
+</tr>
+<tr>
+<td align="left">Eigenverdienst in Prozent<br><i>Bitte Refverdienste bedenken</i></td><td align="left"><input type="Text" name="eigenverdienst" value="<?=$interface['eigenverdienst'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="min_verguetung" value="<?=$interface['mindestverguetung'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Wieviel % sollen eingebucht werden?</td><td align="left"><input type="Text" name="restklicks" value="<?=$interface['restklicks'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Umrechnung<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="umrechnung" value="<?=$interface['umrechnung'];?>" style="width:50px;"> <b>Punkt statt Komma</b></td>
+</tr>
+<tr>
+<td align="left">Aufendhalt in Sek. für den User</td><td align="left"><input type="Text" name="aufendhalt" value="<?=$interface['aufendhalt'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/interfacedaten/hp-lose.php b/adminforce/content/interfacedaten/hp-lose.php
new file mode 100644
index 0000000000000000000000000000000000000000..62bdd3d6ec0b822aaafce608f3bbd2b8fbd1aaa6
--- /dev/null
+++ b/adminforce/content/interfacedaten/hp-lose.php
@@ -0,0 +1,46 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['betreiber'])) $_POST['betreiber'] = '';
+if (!isset($_POST['seite'])) $_POST['seite'] = '';
+if (!isset($_POST['eigenverdienst'])) $_POST['eigenverdienst'] = '';
+if (!isset($_POST['min_verguetung'])) $_POST['min_verguetung'] = '';
+if (!isset($_POST['restklicks'])) $_POST['restklicks'] = '';
+if (!isset($_POST['umrechnung'])) $_POST['umrechnung'] = '';
+if (!isset($_POST['aufendhalt'])) $_POST['aufendhalt'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_interface SET betreiber='".$_POST['betreiber']."', seite='".$_POST['seite']."', eigenverdienst='".$_POST['eigenverdienst']."', mindestverguetung='".$_POST['min_verguetung']."', restklicks='".$_POST['restklicks']."', umrechnung='".$_POST['umrechnung']."', aufendhalt='".$_POST['aufendhalt']."' WHERE interface='hp-lose'");
+}
+
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface='hp-lose' LIMIT 1"));
+?>
+<? head("Interfacedaten (HP-Lose.de)"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Betreiber-ID</td><td align="left"><input type="Text" name="betreiber" value="<?=$interface['betreiber'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Seiten-ID</td><td align="left"><input type="Text" name="seite" value="<?=$interface['seite'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Eigenverdienst in Prozent<br><i>Bitte Refverdienste bedenken</i></td><td align="left"><input type="Text" name="eigenverdienst" value="<?=$interface['eigenverdienst'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="min_verguetung" value="<?=$interface['mindestverguetung'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Wieviel % sollen eingebucht werden?</td><td align="left"><input type="Text" name="restklicks" value="<?=$interface['restklicks'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Umrechnung<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="umrechnung" value="<?=$interface['umrechnung'];?>" style="width:50px;"> <b>Punkt statt Komma</b></td>
+</tr>
+<tr>
+<td align="left">Aufendhalt in Sek. für den User</td><td align="left"><input type="Text" name="aufendhalt" value="<?=$interface['aufendhalt'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/interfacedaten/lose-ads.php b/adminforce/content/interfacedaten/lose-ads.php
new file mode 100644
index 0000000000000000000000000000000000000000..78fde2b333fb709493afa31418e2678fd4967b76
--- /dev/null
+++ b/adminforce/content/interfacedaten/lose-ads.php
@@ -0,0 +1,46 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['betreiber'])) $_POST['betreiber'] = '';
+if (!isset($_POST['seite'])) $_POST['seite'] = '';
+if (!isset($_POST['eigenverdienst'])) $_POST['eigenverdienst'] = '';
+if (!isset($_POST['min_verguetung'])) $_POST['min_verguetung'] = '';
+if (!isset($_POST['restklicks'])) $_POST['restklicks'] = '';
+if (!isset($_POST['umrechnung'])) $_POST['umrechnung'] = '';
+if (!isset($_POST['aufendhalt'])) $_POST['aufendhalt'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_interface SET betreiber='".$_POST['betreiber']."', seite='".$_POST['seite']."', eigenverdienst='".$_POST['eigenverdienst']."', mindestverguetung='".$_POST['min_verguetung']."', restklicks='".$_POST['restklicks']."', umrechnung='".$_POST['umrechnung']."', aufendhalt='".$_POST['aufendhalt']."' WHERE interface='lose-ads'");
+}
+
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface='lose-ads' LIMIT 1"));
+?>
+<? head("Interfacedaten (Lose-Ads.de)"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Betreiber-ID</td><td align="left"><input type="Text" name="betreiber" value="<?=$interface['betreiber'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Seiten-ID</td><td align="left"><input type="Text" name="seite" value="<?=$interface['seite'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Eigenverdienst in Prozent<br><i>Bitte Refverdienste bedenken</i></td><td align="left"><input type="Text" name="eigenverdienst" value="<?=$interface['eigenverdienst'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="min_verguetung" value="<?=$interface['mindestverguetung'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Wieviel % sollen eingebucht werden?</td><td align="left"><input type="Text" name="restklicks" value="<?=$interface['restklicks'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Umrechnung<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="umrechnung" value="<?=$interface['umrechnung'];?>" style="width:50px;"> <b>Punkt statt Komma</b></td>
+</tr>
+<tr>
+<td align="left">Aufendhalt in Sek. für den User</td><td align="left"><input type="Text" name="aufendhalt" value="<?=$interface['aufendhalt'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/interfacedaten/losebox.php b/adminforce/content/interfacedaten/losebox.php
new file mode 100644
index 0000000000000000000000000000000000000000..a0596804e347ba0a1f4f8805e1d2de6b10dc4b04
--- /dev/null
+++ b/adminforce/content/interfacedaten/losebox.php
@@ -0,0 +1,46 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['betreiber'])) $_POST['betreiber'] = '';
+if (!isset($_POST['seite'])) $_POST['seite'] = '';
+if (!isset($_POST['eigenverdienst'])) $_POST['eigenverdienst'] = '';
+if (!isset($_POST['min_verguetung'])) $_POST['min_verguetung'] = '';
+if (!isset($_POST['restklicks'])) $_POST['restklicks'] = '';
+if (!isset($_POST['umrechnung'])) $_POST['umrechnung'] = '';
+if (!isset($_POST['aufendhalt'])) $_POST['aufendhalt'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_interface SET betreiber='".$_POST['betreiber']."', seite='".$_POST['seite']."', eigenverdienst='".$_POST['eigenverdienst']."', mindestverguetung='".$_POST['min_verguetung']."', restklicks='".$_POST['restklicks']."', umrechnung='".$_POST['umrechnung']."', aufendhalt='".$_POST['aufendhalt']."' WHERE interface='losebox'");
+}
+
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface='losebox' LIMIT 1"));
+?>
+<? head("Interfacedaten (Losebox.de)"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Betreiber-ID</td><td align="left"><input type="Text" name="betreiber" value="<?=$interface['betreiber'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Seiten-ID</td><td align="left"><input type="Text" name="seite" value="<?=$interface['seite'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Eigenverdienst in Prozent<br><i>Bitte Refverdienste bedenken</i></td><td align="left"><input type="Text" name="eigenverdienst" value="<?=$interface['eigenverdienst'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="min_verguetung" value="<?=$interface['mindestverguetung'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Wieviel % sollen eingebucht werden?</td><td align="left"><input type="Text" name="restklicks" value="<?=$interface['restklicks'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Umrechnung<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="umrechnung" value="<?=$interface['umrechnung'];?>" style="width:50px;"> <b>Punkt statt Komma</b></td>
+</tr>
+<tr>
+<td align="left">Aufendhalt in Sek. für den User</td><td align="left"><input type="Text" name="aufendhalt" value="<?=$interface['aufendhalt'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/interfacedaten/pageconfig.php b/adminforce/content/interfacedaten/pageconfig.php
new file mode 100644
index 0000000000000000000000000000000000000000..826e7369060fd314c4287133fc11282ede134d2b
--- /dev/null
+++ b/adminforce/content/interfacedaten/pageconfig.php
@@ -0,0 +1,78 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_seitenkonfig SET 
+                 denied_domains='".$_POST['denied_domains']."', 
+                 wartung='".$_POST['wartung']."', 
+                 einzahlgrenze='".$_POST['einzahlgrenze']."', 
+                 re1='".$_POST['re1']."', 
+                 re2='".$_POST['re2']."', 
+                 re3='".$_POST['re3']."', 
+                 min_betteln = '".$_POST['min_betteln']."', 
+                 max_betteln = '".$_POST['max_betteln']."', 
+                 reload_betteln = '".$_POST['reload_betteln']."'
+                 admin_name='".$_POST['admin_name']."', 
+                 admin_pass='".$_POST['admin_pass']."'                  
+LIMIT 1");
+}
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_seitenkonfig LIMIT 1"));
+?>
+
+<? head("Webseiteneinstellungen"); ?>
+<form action="" method="post">
+<table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>Wartungsmodus</b><br><i>Wartungstext muss bearbeitet werden!</i></td>
+<td align="left">&nbsp;<select name="wartung">
+	<option value="0" <?if ($interface['wartung'] == 0) echo 'SELECTED';?>>Deaktiviert&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
+	<option value="1" <?if ($interface['wartung'] == 1) echo 'SELECTED';?>>Aktiviert</option>
+</select>
+</td>
+</tr>
+<tr bgcolor="#f5f5f5">
+<td align="left"><b>Einzahlgrenze</b><br><i>Max. Guthaben pro User!</i></td>
+<td align="left">&nbsp;<input type="Text" name="einzahlgrenze" value="<?=$interface['einzahlgrenze'];?>"> Nur Ganzzahlen</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>Refebene 1</b><br><i>Angaben in Prozent!</i></td>
+<td align="left">&nbsp;<input type="Text" name="re1" value="<?=$interface['re1'];?>"> Punkt statt Komma</td>
+</tr>
+<tr bgcolor="#f5f5f5">
+<td align="left"><b>Refebene 2</b><br><i>Angaben in Prozent!</i></td>
+<td align="left">&nbsp;<input type="Text" name="re2" value="<?=$interface['re2'];?>"> Punkt statt Komma</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>Refebene 3</b><br><i>Angaben in Prozent!</i></td>
+<td align="left">&nbsp;<input type="Text" name="re3" value="<?=$interface['re3'];?>"> Punkt statt Komma</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>min. Verdienst (Bettelaufruf)</b></td>
+<td align="left">&nbsp;<input type="Text" name="min_betteln" value="<?=$interface['min_betteln'];?>"> Punkt statt Komma</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>max. Verdienst (Bettelaufruf)</b></td>
+<td align="left">&nbsp;<input type="Text" name="max_betteln" value="<?=$interface['max_betteln'];?>"> Punkt statt Komma</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>Reloadzeit (Bettelaufruf)</b><br><i>Angaben in Sekunden (3600 = 1 Stunde) (0 = Bettellink deaktiviert)</i></td>
+<td align="left">&nbsp;<input type="Text" name="reload_betteln" value="<?=$interface['reload_betteln'];?>"> Nur Ganzzahlen</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>Nicht erlaubte eMail-Domains</b><br><i>(Durch ; getrennt)</i></td>
+<td align="left">&nbsp;<input type="Text" name="denied_domains" value="<?=$interface['denied_domains'];?>"></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>Loginname (Adminforce)</b></td>
+<td align="left">&nbsp;<input type="Text" name="admin_name" value="<?=$interface['admin_name'];?>"></td>
+</tr>
+<tr bgcolor="#f0f0f0">
+<td align="left"><b>Passwort (Adminforce)</b></td>
+<td align="left">&nbsp;<input type="Text" name="admin_pass" value="<?=$interface['admin_pass'];?>"></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/interfacedaten/webmasterlose.php b/adminforce/content/interfacedaten/webmasterlose.php
new file mode 100644
index 0000000000000000000000000000000000000000..c8d00aed8ede700191109951de76fca2f2b65a7f
--- /dev/null
+++ b/adminforce/content/interfacedaten/webmasterlose.php
@@ -0,0 +1,50 @@
+<?
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['betreiber'])) $_POST['betreiber'] = '';
+if (!isset($_POST['pass'])) $_POST['pass'] = '';
+if (!isset($_POST['seite'])) $_POST['seite'] = '';
+if (!isset($_POST['eigenverdienst'])) $_POST['eigenverdienst'] = '';
+if (!isset($_POST['min_verguetung'])) $_POST['min_verguetung'] = '';
+if (!isset($_POST['restklicks'])) $_POST['restklicks'] = '';
+if (!isset($_POST['umrechnung'])) $_POST['umrechnung'] = '';
+if (!isset($_POST['aufendhalt'])) $_POST['aufendhalt'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+db_query("UPDATE ".$db_prefix."_interface SET betreiber='".$_POST['betreiber']."', seite='".$_POST['seite']."',pass='".$_POST['pass']."', eigenverdienst='".$_POST['eigenverdienst']."', mindestverguetung='".$_POST['min_verguetung']."', restklicks='".$_POST['restklicks']."', umrechnung='".$_POST['umrechnung']."', aufendhalt='".$_POST['aufendhalt']."' WHERE interface='webmasterlose'");
+}
+
+$interface = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface='webmasterlose' LIMIT 1"));
+?>
+<? head("Interfacedaten (Webmasterlose.de)"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Betreiber-ID</td><td align="left"><input type="Text" name="betreiber" value="<?=$interface['betreiber'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Seiten-ID</td><td align="left"><input type="Text" name="seite" value="<?=$interface['seite'];?>" style="width:50px;"></td>
+</tr>
+<tr>
+<td align="left">Schnittstellen Passwort</td><td align="left"><input type="Text" name="pass" value="<?=$interface['pass'];?>" style="width:150px;"></td>
+</tr>
+<tr>
+<td align="left">Eigenverdienst in Prozent<br><i>Bitte Refverdienste bedenken</i></td><td align="left"><input type="Text" name="eigenverdienst" value="<?=$interface['eigenverdienst'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Mindestvergütung bei den Sponsoren<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="min_verguetung" value="<?=$interface['mindestverguetung'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Wieviel % sollen eingebucht werden?</td><td align="left"><input type="Text" name="restklicks" value="<?=$interface['restklicks'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="left">Umrechnung<br><i>Basierend auf die Sponsorenwährung</i></td><td align="left"><input type="Text" name="umrechnung" value="<?=$interface['umrechnung'];?>" style="width:50px;"> <b>Punkt statt Komma</b></td>
+</tr>
+<tr>
+<td align="left">Aufendhalt in Sek. für den User</td><td align="left"><input type="Text" name="aufendhalt" value="<?=$interface['aufendhalt'];?>" style="width:50px;"> <b>Ganzzahlen</b></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="updaten" value="Updaten !"></td>
+</tr>
+</table>
+</form>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/module.php b/adminforce/content/module.php
new file mode 100644
index 0000000000000000000000000000000000000000..6ed80bc1a82c680833586d3c1e9a2ec990ffe523
--- /dev/null
+++ b/adminforce/content/module.php
@@ -0,0 +1,42 @@
+<?
+$dir = '../module/';
+
+if (is_dir($dir) && $dh = opendir($dir)) {
+	head ('Modul&uuml;bersicht');
+?>
+Sie sehen hier eine Auflistung aller verf&uuml;gbaren Module. Um die Verwaltung der jeweiligen Module zu gelanden klicken Sie bitte auf das entsprechende Icon.<br />
+<br />
+<table width="100%" cellspacing=0 cellpadding=5 border=1 bordercolor="#4a4a4a" style="border-collapse: collapse;">
+<?
+	$i = 1;
+	while (($file = readdir ($dh)) !== false) {
+		if (is_dir ($dir.$file) && file_exists ($dir.$file.'/pref.ini') && $file != '.' && $file != '..') {
+			$modul = parse_ini_file ($dir.$file.'/pref.ini', TRUE);
+			$ico_endung = (file_exists ($dir.$file.'/icon.png')) ? 'png' : 'gif';
+			if ($i == 1 || ( $i % 4 ) == 0) echo '	<tr>'."\n";
+			echo '		<td width="25%" style="text-align: center;"><a href="javascript:ShowWindow(\'moduladmin.php?mod='.$file.'\');"><img src="'.$dir.$file.'/icon.'.$ico_endung.'" border="0" width="32" height="32" alt="" /><br />'.$modul['modul']['name'].'</a></td>'."\n";
+			if ( ( ( $i + 1 ) % 4 ) == 0 ) echo '	</tr>'."\n";
+			$i++;
+		}
+	}
+	closedir ($dh);
+
+	$uebrig = ( ( $i -1 ) % 4 );
+	if ( $uebrig != 0 ) {
+		for ($i=0;$i<(4-$uebrig);$i++) echo '		<td>&nbsp;</td>'."\n";
+		echo '	</tr>'."\n";
+	} ?>
+</table>
+<br />
+<br />
+<span style="font-weight: bold;">Nützlichens:</span><br />
+<a href="http://www.totaltoll.de/shop/docs/modulsystem.pdf" target="_blank">Manual zum Modulsystem (F&uuml;r Entwickler, Mirror 1)</a><br />
+<a href="http://www.designerscripte.net/downloads/docs/modulsystem.pdf" target="_blank">Manual zum Modulsystem (F&uuml;r Entwickler, Mirror 2)</a><br />
+<?
+	foot ();
+} else {
+	head ('Fataler Fehler');
+	echo 'Fehler: Modulverzeichnis '.$dir.' ist ung&uuml;ltig !';
+	foot ();
+}
+?>
\ No newline at end of file
diff --git a/adminforce/content/newssystem/news.php b/adminforce/content/newssystem/news.php
new file mode 100644
index 0000000000000000000000000000000000000000..cb9f6c235f4f0cc8bfc63d810dcfdc28058e440a
--- /dev/null
+++ b/adminforce/content/newssystem/news.php
@@ -0,0 +1,81 @@
+<?
+if (!isset($titel))			$titel			     = '';
+if (!isset($news))			$news			     = '';
+if (!isset($id))			$id                          = '0';
+if (!isset($_POST['auffuehren']))	$_POST['auffuehren']	     = '0';
+if (!isset($_POST['load']))		$_POST['load']		     = '0';
+if (!isset($_POST['loader']))		$_POST['loader']	     = '';
+if (!isset($_POST['newsletter']))        $_POST['newsletter']         = '';
+
+if ($_POST['auffuehren'] == 'Ausführen') {
+	if ($_POST['id'] == 0 ){
+		if ($_POST['art'] == 1 || $_POST['art'] == 2) db_query("INSERT INTO ".$db_prefix."_news (zeit,titel,news) VALUES ('".time()."','".$_POST['titel']."','".$_POST['news']."')");
+
+		if ($_POST['art'] == 1 || $_POST['art'] == 3) {
+			$empfaenger = db_query('SELECT emailadresse FROM '.$db_prefix.'_emaildaten WHERE freigabe_fuer = 1 OR freigabe_fuer = 3 GROUP BY emailadresse');
+			while ($user = mysql_fetch_assoc($empfaenger)) usermail ($user['emailadresse'], $_POST['titel'], $_POST['news'], '"'.$seitenname.'" <'.$betreibermail.'>');
+		}
+	} else db_query("UPDATE ".$db_prefix."_news SET titel='".$_POST['titel']."',news='".$_POST['news']." WHERE id='".$_POST['id']."'");
+}
+
+if ($_POST['load'] == 'Editieren') {
+      $edit       = mysql_fetch_array(db_query("SELECT titel,news,id,zeit FROM ".$db_prefix."_news  WHERE id=".(int)$_POST['loader']." LIMIT 1"));
+      $titel      = $edit['titel'];
+      $news	  = $edit['news'];
+      $id	  = $edit['id'];
+}
+
+if ($_POST['load'] == 'Löschen') {
+   db_query("DELETE FROM ".$db_prefix."_news WHERE id='".(int)$_POST['loader']."' LIMIT 1");
+}
+
+$old_news = db_query("SELECT * FROM ".$db_prefix."_news ORDER BY id DESC");
+?>
+
+<?
+if (mysql_num_rows($old_news)){
+head("News editieren / löschen");?>
+<form action="" method="post">
+<table>
+<tr>
+       <td>
+           <select name="loader" size="1">
+                <?
+                while ($load = mysql_fetch_array($old_news)) echo '<option value="'.$load['id'].'">('.$load['id'].') - '.$load['titel'].' ('.date("d.m.Y - H:i",$load['zeit']).')</option>';
+                ?>
+           </select>
+       </td>
+       <td>
+           <input type="Submit" name="load" value="Editieren">
+       </td>
+       <td>
+           <input type="Submit" name="load" value="Löschen">
+       </td>
+</tr>
+</table>
+</form>
+<?foot();
+}
+?>
+
+<?head("News schreiben");?>
+<form action="" method="post">
+<div align="center">
+<b>Newstitel</b><br>
+<input type="Text" name="titel" value="<?=$titel;?>"><br>
+<br>
+<b>News</b> <i>(HTML)</i><br>
+<textarea name="news" style="width:500px; height:80px;"><?=$news;?></textarea><br>
+<br>
+<b>Art</b><br>
+<select name="art">
+        <option value="1">News + Newsletter</option>
+        <option value="2">News</option>
+        <option value="3">Newsletter</option>
+</select>
+<br>
+<input type="Submit" name="auffuehren" value="Ausführen">
+<input type="Hidden" name="id" value="<?=$id;?>">
+</div>
+</form>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/ralleysystem/aktiv.php b/adminforce/content/ralleysystem/aktiv.php
new file mode 100644
index 0000000000000000000000000000000000000000..f944f9e27de79fe8f7b3ec8ae200b17ae2b57103
--- /dev/null
+++ b/adminforce/content/ralleysystem/aktiv.php
@@ -0,0 +1,255 @@
+<?
+// Variabeln definieren
+if (!isset($_POST['speichern']))	$_POST['speichern']	= '';
+if (!isset($_POST['reset']))		$_POST['reset']		= '';
+if (!isset($_POST['auswerten']))	$_POST['auswerten']	= '';
+$rp = 0;
+
+$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='aktivralley' LIMIT 1"));
+
+// Ralleystand reseten
+if ($_POST['reset'] == 'Reseten') {
+db_query ("DELETE FROM ".$db_prefix."_aktivralley");
+}
+
+// Ralley auswerten
+if ($_POST['auswerten'] == 'Auswerten') {
+$platz = db_query("SELECT * FROM ".$db_prefix."_aktivralley WHERE punkte > '".$ralleydaten['pro']."' ORDER BY punkte DESC LIMIT ".$ralleydaten['plaetze']."");
+	while ($pa = mysql_fetch_array($platz)) {
+	$rp++;
+	$buchungssumme = $ralleydaten['p'.$rp];
+	// Buchungen durchführen
+	db_query("UPDATE ".$db_prefix."_aktivralley SET ausgezahlt = '".time()."' WHERE uid='".$pa['uid']."'");
+	$buchungs_id = create_code(14);
+	kontobuchung ('+',$buchungssumme,$pa['uid']);
+	buchungsliste ($buchungs_id,'konto',$buchungssumme,'Aktivralley (Platz '.$rp.')',$pa['uid']);
+	bilanz (0,$buchungssumme);
+	}
+}
+
+// Ralleydaten speichern
+if ($_POST['speichern'] == 'Speichern') {
+$ralleystart	= strtotime("".$_POST['start_monat']."/".$_POST['start_tag']."/".$_POST['start_jahr']." ".$_POST['start_stunde']." hours ".$_POST['start_minute']." minutes 0 seconds");
+$ralleyende		= strtotime("".$_POST['ende_monat']."/".$_POST['ende_tag']."/".$_POST['ende_jahr']." ".$_POST['ende_stunde']." hours ".$_POST['ende_minute']." minutes 0 seconds");
+db_query ("UPDATE ".$db_prefix."_ralleydaten SET start = '".$ralleystart."', ende = '".$ralleyende."', pro = '".$_POST['pro']."', plaetze = '".$_POST['plaetze']."', p1 = '".$_POST['p1']."', p2 = '".$_POST['p2']."', p3 = '".$_POST['p3']."', p4 = '".$_POST['p4']."', p5 = '".$_POST['p5']."', p6 = '".$_POST['p6']."', p7 = '".$_POST['p7']."', p8 = '".$_POST['p8']."', p9 = '".$_POST['p9']."', p10 = '".$_POST['p10']."' WHERE ralley = 'aktivralley'");
+}
+
+$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='aktivralley' LIMIT 1"));
+?>
+
+<?head("Aktivralley bearbeiten");?>
+<form action="" method="post">
+<table cellpadding="2" cellspacing="2" border="0" align="center">
+<tr>
+<td align="left" valign="middle"><b>Start der Ralley</b> (<i>HH/MM. - TT/MM/JJJJ</i>)</td>
+<td align="left" valign="middle">
+<select name="start_stunde" size="1">
+<?
+for($x=0;$x<24;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("H",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_minute" size="1">
+<?
+for($x=0;$x<60;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("i",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;-&nbsp;
+<select name="start_tag" size="1">
+<?
+for($x=1;$x<32;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("d",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_monat" size="1">
+<?
+for($x=1;$x<13;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("m",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_jahr" size="1">
+<?
+for($x=2005;$x<2011;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("Y",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+</td>
+</tr>
+<tr>
+<td align="right" valign="middle"><b>Ende der Ralley</b> (<i>HH/MM. - TT/MM/JJJJ</i>)</td>
+<td align="left" valign="middle">
+<select name="ende_stunde" size="1">
+<?
+for($x=0;$x<24;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("H",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_minute" size="1">
+<?
+for($x=0;$x<60;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("i",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;-&nbsp;
+<select name="ende_tag" size="1">
+<?
+for($x=1;$x<32;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("d",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_monat" size="1">
+<?
+for($x=1;$x<13;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("m",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_jahr" size="1">
+<?
+for($x=2005;$x<2011;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("Y",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+</td>
+</tr>
+<tr>
+<td align="left" valign="middle" colspan="2">
+<b>Anzahl der Plätze</b>&nbsp;
+<select name="plaetze" size="1">
+<?
+for($x=0;$x<11;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if ($ralleydaten['plaetze'] == $x) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;&nbsp;
+<b>Punkte die User min. braucht</b>&nbsp;
+<input type="Text" name="pro" value="<?=$ralleydaten['pro'];?>" style="width:100px;">
+</td>
+</tr>
+</table>
+<br>
+<table cellpadding="2" cellspacing="2" border="0" align="center">
+<tr>
+<td align="center" valign="middle">Gewinn Platz 01</td>
+<td align="center" valign="middle">Gewinn Platz 02</td>
+<td align="center" valign="middle">Gewinn Platz 03</td>
+<td align="center" valign="middle">Gewinn Platz 04</td>
+<td align="center" valign="middle">Gewinn Platz 05</td>
+</tr>
+<tr>
+<td align="center" valign="middle"><input type="Text" name="p1" value="<?=$ralleydaten['p1'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p2" value="<?=$ralleydaten['p2'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p3" value="<?=$ralleydaten['p3'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p4" value="<?=$ralleydaten['p4'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p5" value="<?=$ralleydaten['p5'];?>" style="width:80px;"></td>
+</tr>
+<tr>
+<td align="center" valign="middle">Gewinn Platz 06</td>
+<td align="center" valign="middle">Gewinn Platz 07</td>
+<td align="center" valign="middle">Gewinn Platz 08</td>
+<td align="center" valign="middle">Gewinn Platz 09</td>
+<td align="center" valign="middle">Gewinn Platz 10</td>
+</tr>
+<tr>
+<td align="center" valign="middle"><input type="Text" name="p6" value="<?=$ralleydaten['p6'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p7" value="<?=$ralleydaten['p7'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p8" value="<?=$ralleydaten['p8'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p9" value="<?=$ralleydaten['p9'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p10" value="<?=$ralleydaten['p10'];?>" style="width:80px;"></td>
+</tr>
+<tr>
+<td align="center" valign="middle" colspan="5"><input type="Submit" name="speichern" value="Speichern" style="width:100px;"></td>
+</tr>
+</table>
+</form>
+<?foot();?>
+
+<?head("Platzierungen und Preise");?>
+Dieses Aktivralley läuft von <b><?=date("d.m.Y - H:i:s",$ralleydaten['start']);?></b> bis <b><?=date("d.m.Y - H:i:s",$ralleydaten['ende']);?></b>.<br>
+Für diese Ralley sind <b><?=number_format($ralleydaten['p1']+$ralleydaten['p2']+$ralleydaten['p3']+$ralleydaten['p4']+$ralleydaten['p5']+$ralleydaten['p6']+$ralleydaten['p7']+$ralleydaten['p8']+$ralleydaten['p9']+$ralleydaten['p10'],2,",",".").' '.$waehrung;?></b> ausgelobt die auf die Plätze <b>1</b> bis <b><?=$ralleydaten['plaetze'];?></b> verteilt werden.
+<? if ($ralleydaten['pro'] > 0.00) {
+echo 'Es müssen mindestens <b>'.number_format($ralleydaten['pro'],0,",",".").' Punkte</b> erreicht werden um gewertet zu werden';
+}?>
+<br>
+<br>
+<table cellpadding="1" cellspacing="1" border="0" bgcolor="#c0c0c0" align="center">
+<tr bgcolor="#d0d0d0">
+<td align="center">&nbsp;&nbsp;<b>User</b>&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;<b>Punkte</b>&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;<b>möglicher Gewinn</b>&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;<b>Ausgewertet</b>&nbsp;&nbsp;</td>
+</tr>
+
+<?
+$platz = db_query("SELECT * FROM ".$db_prefix."_aktivralley WHERE punkte > '".$ralleydaten['pro']."' ORDER BY punkte DESC LIMIT 10");
+while ($pa = mysql_fetch_array($platz)) {
+$rp++;
+$mg = number_format($ralleydaten['p'.$rp],2,",",".");
+if ($rp > $ralleydaten['plaetze']) $mg = '----';
+if ($pa['ausgezahlt'] >= 1) {$ausg = date("d.m.Y - H:i:s",$pa['ausgezahlt']);} else {$ausg = '<b>Nein</b>';}
+echo '
+<tr bgcolor="#f0f0f0">
+<td align="center">'.$pa['uid'].'</td>
+<td align="right">'.number_format($pa['punkte'],2,",",".").'&nbsp;&nbsp;</td>
+<td align="right">'.$mg.'&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;'.$ausg.'&nbsp;&nbsp;</td>
+</tr>
+';
+}
+for($x=$rp+1;$x<11;$x++){
+$mg = number_format($ralleydaten['p'.$x],2,",",".");
+if ($x > $ralleydaten['plaetze']) $mg = '----';
+if ($pa['ausgezahlt'] >= 1) {$ausg = date("d.m.Y - H:i:s",$pa['ausgezahlt']);} else {$ausg = '<b>Nein</b>';}
+echo '
+<tr bgcolor="#f0f0f0">
+<td align="center">N/A</td>
+<td align="right">0&nbsp;&nbsp;</td>
+<td align="right">'.$mg.'&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;'.$ausg.'&nbsp;&nbsp;</td>
+</tr>
+';
+}
+?>
+</table>
+<br><br>
+<div align="center">
+<form action="" method="POST">
+<input type="Submit" name="reset" value="Reseten">
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<input type="Submit" name="auswerten" value="Auswerten">
+</form>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/ralleysystem/klick.php b/adminforce/content/ralleysystem/klick.php
new file mode 100644
index 0000000000000000000000000000000000000000..d83586e8f448b4f970cb9e0b96a4a5baeb3057b5
--- /dev/null
+++ b/adminforce/content/ralleysystem/klick.php
@@ -0,0 +1,288 @@
+<?
+// Variabeln definieren
+if (!isset($_POST['speichern']))	$_POST['speichern']	= '';
+if (!isset($_POST['reset']))		$_POST['reset']		= '';
+if (!isset($_POST['auswerten']))	$_POST['auswerten']	= '';
+$rp = 0;
+
+$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='klickralley' LIMIT 1"));
+
+// Ralleystand reseten
+if ($_POST['reset'] == 'Reseten') {
+db_query ("DELETE FROM ".$db_prefix."_klickralley");
+db_query ("UPDATE ".$db_prefix."_ralleydaten SET jackpot='0' WHERE ralley='klickralley'");
+}
+
+// Ralley auswerten
+if ($_POST['auswerten'] == 'Auswerten') {
+$platz = db_query("SELECT * FROM ".$db_prefix."_klickralley WHERE klicks >= 1 ORDER BY klicks DESC LIMIT ".$ralleydaten['plaetze']."");
+	while ($pa = mysql_fetch_array($platz)) {
+	$rp++;
+		if ($ralleydaten['art'] == 'statisch') {
+		$buchungssumme = $ralleydaten['p'.$rp];
+		} else {
+		$buchungssumme = $ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$rp];
+		}
+	// Buchungen durchführen
+	db_query("UPDATE ".$db_prefix."_klickralley SET ausgezahlt = '".time()."' WHERE uid='".$pa['uid']."'");
+	$buchungs_id = create_code(14);
+	kontobuchung ('+',$buchungssumme,$pa['uid']);
+	buchungsliste ($buchungs_id,'konto',$buchungssumme,'Klickralley (Platz '.$rp.')',$pa['uid']);
+	bilanz (0,$buchungssumme);
+	}
+}
+
+// Ralleydaten speichern
+if ($_POST['speichern'] == 'Speichern') {
+$ralleystart	= strtotime("".$_POST['start_monat']."/".$_POST['start_tag']."/".$_POST['start_jahr']." ".$_POST['start_stunde']." hours ".$_POST['start_minute']." minutes 0 seconds");
+$ralleyende		= strtotime("".$_POST['ende_monat']."/".$_POST['ende_tag']."/".$_POST['ende_jahr']." ".$_POST['ende_stunde']." hours ".$_POST['ende_minute']." minutes 0 seconds");
+db_query ("UPDATE ".$db_prefix."_ralleydaten SET start = '".$ralleystart."', ende = '".$ralleyende."', art = '".$_POST['art']."', pro = '".$_POST['pro']."', plaetze = '".$_POST['plaetze']."', p1 = '".$_POST['p1']."', p2 = '".$_POST['p2']."', p3 = '".$_POST['p3']."', p4 = '".$_POST['p4']."', p5 = '".$_POST['p5']."', p6 = '".$_POST['p6']."', p7 = '".$_POST['p7']."', p8 = '".$_POST['p8']."', p9 = '".$_POST['p9']."', p10 = '".$_POST['p10']."' WHERE ralley = 'klickralley'");
+}
+
+$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='klickralley' LIMIT 1"));
+?>
+
+<?head("Klickralley bearbeiten");?>
+<form action="" method="post">
+<table cellpadding="2" cellspacing="2" border="0" align="center">
+<tr>
+<td align="left" valign="middle"><b>Start der Ralley</b> (<i>HH/MM. - TT/MM/JJJJ</i>)</td>
+<td align="left" valign="middle">
+<select name="start_stunde" size="1">
+<?
+for($x=0;$x<24;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("H",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_minute" size="1">
+<?
+for($x=0;$x<60;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("i",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;-&nbsp;
+<select name="start_tag" size="1">
+<?
+for($x=1;$x<32;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("d",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_monat" size="1">
+<?
+for($x=1;$x<13;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("m",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_jahr" size="1">
+<?
+for($x=2005;$x<2011;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("Y",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+</td>
+</tr>
+<tr>
+<td align="right" valign="middle"><b>Ende der Ralley</b> (<i>HH/MM. - TT/MM/JJJJ</i>)</td>
+<td align="left" valign="middle">
+<select name="ende_stunde" size="1">
+<?
+for($x=0;$x<24;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("H",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_minute" size="1">
+<?
+for($x=0;$x<60;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("i",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;-&nbsp;
+<select name="ende_tag" size="1">
+<?
+for($x=1;$x<32;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("d",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_monat" size="1">
+<?
+for($x=1;$x<13;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("m",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_jahr" size="1">
+<?
+for($x=2005;$x<2011;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("Y",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+</td>
+</tr>
+<tr>
+<td align="left" valign="middle" colspan="2">
+<b>Anzahl der Plätze</b>&nbsp;
+<select name="plaetze" size="1">
+<?
+for($x=0;$x<11;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if ($ralleydaten['plaetze'] == $x) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;&nbsp;
+<b>Ralleyart</b>&nbsp;
+<select name="art" size="1">
+<option value="statisch"<?if ($ralleydaten['art'] == 'statisch') echo' selected';?>>Statisch</option>
+<option value="dynamisch"<?if ($ralleydaten['art'] == 'dynamisch') echo' selected';?>>Dynamisch</option>
+</select>
+&nbsp;&nbsp;
+<b>Pro Klick</b>&nbsp;
+<input type="Text" name="pro" value="<?=$ralleydaten['pro'];?>" style="width:50px;">
+</td>
+</tr>
+</table>
+<br>
+<table cellpadding="2" cellspacing="2" border="0" align="center">
+<tr>
+<td align="center" valign="middle">Gewinn Platz 01</td>
+<td align="center" valign="middle">Gewinn Platz 02</td>
+<td align="center" valign="middle">Gewinn Platz 03</td>
+<td align="center" valign="middle">Gewinn Platz 04</td>
+<td align="center" valign="middle">Gewinn Platz 05</td>
+</tr>
+<tr>
+<td align="center" valign="middle"><input type="Text" name="p1" value="<?=$ralleydaten['p1'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p2" value="<?=$ralleydaten['p2'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p3" value="<?=$ralleydaten['p3'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p4" value="<?=$ralleydaten['p4'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p5" value="<?=$ralleydaten['p5'];?>" style="width:80px;"></td>
+</tr>
+<tr>
+<td align="center" valign="middle">Gewinn Platz 06</td>
+<td align="center" valign="middle">Gewinn Platz 07</td>
+<td align="center" valign="middle">Gewinn Platz 08</td>
+<td align="center" valign="middle">Gewinn Platz 09</td>
+<td align="center" valign="middle">Gewinn Platz 10</td>
+</tr>
+<tr>
+<td align="center" valign="middle"><input type="Text" name="p6" value="<?=$ralleydaten['p6'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p7" value="<?=$ralleydaten['p7'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p8" value="<?=$ralleydaten['p8'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p9" value="<?=$ralleydaten['p9'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p10" value="<?=$ralleydaten['p10'];?>" style="width:80px;"></td>
+</tr>
+<tr>
+<td align="center" valign="middle" colspan="5"><input type="Submit" name="speichern" value="Speichern" style="width:100px;"></td>
+</tr>
+</table>
+</form>
+<?foot();?>
+
+<?head("Platzierungen und Preise");?>
+<?
+if ($ralleydaten['art'] != 'statisch') {
+echo'
+<div align="left">
+Dieses Klickralley läuft von <b>'.date("d.m.Y - H:i:s",$ralleydaten['start']).'</b> bis <b>'.date("d.m.Y - H:i:s",$ralleydaten['ende']).'</b>.<br>
+Dabei handelt es sich um eine dynamische Klickralley wo pro Klick <b>'.number_format($ralleydaten['pro'],2,",",".").' '.$waehrung.'</b> in den Jackpot fliesen.
+Im Jackpot befinden sicher gerade <b>'.number_format($ralleydaten['jackpot'],2,",",".").' '.$waehrung.'</b> die wie unten aufgeführt auf die Plätze <b>1 
+bis '.$ralleydaten['plaetze'].'</b> verteilt werden.
+</div><br>
+';
+} else {
+echo'
+<div align="left">
+Dieses Klickralley läuft von <b>'.date("d.m.Y - H:i:s",$ralleydaten['start']).'</b> bis <b>'.date("d.m.Y - H:i:s",$ralleydaten['ende']).'</b>.<br>
+Für diese Klickralley sind <b>'.number_format($ralleydaten['p1']+$ralleydaten['p2']+$ralleydaten['p3']+$ralleydaten['p4']+$ralleydaten['p5']+$ralleydaten['p6']+$ralleydaten['p7']+$ralleydaten['p8']+$ralleydaten['p9']+$ralleydaten['p10'],2,",",".").' '.$waehrung.'</b> ausgelobt und werden wie unten angezeigt auf die 
+Plätze <b>1</b> bis <b>'.$ralleydaten['plaetze'].'</b> verteilt.
+</div><br>
+';
+}
+?>
+<table cellpadding="1" cellspacing="1" border="0" bgcolor="#c0c0c0" align="center">
+<tr bgcolor="#d0d0d0">
+<td align="center">&nbsp;&nbsp;<b>User</b>&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;<b>Klicks</b>&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;<b>möglicher Gewinn</b>&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;<b>Ausgewertet</b>&nbsp;&nbsp;</td>
+</tr>
+
+<?
+$platz = db_query("SELECT * FROM ".$db_prefix."_klickralley ORDER BY klicks DESC LIMIT 10");
+while ($pa = mysql_fetch_array($platz)) {
+$rp++;
+if ($ralleydaten['art'] == 'statisch') {
+$mg = number_format($ralleydaten['p'.$rp],2,",",".");
+} else {
+$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$rp],2,",",".");
+}
+if ($rp > $ralleydaten['plaetze']) $mg = '----';
+if ($pa['ausgezahlt'] >= 1) {$ausg = date("d.m.Y - H:i:s",$pa['ausgezahlt']);} else {$ausg = '<b>Nein</b>';}
+echo '
+<tr bgcolor="#f0f0f0">
+<td align="center">'.$pa['uid'].'</td>
+<td align="right">'.number_format($pa['klicks'],0,",",".").'&nbsp;&nbsp;</td>
+<td align="right">'.$mg.'&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;'.$ausg.'&nbsp;&nbsp;</td>
+</tr>
+';
+}
+for($x=$rp+1;$x<11;$x++){
+if ($ralleydaten['art'] == 'statisch') {
+$mg = number_format($ralleydaten['p'.$x],2,",",".");
+} else {
+$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$x],2,",",".");
+}
+if ($x > $ralleydaten['plaetze']) $mg = '----';
+if ($pa['ausgezahlt'] >= 1) {$ausg = date("d.m.Y - H:i:s",$pa['ausgezahlt']);} else {$ausg = '<b>Nein</b>';}
+echo '
+<tr bgcolor="#f0f0f0">
+<td align="center">N/A</td>
+<td align="right">0&nbsp;&nbsp;</td>
+<td align="right">'.$mg.'&nbsp;&nbsp;</td>
+<td align="center">&nbsp;&nbsp;'.$ausg.'&nbsp;&nbsp;</td>
+</tr>
+';
+}
+?>
+</table>
+<br><br>
+<form action="" method="POST">
+<div align="center">
+<input type="Submit" name="reset" value="Reseten">
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<input type="Submit" name="auswerten" value="Auswerten">
+</div>
+</form>
+<?foot();?>
+
diff --git a/adminforce/content/ralleysystem/ref.php b/adminforce/content/ralleysystem/ref.php
new file mode 100644
index 0000000000000000000000000000000000000000..957c8f7eae1bf5f4db4e2b064ae34ca8ef24ce47
--- /dev/null
+++ b/adminforce/content/ralleysystem/ref.php
@@ -0,0 +1,271 @@
+<?
+// Variabeln definieren
+if (!isset($_POST['speichern']))	$_POST['speichern'] = '';
+if (!isset($_POST['auswerten']))	$_POST['auswerten']	= '';
+if (!isset($rp))					$rp					= "";
+if (!isset($rpy))					$rpy				= "";
+if (!isset($count))					$count				= "";
+if (!isset($platz1))				$platz1				= "";
+if (!isset($platz2))				$platz2				= "";
+if (!isset($platz3))				$platz3				= "";
+if (!isset($platz4))				$platz4				= "";
+if (!isset($platz5))				$platz5				= "";
+if (!isset($platz6))				$platz6				= "";
+if (!isset($platz7))				$platz7				= "";
+if (!isset($platz8))				$platz8				= "";
+if (!isset($platz9))				$platz9				= "";
+if (!isset($platz10))				$platz10			= "";
+
+if ($_POST['speichern'] == 'Speichern') {
+$ralleystart	= strtotime("".$_POST['start_monat']."/".$_POST['start_tag']."/".$_POST['start_jahr']." ".$_POST['start_stunde']." hours ".$_POST['start_minute']." minutes 0 seconds");
+$ralleyende		= strtotime("".$_POST['ende_monat']."/".$_POST['ende_tag']."/".$_POST['ende_jahr']." ".$_POST['ende_stunde']." hours ".$_POST['ende_minute']." minutes 0 seconds");
+db_query ("UPDATE ".$db_prefix."_ralleydaten SET start = '".$ralleystart."', ende = '".$ralleyende."', pro = '".$_POST['pro']."', plaetze = '".$_POST['plaetze']."', p1 = '".$_POST['p1']."', p2 = '".$_POST['p2']."', p3 = '".$_POST['p3']."', p4 = '".$_POST['p4']."', p5 = '".$_POST['p5']."', p6 = '".$_POST['p6']."', p7 = '".$_POST['p7']."', p8 = '".$_POST['p8']."', p9 = '".$_POST['p9']."', p10 = '".$_POST['p10']."' WHERE ralley = 'refralley'");
+}
+
+$ralleydaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_ralleydaten WHERE ralley='refralley' LIMIT 1"));
+
+$refs = mysql_query("SELECT werber , COUNT(werber)AS total FROM ".$db_prefix."_werberdaten WHERE werber != 0 and zuordnungszeit >= '".$ralleydaten['start']."' and zuordnungszeit <= '".$ralleydaten['ende']."' and gesamt >= '".$ralleydaten['pro']."' GROUP BY werber ORDER BY total DESC LIMIT 10");
+$count = 1;
+while ($row = mysql_fetch_array($refs)) {
+$user = mysql_fetch_array(mysql_query("SELECT uid FROM ".$db_prefix."_kontodaten WHERE `uid`='$row[0]'"));
+if ($count == 1) {$users[1] = $user[0]; $ref[1] = $row[1];}
+if ($count == 2) {$users[2] = $user[0]; $ref[2] = $row[1];}
+if ($count == 3) {$users[3] = $user[0]; $ref[3] = $row[1];}
+if ($count == 4) {$users[4] = $user[0]; $ref[4] = $row[1];}
+if ($count == 5) {$users[5] = $user[0]; $ref[5] = $row[1];}
+if ($count == 6) {$users[6] = $user[0]; $ref[6] = $row[1];}
+if ($count == 7) {$users[7] = $user[0]; $ref[7] = $row[1];}
+if ($count == 8) {$users[8] = $user[0]; $ref[8] = $row[1];}
+if ($count == 9) {$users[9] = $user[0]; $ref[9] = $row[1];}
+if ($count == 10) {$users[10] = $user[0]; $ref[10] = $row[1];}
+$count = $count + 1;
+}
+
+// Ralley auswerten
+if ($_POST['auswerten'] == 'Auswerten') {
+	for($y=1;$y<11;$y++){
+	$rpy++;
+		if (!isset($users[$rpy]))	$users[$rpy]	= "0";
+		if (!isset($ref[$rpy]))		$ref[$rpy]		= "0";
+			if ($ref[$rpy] != 0 and $users[$rpy] != 0) {
+			// Buchungen durchführen
+			$buchungs_id = create_code(14);
+			kontobuchung ('+',$ralleydaten['p'.$rpy],$users[$rpy]);
+			buchungsliste ($buchungs_id,'konto',$ralleydaten['p'.$rpy],'Refralley (Platz '.$rpy.')',$users[$rpy]);
+			bilanz (0,$ralleydaten['p'.$rpy]);
+			}
+	}
+}
+?>
+
+<?head("Refralley bearbeiten");?>
+<form action="" method="post">
+<table cellpadding="2" cellspacing="2" border="0" align="center">
+<tr>
+<td align="left" valign="middle"><b>Start der Ralley</b> (<i>HH/MM. - TT/MM/JJJJ</i>)</td>
+<td align="left" valign="middle">
+<select name="start_stunde" size="1">
+<?
+for($x=0;$x<24;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("H",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_minute" size="1">
+<?
+for($x=0;$x<60;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("i",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;-&nbsp;
+<select name="start_tag" size="1">
+<?
+for($x=1;$x<32;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("d",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_monat" size="1">
+<?
+for($x=1;$x<13;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("m",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="start_jahr" size="1">
+<?
+for($x=2005;$x<2011;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("Y",$ralleydaten['start']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+</td>
+</tr>
+<tr>
+<td align="right" valign="middle"><b>Ende der Ralley</b> (<i>HH/MM. - TT/MM/JJJJ</i>)</td>
+<td align="left" valign="middle">
+<select name="ende_stunde" size="1">
+<?
+for($x=0;$x<24;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("H",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_minute" size="1">
+<?
+for($x=0;$x<60;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("i",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;-&nbsp;
+<select name="ende_tag" size="1">
+<?
+for($x=1;$x<32;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("d",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_monat" size="1">
+<?
+for($x=1;$x<13;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("m",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+<select name="ende_jahr" size="1">
+<?
+for($x=2005;$x<2011;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if (date("Y",$ralleydaten['ende']) == $y) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+</td>
+</tr>
+<tr>
+<td align="left" valign="middle" colspan="2">
+<b>Anzahl der Plätze</b>&nbsp;
+<select name="plaetze" size="1">
+<?
+for($x=0;$x<11;$x++){
+if ($x <= 9) {$y = '0'.$x;} else {$y = $x;}
+if ($ralleydaten['plaetze'] == $x) {$select = ' selected';} else {$select = '';}
+echo '<option value="'.$x.'"'.$select.'>'.$y.'</option>';
+}
+?>
+</select>
+&nbsp;&nbsp;
+<b>Punkte die Ref min. braucht</b>&nbsp;
+<input type="Text" name="pro" value="<?=$ralleydaten['pro'];?>" style="width:100px;">
+</td>
+</tr>
+</table>
+<br>
+<table cellpadding="2" cellspacing="2" border="0" align="center">
+<tr>
+<td align="center" valign="middle">Gewinn Platz 01</td>
+<td align="center" valign="middle">Gewinn Platz 02</td>
+<td align="center" valign="middle">Gewinn Platz 03</td>
+<td align="center" valign="middle">Gewinn Platz 04</td>
+<td align="center" valign="middle">Gewinn Platz 05</td>
+</tr>
+<tr>
+<td align="center" valign="middle"><input type="Text" name="p1" value="<?=$ralleydaten['p1'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p2" value="<?=$ralleydaten['p2'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p3" value="<?=$ralleydaten['p3'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p4" value="<?=$ralleydaten['p4'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p5" value="<?=$ralleydaten['p5'];?>" style="width:80px;"></td>
+</tr>
+<tr>
+<td align="center" valign="middle">Gewinn Platz 06</td>
+<td align="center" valign="middle">Gewinn Platz 07</td>
+<td align="center" valign="middle">Gewinn Platz 08</td>
+<td align="center" valign="middle">Gewinn Platz 09</td>
+<td align="center" valign="middle">Gewinn Platz 10</td>
+</tr>
+<tr>
+<td align="center" valign="middle"><input type="Text" name="p6" value="<?=$ralleydaten['p6'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p7" value="<?=$ralleydaten['p7'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p8" value="<?=$ralleydaten['p8'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p9" value="<?=$ralleydaten['p9'];?>" style="width:80px;"></td>
+<td align="center" valign="middle"><input type="Text" name="p10" value="<?=$ralleydaten['p10'];?>" style="width:80px;"></td>
+</tr>
+<tr>
+<td align="center" valign="middle" colspan="5"><input type="Submit" name="speichern" value="Speichern" style="width:100px;"></td>
+</tr>
+</table>
+</form>
+<?foot();?>
+
+<?head("Platzierungen und Preise");?>
+<? if ($ralleydaten['ende']<= time()) echo '<font color="#000000">'; ?>
+<? if ($ralleydaten['start']>= time()) echo '<font color="#000000">'; ?>
+<?
+echo'
+<div align="left">
+Dieses Refralley läuft von <b>'.date("d.m.Y - H:i:s",$ralleydaten['start']).'</b> bis <b>'.date("d.m.Y - H:i:s",$ralleydaten['ende']).'</b>.<br>
+Für diese Refralley sind <b>'.number_format($ralleydaten['p1']+$ralleydaten['p2']+$ralleydaten['p3']+$ralleydaten['p4']+$ralleydaten['p5']+$ralleydaten['p6']+$ralleydaten['p7']+$ralleydaten['p8']+$ralleydaten['p9']+$ralleydaten['p10'],2,",",".").' '.$waehrung.'</b> ausgelobt und werden wie unten angezeigt auf die 
+Plätze <b>1</b> bis <b>'.$ralleydaten['plaetze'].'</b> verteilt.
+<br>
+<br>
+</div>
+';
+if ($ralleydaten['pro'] == 0) {
+echo '<div align="center"><b>Es werden alle Refs gezählt!</b></div>';
+} else {
+echo '<div align="center"><b>Es werden nur Refs gezählt ab '.number_format($ralleydaten['pro'],2,',','.').' '.$waehrung.' Umsatz!</b></div><br>';
+}
+?>
+<br>
+<table width="70%" cellpadding="1" cellspacing="1" border="0" bgcolor="#c0c0c0" align="center">
+<tr bgcolor="#d0d0d0">
+<td align="center"><b>Platz</b></td>
+<td align="center"><b>User</b></td>
+<td align="center"><b>Refs</b></td>
+<td align="center"><b>Gewinn</b></td>
+</tr>
+<?
+for($x=1;$x<11;$x++){
+$rp++;
+if (!isset($users[$rp]))	$users[$rp]	= "N/A";
+if (!isset($ref[$rp]))		$ref[$rp]	= "0";
+?>
+<tr bgcolor="#f0f0f0">
+<td align="center"><b><?=$x;?></b></td>
+<td align="center"><b><?=$users[$rp];?></b></td>
+<td align="center"><b><?=$ref[$rp];?></b></td>
+<td align="center"><b><?=number_format($ralleydaten['p'.$rp],0,',','.');?></b></td>
+</tr>
+<?
+}
+?>
+</table>
+<br><br>
+<form action="" method="POST">
+<div align="center">
+<input type="Submit" name="auswerten" value="Auswerten">
+</div>
+</form>
+<?foot();?>
+
diff --git a/adminforce/content/startseite.php b/adminforce/content/startseite.php
new file mode 100644
index 0000000000000000000000000000000000000000..42e2f9c192c88b76666143f78f497450ea2428c5
--- /dev/null
+++ b/adminforce/content/startseite.php
@@ -0,0 +1,31 @@
+<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
+<td width="100%" valign="top">
+<?head("Userstatistik");?>
+<?
+$kontostats = mysql_fetch_array(db_query("SELECT COUNT(uid) AS kd_uid , SUM(kontostand) AS kd_kontostand FROM ".$db_prefix."_kontodaten"));
+?>
+<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#c0c0c0">
+<tr bgcolor="#f0f0f0">
+    <td width="55%">Angemeldete User</td>
+    <td align="right"><?=@number_format($kontostats['kd_uid'],0,",",".");?>&nbsp;&nbsp;</td>
+</tr>
+<tr bgcolor="#f5f5f5">
+    <td>Gesamtguthaben</td>
+    <td align="right"><?=@number_format($kontostats['kd_kontostand'],2,",",".");?>&nbsp;&nbsp;</td>
+</tr>
+<tr bgcolor="#f0f0f0">
+    <td width="55%">Guth. pro User</td>
+    <td align="right"><?=@number_format($kontostats['kd_kontostand'] / $kontostats['kd_uid'],2,",",".");?>&nbsp;&nbsp;</td>
+</tr>
+</table>
+<?foot();?>
+</td>
+</tr></table>
+
+
+<?head("VMS Links");?>
+&raquo;&nbsp;<a href="http://www.designerscripte.net/in.php?to=home" target="_blank">VMS Supportforum</a><br>
+&raquo;&nbsp;<a href="http://www.designerscripte.net/in.php?to=dl" target="_blank">VMS Downloads</a><br>
+<?foot();?>
+
+
diff --git a/adminforce/content/texte/agb.php b/adminforce/content/texte/agb.php
new file mode 100644
index 0000000000000000000000000000000000000000..a9115b056cf2bf8fdbefc53392589adb26cfaa3e
--- /dev/null
+++ b/adminforce/content/texte/agb.php
@@ -0,0 +1,29 @@
+<?
+// Variabeln
+$filename = '../lib/texte/agb.txt';
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['text'])) $_POST['text'] = '';
+
+// Datei schreiben
+if ($_POST['updaten'] == 'Updaten !') {
+$_POST['text'] = str_replace('\\', '', $_POST['text']);
+$fp = fopen ($filename, "w");
+fwrite ($fp, $_POST['text']);
+fclose ($fp);
+}
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = @fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("AGB's bearbeiten (html erlaubt!)");?>
+<div align="center">
+<form action="" method="post">
+<textarea name="text" style="width:500px; height:300px;"><?=$inhalt;?></textarea><br>
+<input type="Submit" name="updaten" value="Updaten !">
+</form>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/texte/aktivralley.php b/adminforce/content/texte/aktivralley.php
new file mode 100644
index 0000000000000000000000000000000000000000..0734ccda5b3f0830138155a8e29c46151e64dccc
--- /dev/null
+++ b/adminforce/content/texte/aktivralley.php
@@ -0,0 +1,29 @@
+<?
+// Variabeln
+$filename = '../lib/texte/aktivralley.txt';
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['text'])) $_POST['text'] = '';
+
+// Datei schreiben
+if ($_POST['updaten'] == 'Updaten !') {
+$_POST['text'] = str_replace('\\', '', $_POST['text']);
+$fp = fopen ($filename, "w");
+fwrite ($fp, $_POST['text']);
+fclose ($fp);
+}
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = @fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("Aktivralleyeinleitung bearbeiten (html erlaubt!)");?>
+<div align="center">
+<form action="" method="post">
+<textarea name="text" style="width:500px; height:300px;"><?=$inhalt;?></textarea><br>
+<input type="Submit" name="updaten" value="Updaten !">
+</form>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/texte/alternativwerbung.php b/adminforce/content/texte/alternativwerbung.php
new file mode 100644
index 0000000000000000000000000000000000000000..700bd45b0432d82bcd77cb445c2f45d855ef6b92
--- /dev/null
+++ b/adminforce/content/texte/alternativwerbung.php
@@ -0,0 +1,100 @@
+<?
+// Variabeln
+$alt_head	= '../lib/texte/alt_headerbanner.txt';
+$alt_pops	= '../lib/texte/alt_bettelseitenpopup.txt';
+$alt_start	= '../lib/texte/alt_startseitenpopup.txt';
+$alt_bettel	= '../lib/texte/bettelwerbung.txt';
+$alt_box1	= '../lib/texte/box1.txt';
+$alt_box2	= '../lib/texte/box2.txt';
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+
+if ($_POST['updaten'] == 'Updaten !') {
+// Alternativ Header schreiben
+$_POST['head'] = str_replace('\\', '', $_POST['head']);
+$fp = @fopen ($alt_head, "w");
+fwrite ($fp, $_POST['head']);
+fclose ($fp);
+// Alternativ Popups schreiben
+$_POST['pops'] = str_replace('\\', '', $_POST['pops']);
+$fp = @fopen ($alt_pops, "w");
+fwrite ($fp, $_POST['pops']);
+fclose ($fp);
+// Alternativ Start-Popups schreiben
+$_POST['start'] = str_replace('\\', '', $_POST['start']);
+$fp = @fopen ($alt_start, "w");
+fwrite ($fp, $_POST['start']);
+fclose ($fp);
+// Bettelseite Werbung schreiben
+$_POST['bettelwerbung'] = str_replace('\\', '', $_POST['bettelwerbung']);
+$fp = @fopen ($alt_bettel, "w");
+fwrite ($fp, $_POST['bettelwerbung']);
+fclose ($fp);
+// Box 1 schreiben
+$_POST['box1'] = str_replace('\\', '', $_POST['box1']);
+$fp = @fopen ($alt_box1, "w");
+fwrite ($fp, $_POST['box1']);
+fclose ($fp);
+// Box 2 schreiben
+$_POST['box2'] = str_replace('\\', '', $_POST['box2']);
+$fp = @fopen ($alt_box2, "w");
+fwrite ($fp, $_POST['box2']);
+fclose ($fp);
+}
+
+// Dateien auslesen
+$fp = fopen ($alt_head, "r");
+$head = @fread ($fp, filesize ($alt_head));
+fclose ($fp);
+$head = str_replace('\\', '', $head);
+//
+$fp = fopen ($alt_pops, "r");
+$pops = @fread ($fp, filesize ($alt_pops));
+fclose ($fp);
+$pops = str_replace('\\', '', $pops);
+//
+$fp = fopen ($alt_start, "r");
+$start = @fread ($fp, filesize ($alt_start));
+fclose ($fp);
+$start = str_replace('\\', '', $start);
+// Bettelwerbung Banner
+$fp = fopen ($alt_bettel, "r");
+$binhalt = @fread ($fp, filesize ($alt_bettel));
+fclose ($fp);
+$binhalt = str_replace('\\', '', $binhalt);
+// Box 1
+$fp = fopen ($alt_box1, "r");
+$box1 = @fread ($fp, filesize ($alt_box1));
+fclose ($fp);
+$box1 = str_replace('\\', '', $box1);
+// Box 2
+$fp = fopen ($alt_box2, "r");
+$box2 = @fread ($fp, filesize ($alt_box2));
+fclose ($fp);
+$box2 = str_replace('\\', '', $box2);
+?>
+
+<?head("Alternativwerbung bearbeiten (html erlaubt!)");?>
+<div align="center">
+<form action="" method="post">
+<b>Headerwerbung (Banner)</b><br>
+<textarea name="head" style="width:500px; height:120px;"><?=$head;?></textarea><br>
+<br>
+<b>Startseitenpopup</b><br>
+<textarea name="start" style="width:500px; height:120px;"><?=$start;?></textarea><br>
+<br>
+<b>Bettelseitenpopup</b><br>
+<textarea name="pops" style="width:500px; height:120px;"><?=$pops;?></textarea><br>
+<br>
+<b>Bettelwerbung</b><br>
+<textarea name="bettelwerbung" style="width:500px; height:120px;"><?=$binhalt;?></textarea><br>
+<br>
+<b>Menübox I</b><br>
+<textarea name="box1" style="width:500px; height:120px;"><?=$box1;?></textarea><br>
+<br>
+<b>Menübox II</b><br>
+<textarea name="box2" style="width:500px; height:120px;"><?=$box2;?></textarea><br>
+<br>
+<input type="Submit" name="updaten" value="Updaten !">
+</form>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/texte/faq.php b/adminforce/content/texte/faq.php
new file mode 100644
index 0000000000000000000000000000000000000000..807631f84e23d16a2a5295f4702d479842df914b
--- /dev/null
+++ b/adminforce/content/texte/faq.php
@@ -0,0 +1,29 @@
+<?
+// Variabeln
+$filename = '../lib/texte/faq.txt';
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['text'])) $_POST['text'] = '';
+
+// Datei schreiben
+if ($_POST['updaten'] == 'Updaten !') {
+$_POST['text'] = str_replace('\\', '', $_POST['text']);
+$fp = fopen ($filename, "w");
+fwrite ($fp, $_POST['text']);
+fclose ($fp);
+}
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = @fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("FAQ's bearbeiten (html erlaubt!)");?>
+<div align="center">
+<form action="" method="post">
+<textarea name="text" style="width:500px; height:300px;"><?=$inhalt;?></textarea><br>
+<input type="Submit" name="updaten" value="Updaten !">
+</form>
+</div>
+<?foot();?>
diff --git a/adminforce/content/texte/klickralley.php b/adminforce/content/texte/klickralley.php
new file mode 100644
index 0000000000000000000000000000000000000000..7c96376c118ab59543e4f9f80c0f80f74619fed5
--- /dev/null
+++ b/adminforce/content/texte/klickralley.php
@@ -0,0 +1,29 @@
+<?
+// Variabeln
+$filename = '../lib/texte/klickralley.txt';
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['text'])) $_POST['text'] = '';
+
+// Datei schreiben
+if ($_POST['updaten'] == 'Updaten !') {
+$_POST['text'] = str_replace('\\', '', $_POST['text']);
+$fp = fopen ($filename, "w");
+fwrite ($fp, $_POST['text']);
+fclose ($fp);
+}
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = @fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("Klickralleyeinleitung bearbeiten (html erlaubt!)");?>
+<div align="center">
+<form action="" method="post">
+<textarea name="text" style="width:500px; height:300px;"><?=$inhalt;?></textarea><br>
+<input type="Submit" name="updaten" value="Updaten !">
+</form>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/texte/refralley.php b/adminforce/content/texte/refralley.php
new file mode 100644
index 0000000000000000000000000000000000000000..2aad6ca1b1bbc5c654ce71d808227563e48b6675
--- /dev/null
+++ b/adminforce/content/texte/refralley.php
@@ -0,0 +1,29 @@
+<?
+// Variabeln
+$filename = '../lib/texte/refralley.txt';
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['text'])) $_POST['text'] = '';
+
+// Datei schreiben
+if ($_POST['updaten'] == 'Updaten !') {
+$_POST['text'] = str_replace('\\', '', $_POST['text']);
+$fp = fopen ($filename, "w");
+fwrite ($fp, $_POST['text']);
+fclose ($fp);
+}
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = @fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("Refralleyeinleitung bearbeiten (html erlaubt!)");?>
+<div align="center">
+<form action="" method="post">
+<textarea name="text" style="width:500px; height:300px;"><?=$inhalt;?></textarea><br>
+<input type="Submit" name="updaten" value="Updaten !">
+</form>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/texte/wartung.php b/adminforce/content/texte/wartung.php
new file mode 100644
index 0000000000000000000000000000000000000000..5d95e26027cccd14cd6600ae615841e3d1fd3b07
--- /dev/null
+++ b/adminforce/content/texte/wartung.php
@@ -0,0 +1,29 @@
+<?
+// Variabeln
+$filename = '../lib/texte/wartung.txt';
+if (!isset($_POST['updaten'])) $_POST['updaten'] = '';
+if (!isset($_POST['text'])) $_POST['text'] = '';
+
+// Datei schreiben
+if ($_POST['updaten'] == 'Updaten !') {
+$_POST['text'] = str_replace('\\', '', $_POST['text']);
+$fp = fopen ($filename, "w");
+fwrite ($fp, $_POST['text']);
+fclose ($fp);
+}
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = @fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("Wartungstext bearbeiten (html erlaubt!)");?>
+<div align="center">
+<form action="" method="post">
+<textarea name="text" style="width:500px; height:300px;"><?=$inhalt;?></textarea><br>
+<input type="Submit" name="updaten" value="Updaten !">
+</form>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/usersystem/buchungen.php b/adminforce/content/usersystem/buchungen.php
new file mode 100644
index 0000000000000000000000000000000000000000..2b9d02928f87bf8e7645f62c5e5f6b3b2472fd39
--- /dev/null
+++ b/adminforce/content/usersystem/buchungen.php
@@ -0,0 +1,27 @@
+<?head("Buchungsübersicht - Konto ".$_GET['uid']);?>
+<table border="0" width="100%" cellpadding="0" cellspacing="1" bgcolor="#303030">
+<tr bgcolor="#f2f2f2">
+<td align="center"><b>Buchungs Id</b></td>
+<td align="center"><b>Datum</b></td>
+<td align="center"><b>Zeit</b></td>
+<td align="center"><b>FuCos</b></td>
+<td align="center"><b>Verwendungszweck</b></td>
+</tr>
+<?
+$buchungen_lesen = db_query("SELECT * FROM ".$db_prefix."_buchungen WHERE uid=".$_GET['uid']." ORDER BY buchungszeit DESC LIMIT 250");
+while ($buchung_schreiben = mysql_fetch_array($buchungen_lesen)) {
+$buchcolor = '#000000';
+if ($buchung_schreiben['buchungsmenge'] < 0) $buchcolor='#cc0000';
+?>
+<tr bgcolor="#fafafa">
+<td align="left">&nbsp;<?=$buchung_schreiben['buchungs_id'];?></td>
+<td align="center">&nbsp;<?=date("d.m.Y",$buchung_schreiben['buchungszeit']);?>&nbsp;</td>
+<td align="center">&nbsp;<?=date("H:i",$buchung_schreiben['buchungszeit']);?>&nbsp;</td>
+<td align="right">&nbsp;<font color="<?=$buchcolor;?>"><?=number_format($buchung_schreiben['buchungsmenge'],2,",",".");?></font>&nbsp;</td>
+<td align="left">&nbsp;<?=$buchung_schreiben['verwendungszweck'];?></td>
+</tr>
+<?
+}
+?>
+</table>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/usersystem/doppelaccis.php b/adminforce/content/usersystem/doppelaccis.php
new file mode 100644
index 0000000000000000000000000000000000000000..94331ff45e41d461002054390ba937032023a554
--- /dev/null
+++ b/adminforce/content/usersystem/doppelaccis.php
@@ -0,0 +1,83 @@
+<?head("Doppelte IP Adressen");?>
+<table border="0" width="100%">
+<tr>
+    <td align="center"><b>Anzahl</b></td>
+    <td align="center"><b>IP-Adresse</b></td>
+</tr>
+<?
+$sql = db_query("SELECT `login_ip`, COUNT(*) AS `anzahl` FROM  `".$db_prefix."_kontodaten` GROUP BY `login_ip` HAVING COUNT(*) > 1 ORDER BY COUNT(*) DESC") or die(mysql_error());
+if (!mysql_num_rows($sql)){
+ echo '
+ <tr>
+     <td colspan="2" align="center"><font color="green">Keine Doppelten IP-Adressen im System</font></td>
+ </tr>';
+}else{
+ while ($fake1 = mysql_fetch_assoc($sql)){
+ echo '
+   <tr>
+       <td>'.$fake1['anzahl'].'</td>
+       <td><a href="?content=/usersystem/doppelaccis&ip='.$fake1['login_ip'].'">'.$fake1['login_ip'].'</a></td>
+   </tr>
+ ';
+ }
+}
+?>
+</table>
+<?
+if($_GET['ip']){
+$ip = db_query("SELECT k.uid,u.nickname FROM
+                        ".$db_prefix."_kontodaten AS k
+                        LEFT JOIN ".$db_prefix."_userdaten AS u ON u.uid=k.uid
+WHERE k.login_ip='".addslashes($_GET['ip'])."'");
+
+     echo "<p>User mit der IP ".$_GET['ip'].":</p>";
+     while($doppelt = mysql_fetch_assoc($ip)){
+        echo "<a href='?content=/usersystem/userbearbeiten&uid=".$doppelt['uid']."'>".$doppelt['nickname']."</a><br>";
+     }
+}
+
+foot();?>
+
+
+
+<?head("Doppelte Passwörter");?>
+<table border="0" width="100%">
+<tr>
+    <td align="center"><b>Anzahl</b></td>
+    <td align="center"><b>md5Hash</b></td>
+</tr>
+<?
+$sql2 = db_query("SELECT `passwort`, COUNT(*) AS `anzahl` FROM  `".$db_prefix."_kontodaten` GROUP BY `passwort` HAVING COUNT(*) > 1 ORDER BY COUNT(*) DESC") or die(mysql_error());
+if (!mysql_num_rows($sql)){
+ echo '
+ <tr>
+     <td colspan="2" align="center"><font color="green">Keine Doppelten Passwörter im System</font></td>
+ </tr>';
+}else{
+ while ($fake2= mysql_fetch_assoc($sql2)){
+ echo '
+   <tr>
+       <td>'.$fake2['anzahl'].'</td>
+       <td><a href="?content=/usersystem/doppelaccis&md5='.$fake2['passwort'].'">'.$fake2['passwort'].'</a></td>
+   </tr>
+ ';
+ }
+}
+
+?>
+</table>
+
+<?
+if($_GET['md5']){
+$md5 = db_query("SELECT k.uid,u.nickname FROM
+                        ".$db_prefix."_kontodaten AS k
+                        LEFT JOIN ".$db_prefix."_userdaten AS u ON u.uid=k.uid
+WHERE k.passwort='".addslashes($_GET['md5'])."'");
+
+     echo "<p>User mit dem Passworthash ".$_GET['md5'].":</p>";
+     while($doppelt = mysql_fetch_assoc($md5)){
+        echo "<a href='?content=/usersystem/userbearbeiten&uid=".$doppelt['uid']."'>".$doppelt['nickname']."</a><br>";
+     }
+}
+
+foot();?>
\ No newline at end of file
diff --git a/adminforce/content/usersystem/liste.php b/adminforce/content/usersystem/liste.php
new file mode 100644
index 0000000000000000000000000000000000000000..03c0bf4689609b1ce55a8242ba7c48a7b8411ccd
--- /dev/null
+++ b/adminforce/content/usersystem/liste.php
@@ -0,0 +1,42 @@
+<?
+$gfx_status[0] = '<img src="images/gelb.gif" width="15" height="15" border="0" alt="Nicht freigeschaltet">';
+$gfx_status[1] = '<img src="images/gruen.gif" width="15" height="15" border="0" alt="O.K.">';
+$gfx_status[2] = '<img src="images/rot.gif" width="15" height="15" border="0" alt="Gesperrt">';
+
+head("Userliste"); ?>
+<table border="0" cellpadding="3" cellspacing="0" width="100%">
+<tr class="tr_head">
+    <td align="center"></td>
+    <td align="center"><b>UID</b></td>
+    <td align="center"><b>Kontostand</b></td>
+    <td align="center"><b>Nickname</b></td>
+    <td align="center"><b>Name</b></td>
+    <td align="center"><b>Emailadresse</b></td>
+    <td align="center"><b>Angemeldet</b></td>
+</tr>
+<?
+$userliste = db_query("SELECT k.uid,k.status,k.kontostand,u.nickname,u.vorname,u.angemeldet_seit,e.emailadresse
+                             FROM ".$db_prefix."_kontodaten AS k
+                             LEFT JOIN ".$db_prefix."_userdaten AS u ON u.uid=k.uid
+                             LEFT JOIN ".$db_prefix."_emaildaten AS e ON e.uid=k.uid
+ORDER BY k.uid ASC");
+
+while ($ausgabe = mysql_fetch_array($userliste)) {
+$i++;
+$row = ($i % 2 == 0) ? 0 : 1;
+
+echo'
+<tr  class="tr_row'.$row.'">
+    <td align="center"><a href="?content=/usersystem/userbearbeiten&amp;uid='.$ausgabe['uid'].'" target="_self">'.$gfx_status[$ausgabe['status']].'</a></td>
+    <td align="center"><a href="../?content=/nickpage&amp;id='.$ausgabe['uid'].'" target="_blank">'.$ausgabe['uid'].'</a></td>
+    <td align="center">'.number_format($ausgabe['kontostand'],2,",",".").'</td>
+    <td align="center">'.$ausgabe['nickname'].'</td>
+    <td align="center">'.$ausgabe['vorname'].' '.$ausgabe['nachname'].'</td>
+    <td align="center"><a href="mailto:'.$ausgabe['emailadresse'].'">Mail</a></td>
+    <td align="center">'.date("d.m.y - H:i",$ausgabe['angemeldet_seit']).'</td>
+</tr>
+';
+}
+?>
+</table>
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/usersystem/userbearbeiten.php b/adminforce/content/usersystem/userbearbeiten.php
new file mode 100644
index 0000000000000000000000000000000000000000..abe9f03a8edf4fc01b8675ccc1834a698799b5af
--- /dev/null
+++ b/adminforce/content/usersystem/userbearbeiten.php
@@ -0,0 +1,263 @@
+<?
+// Variable _GET['uid'] pruefen
+if (!empty ($_GET['uid'])) $_POST['uid'] = $_GET['uid'];
+$_POST['uid'] = (int)$_POST['uid'];
+if (empty ($_POST['uid'])) die ('Keine korrekte User-ID &uuml;bergeben!');
+
+// Allgemeine Daten speichern
+if (isset ($_POST['profile'])) {
+	db_query ('UPDATE '.$db_prefix.'_userdaten SET vorname = "'.$_POST['vorname'].'", nachname = "'.$_POST['nachname'].'" WHERE uid = '.$_POST['uid']);
+	db_query ('UPDATE '.$db_prefix.'_emaildaten SET emailadresse = "'.$_POST['emailadresse'].'", freigabe_fuer = "'.$_POST['freigabe_fuer'].'" WHERE uid = '.$_POST['uid']);
+	if ($_POST['werber'] != $_POST['alt_werber'] && $_POST['werber'] != $_POST['uid']) db_query ('UPDATE '.$db_prefix.'_werberdaten SET werber = "'.$_POST['werber'].'", umsatz = 0, zuordnungszeit = 0, reset = 0, resetzeit = 0, gesamt = 0, refback = 0, aktivzeit = 0 WHERE uid = '.$_POST['uid']);
+}
+
+// Betrag verbuchen
+if (isset ($_POST['finanze'])) {
+	if ($_POST['buchungssumme'] > 0 && $_POST['buchungssumme']) {
+		$buchungs_id = create_code (14);
+		buchungsliste ($buchungs_id, $_POST['buchungsart'].$_POST['buchungssumme'], $_POST['buchungstext'].' (Admin)', $_POST['uid']);
+		kontobuchung ($_POST['buchungsart'], $_POST['buchungssumme'], $_POST['uid']);
+
+if ($_POST['art'] == '+'){
+$ausgabe = $_POST['buchungsmenge'];
+}else{
+$einnahme = $_POST['buchungsmenge'];
+}
+
+   bilanz($einnahme,$ausgabe);		
+		$nachricht = 'Hallo,'."\n\n".'Es wurde soeben eine Buchung auf dein Userkonto ausgeführt:'."\n\n".$_POST['buchungsart'].' '.number_format($_POST['buchungssumme'], 2, ',', '.').' '.$waehrung.' '.$_POST['buchungstext']."\n\n\n".'Mit freundlichen Grüßen, dein '.$seitenname.'-Team';
+		if (isset ($_POST['send_mail']) && $_POST['send_mail'] == 'ja') usermail ($_POST['email'],$seitenname.' Kontobuchung', $nachricht, '"'.$seitenname.'" <'.$betreibermail.'>');
+	}
+}
+
+// Zugangsberechtigungen aendern
+if (isset ($_POST['access'])) {
+	if (isset ($_POST['send_mail']) && $_POST['send_mail'] == 'ja') {
+		if ($_POST['status'] == 0) $desc = 'Wartend';
+		elseif ($_POST['status'] == 1) $desc = 'Freigeschaltet';
+		elseif ($_POST['status'] == 2) $desc = 'Gesperrt';
+		elseif ($_POST['status'] == 'loeschen') $desc = 'Gelöscht';
+		$grund = (empty ($_POST['hinweis'])) ? 'Keine Angabe' : $_POST['hinweis'];
+		$nachricht = 'Hallo,'."\n\n".'Dein Userstatus auf '.$seitenname.' wurde so ebend geändert.'."\n\n".'Neuer Status: '.$desc.''."\n\n".'Grund:'."\n".$grund."\n\n\n".'Mit freundlichen Grüßen, dein '.$seitenname.'-Team';
+		usermail ($_POST['email'], 'Dein Account auf '.$seitenname, $nachricht, '"'.$seitenname.'" <'.$betreibermail.'>');
+	}
+
+	if ($_POST['status'] != 'loeschen') {
+		$_POST['status'] = (int)$_POST['status'];
+		db_query ('UPDATE '.$db_prefix.'_kontodaten SET status = '.$_POST['status'].', hinweis = "'.$_POST['hinweis'].'" WHERE uid = '.$_POST['uid']);
+	} else {
+		$sperrzeit = ( time() + ( 86400 * 365 ) );
+		db_query ('INSERT INTO '.$db_prefix.'_userblacklist (uid,zeit) VALUES ('.$_POST['uid'].','.$sperrzeit.')');
+		db_query ('DELETE FROM '.$db_prefix.'_kontodaten WHERE uid = '.$_POST['uid']);
+		db_query ('DELETE FROM '.$db_prefix.'_emaildaten WHERE uid = '.$_POST['uid']);
+		db_query ('DELETE FROM '.$db_prefix.'_userdaten WHERE uid = '.$_POST['uid']);
+		db_query ('DELETE FROM '.$db_prefix.'_werberdaten WHERE uid = '.$_POST['uid']);
+		db_query ('UPDATE '.$db_prefix.'_werberdaten SET werber = 0 WHERE werber = '.$_POST['uid']);
+		echo '<meta http-equiv="refresh" content="0; URL=index.php?content=/usersystem/liste">';
+	}
+}
+
+// Notizen speichern
+if (isset ($_POST['notice'])) {
+	db_query ('UPDATE '.$db_prefix.'_userdaten SET notizen = "'.$_POST['notizen'].'" WHERE uid = '.$_POST['uid']);
+}
+
+// Daten einlesen
+$sql = db_query ('SELECT * FROM '.$db_prefix.'_kontodaten t1, '.$db_prefix.'_userdaten t2, '.$db_prefix.'_emaildaten t3, '.$db_prefix.'_werberdaten t4 WHERE t1.uid = '.$_POST['uid'].' AND t2.uid = '.$_POST['uid'].' AND t3.uid = '.$_POST['uid'].' AND t4.uid = '.$_POST['uid'].' LIMIT 1');
+if (mysql_num_rows ($sql) == 0) die ('Die angegebene User-ID existiert nicht!');
+$alledaten = mysql_fetch_assoc ($sql);
+?>
+
+<? head ('Bearbeiten des Users <i>'.$alledaten['nickname'].'</i> ('.$alledaten['uid'].')'); ?>
+<div style="text-align: center;">
+<a href="javascript:ShowUserInfo(1);">Allgemeines</a> &middot; 
+<a href="javascript:ShowUserInfo(2);">Statistik</a> &middot; 
+<a href="javascript:ShowUserInfo(3);">Konto</a> &middot; 
+<a href="javascript:ShowUserInfo(4);">Zugang</a> &middot; 
+<a href="javascript:ShowUserInfo(5);">Buchungen</a> &middot; 
+<a href="javascript:ShowUserInfo(6);">Notizen</a>
+</div><hr size=1 style="color:#c0c0c0;">
+
+<div id="Userinfo1" style="display: block;">
+<form action="" method="POST">
+<input type="hidden" name="uid" value="<?=$alledaten['uid'];?>">
+<input type="hidden" name="alt_werber" value="<?=$alledaten['werber'];?>">
+<table width="350" border="0" cellpadding="1" cellspacing="1" align="center" bgcolor="#000000">
+	<tr bgcolor="#fafafa">
+		<td align="right"><b>User-ID</b>:&nbsp;</td>
+		<td align="left">&nbsp;<?=$alledaten['uid'];?></td>
+	</tr>
+	<tr bgcolor="#ededed">
+		<td align="right"><b>Nickname</b>:&nbsp;</td>
+		<td align="left">&nbsp;<?=$alledaten['nickname'];?></td>
+	</tr>
+	<tr bgcolor="#fafafa">
+		<td align="right"><b>Werber-ID</b>:&nbsp;</td>
+		<td align="left">&nbsp;<input type="text" name="werber" value="<?=$alledaten['werber'];?>"></td>
+	</tr>
+	<tr bgcolor="#ededed">
+		<td align="right"><b>Vorname</b>:&nbsp;</td>
+		<td align="left">&nbsp;<input type="text" name="vorname" value="<?=$alledaten['vorname'];?>"></td>
+	</tr>
+	<tr bgcolor="#fafafa">
+		<td align="right"><b>Nachname</b>:&nbsp;</td>
+		<td align="left">&nbsp;<input type="text" name="nachname" value="<?=$alledaten['nachname'];?>"></td>
+	</tr>
+	<tr bgcolor="#ededed">
+		<td align="right"><b>eMailadresse</b>:&nbsp;</td>
+		<td align="left">&nbsp;<input type="text" name="emailadresse" value="<?=$alledaten['emailadresse'];?>"></td>
+	</tr>
+	<tr bgcolor="#fafafa">
+		<td align="right"><b>eMail-Empfang</b>:&nbsp;</td>
+		<td align="left">&nbsp;<select name="freigabe_fuer" size="1">
+		<option value="0" <?if ($alledaten['freigabe_fuer'] == 0) echo'SELECTED';?>>Kein Empfang</option>
+		<option value="1" <?if ($alledaten['freigabe_fuer'] == 1) echo'SELECTED';?>>Nur Newsletter</option>
+		<option value="2" <?if ($alledaten['freigabe_fuer'] == 2) echo'SELECTED';?>>Nur Paidmails</option>
+		<option value="3" <?if ($alledaten['freigabe_fuer'] == 3) echo'SELECTED';?>>Newsletter / Paidmails</option>
+		</select></td>
+	</tr>
+	<tr bgcolor="#ededed">
+		<td align="center" colspan="2"><br /><input type="submit" name="profile" value="&raquo; Updaten"><br />&nbsp;</td>
+	</tr>
+</table>
+</form>
+</div>
+
+<div id="Userinfo2" style="display: none;">
+<table width="350" border="0" cellpadding="1" cellspacing="1" align="center" bgcolor="#000000">
+	<tr bgcolor="#fafafa">
+		<td>&nbsp;<b>Refback</b>:</td>
+		<td colspan="2" align="right"><?=$alledaten['refback'];?> %&nbsp;</td>
+	</tr>
+	<tr bgcolor="#ededed">
+		<td>&nbsp;<b>Angemeldet</b>:</td>
+		<td colspan="2" align="right"><?=date('d.m.Y H:i', $alledaten['angemeldet_seit']);?>&nbsp;</td>
+	</tr>
+	<tr bgcolor="#fafafa">
+		<td>&nbsp;<b>Letzter Login</b>:</td>
+		<td colspan="2" align="right"><?=date('d.m.Y H:i', $alledaten['loginzeit']);?>&nbsp;</td>
+	</tr>
+	<tr bgcolor="#ededed">
+		<td>&nbsp;<b>Letzte Aktivit&auml;t</b>:</td>
+		<td colspan="2" align="right"><?=date('d.m.Y H:i', $alledaten['last_active']);?>&nbsp;</td>
+	</tr>
+	<tr bgcolor="#fafafa">
+		<td>&nbsp;<b>Letzte IP</b>:</td>
+		<td colspan="2" align="right"><?=$alledaten['login_ip'];?>&nbsp;</td>
+	</tr>
+	<tr bgcolor="#ededed">
+		<td>&nbsp;<b>ForcedKlicks</b>:</td>
+		<td width=50 align="right"><?=$alledaten['klicks'];?>&nbsp;</td>
+		<td align="right"><?=number_format ($alledaten['kv'], 2, ',', '.').' '.$waehrung;?>&nbsp;</td>
+	</tr>
+	<tr bgcolor="#fafafa">
+		<td>&nbsp;<b>Betteln</b>:</td>
+		<td align="right"><?=$alledaten['angebettelt'];?>&nbsp;</td>
+		<td align="right"><?=number_format ($alledaten['bv'], 2, ',', '.').' '.$waehrung;?>&nbsp;</td>
+	</tr>
+</table>
+</div>
+
+<div id="Userinfo3" style="display: none;">
+<form action="" method="POST">
+<input type="hidden" name="uid" value="<?=$alledaten['uid'];?>">
+<input type="hidden" name="email" value="<?=$alledaten['emailadresse'];?>">
+<table align="center" border="0" cellpadding="0" cellspacing="2">
+	<tr>
+		<td><b>Kontostand</b>:<br />
+		<?=number_format($alledaten['kontostand'],2,",",".").' '.$waehrung;?></td>
+	</tr>
+	<tr>
+		<td><br /><b>Summe</b>:<br />
+		<select style="width: 40px" name="buchungsart" size="1"><option value="+" SELECTED>+</option><option value="-">-</option></select><input style="width: 100px; height: 19px;" type="Text" name="buchungssumme" value=""></td>
+	</tr>
+	<tr>
+		<td><br /><b>Grund</b> (max. 30 Zeichen):<br />
+		<input style="width: 140px" type="text" name="buchungstext" value="" maxlength="30"></td>
+	</tr>
+	<tr>
+		<td><br /><b>Mail an User</b>:<br />
+		<input type="radio" name="send_mail" value="ja" /> Ja &nbsp; <input checked="checked" type="radio" name="send_mail" value="nein" /> Nein</td>
+	</tr>
+	<tr>
+		<td align="center"><br /><input type="submit" name="finanze" value="&raquo; Buchen" /></td>
+	</tr>
+</table>
+</form>
+</div>
+
+<div id="Userinfo4" style="display: none;">
+<form action="" method="POST">
+<input type="hidden" name="uid" value="<?=$alledaten['uid'];?>">
+<input type="hidden" name="email" value="<?=$alledaten['emailadresse'];?>">
+<table align="center" border="0" cellpadding="0" cellspacing="2">
+	<tr>
+		<td><b>Status</b>:<br />
+		<select name="status" size="1" style="width: 140px;">
+		<option value="0" <?if ($alledaten['status'] == 0) echo'SELECTED';?>>Wartend</option>
+		<option value="1" <?if ($alledaten['status'] == 1) echo'SELECTED';?>>Freigeschaltet</option>
+		<option value="2" <?if ($alledaten['status'] == 2) echo'SELECTED';?>>Gesperrt</option>
+		<option value="<?=$alledaten['status'];?>">--------------</option>
+		<option value="loeschen">User l&ouml;schen</option>
+</select></td>
+	</tr>
+	<tr>
+		<td><br /><b>Hinweistext</b>:<br />
+		<textarea name="hinweis" style="width: 140px; height: 100px;"><?=$alledaten['hinweis'];?></textarea></td>
+	</tr>
+	<tr>
+		<td><br /><b>Mail an User</b>:<br />
+		<input checked="checked" type="radio" name="send_mail" value="ja" /> Ja &nbsp; <input type="radio" name="send_mail" value="nein" /> Nein</td>
+	</tr>
+	<tr>
+		<td align="center"><br /><input type="submit" name="access" value="&raquo; &Auml;ndern" /></td>
+	</tr>
+</table>
+</form>
+</div>
+
+<div id="Userinfo5" style="display: none;">
+<table border="0" width="100%" cellpadding="0" cellspacing="1" bgcolor="#303030">
+<tr class="tr_head">
+<td align="center"><b>Buchungs Id</b></td>
+<td align="center"><b>Datum</b></td>
+<td align="center"><b>Zeit</b></td>
+<td align="center"><b><?=$waehrung;?></b></td>
+<td align="center"><b>Verwendungszweck</b></td>
+</tr>
+<?
+$buchungen_lesen = db_query('SELECT * FROM '.$db_prefix.'_buchungen WHERE uid = '.$alledaten['uid'].' ORDER BY buchungszeit DESC LIMIT 250');
+while ($buchung_schreiben = mysql_fetch_array($buchungen_lesen)) {
+$i++;
+	$buchcolor = ($buchung_schreiben['buchungsmenge'] > 0) ? '#000000' : '#cc0000';
+	$linecolor = ($i %2 == 0) ? 1 : 0; 
+?>
+<tr class="tr_row<?=$linecolor;?>">
+<td align="left">&nbsp;<?=$buchung_schreiben['buchungs_id'];?></td>
+<td align="center">&nbsp;<?=date("d.m.Y",$buchung_schreiben['buchungszeit']);?>&nbsp;</td>
+<td align="center">&nbsp;<?=date("H:i",$buchung_schreiben['buchungszeit']);?>&nbsp;</td>
+<td align="right">&nbsp;<font color="<?=$buchcolor;?>"><?=number_format($buchung_schreiben['buchungsmenge'],2,",",".");?></font>&nbsp;</td>
+<td align="left">&nbsp;<?=$buchung_schreiben['verwendungszweck'];?></td>
+</tr>
+<?
+}
+?>
+</table>
+</div>
+
+<div id="Userinfo6" style="display: none;">
+<form action="" method="POST">
+<input type="hidden" name="uid" value="<?=$alledaten['uid'];?>">
+<table align="center" border="0" cellpadding="0" cellspacing="2">
+       <tr>
+		<td><b>Notizen</b>:<br />
+		<textarea name="notizen" style="width: 340px; height: 150px;"><?=$alledaten['notizen'];?></textarea></td>
+	</tr>
+	<tr>
+		<td align="center"><br /><input type="submit" name="notice" value="&raquo; Speichern" /></td>
+	</tr>
+</table>
+</form>
+</div>
+
+<? foot(); ?>
\ No newline at end of file
diff --git a/adminforce/content/werbesystem/forcedbanner_468.php b/adminforce/content/werbesystem/forcedbanner_468.php
new file mode 100644
index 0000000000000000000000000000000000000000..cb69296ddecb7993980152c8d6c19306ee5e43af
--- /dev/null
+++ b/adminforce/content/werbesystem/forcedbanner_468.php
@@ -0,0 +1,82 @@
+<?
+// Variabeln definieren
+if (!isset($_POST['buchen']))		$_POST['buchen']			= "";
+if (!isset($_POST['verdienst']))	$_POST['verdienst']			= "";
+if (!isset($_POST['menge']))		$_POST['menge']				= "0";
+if (!isset($_POST['ziel']))			$_POST['ziel']				= "";
+if (!isset($_POST['banner_url']))	$_POST['banner_url']		= "";
+if (!isset($_POST['reload']))		$_POST['reload']			= "1";
+if (!isset($_POST['aufendhalt']))	$_POST['aufendhalt']		= "0";
+if (!isset($buchungsfehler))		$buchungsfehler				= "";
+if (!isset($buchung))				$buchung					= "";
+
+
+if ($_POST['buchen'] == 'Jetzt Buchen') {
+
+	// Fehlerprüfung
+	if (!$_POST['menge'] or ereg("[^0-9]", $_POST['menge'])) $buchungsfehler .= 'Bei Menge nur Zahlen!<br>';
+	if (!$_POST['banner_url'] or !$_POST['menge'] or !$_POST['ziel'] or !$_POST['reload']) $buchungsfehler .= 'Bitte alle Felder ausfüllen!<br>';
+	if ($_POST['reload'] < 1 or $_POST['reload'] > 24 or ereg("[^0-9]", $_POST['reload'])) $buchungsfehler .= 'Bei Reloadzeit nur Zahlen und zwischen 1 und 24 Stunden!<br>';
+	if ($_POST['aufendhalt'] < 0 or $_POST['aufendhalt'] > 30 or ereg("[^0-9]", $_POST['aufendhalt'])) $buchungsfehler .= 'Bei dem Aufendhalt nur Zahlen und zwischen 0 und 30 Sekunden!<br>';
+	if ($_POST['aufendhalt']>30 or $_POST['aufendhalt']<0 or ereg("[^0-9]",$_POST['aufendhalt'])) $buchungsfehler .= 'Aufendhalt nur Zahlen und zwischen 1 und 30 Sek.!<br>';
+	
+	// Buchung durchführen
+	if (!$buchungsfehler) {
+	$buchungs_id = create_code(32);
+	$reload = $_POST['reload']*60*60;
+	db_query("INSERT INTO ".$db_prefix."_gebuchte_werbung  (tan,ziel,banner,aufendhalt,menge,preis,verdienst,werbeart,status,reload,sponsor) VALUES ('".$buchungs_id."','".$_POST['ziel']."','".$_POST['banner_url']."','".$_POST['aufendhalt']."','".$_POST['menge']."','0','".$_POST['verdienst']."','forcedbanner','1','".$reload."','administrator')");
+	$buchung = 'true';
+	}
+}
+?>
+
+
+<?
+if ($buchungsfehler) {
+head("Eingabefehler");
+echo '<b><font color="#FF0000">'.$buchungsfehler.'</font></b>';
+foot();
+}
+?>
+
+<?
+if ($buchung == 'true'){
+head("Buchung erfolgreich...");
+echo '<font color="#000080">Deine Buchung war erfolgreich und wurde dem System hinzugefügt.</font>';
+foot();
+}
+?>
+
+<?head("Formular Forcedbanner 468*60");?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+    <td>Menge</td>
+    <td><input type="Text" name="menge" value="<?=$_POST['menge'];?>" style="width:60px" maxlength="6"></td>
+</tr>
+<tr>
+    <td>Userverdienst</td>
+    <td><input type="Text" name="verdienst" value="<?=$_POST['verdienst'];?>" style="width:60px" maxlength="6"></td>
+</tr>
+<tr>
+    <td>Ziel URL (mit http://)</td>
+    <td><input type="Text" name="ziel" value="<?=$_POST['ziel'];?>" style="width:330px"></td>
+</tr>
+<tr>
+     <td>Banner URL (mit http://)</td>
+     <td><input type="Text" name="banner_url" value="<?=$_POST['banner_url'];?>" style="width:330px"></td>
+</tr>
+<tr>
+    <td>Reloadzeit (Stunden)</td>
+    <td><input type="Text" name="reload" value="<?=$_POST['reload'];?>" style="width:40px" maxlength="2"> max. 24 Stunden</td>
+</tr>
+<tr>
+    <td>Aufendhalt (Sekunden)</td>
+    <td><input type="Text" name="aufendhalt" value="<?=$_POST['aufendhalt'];?>" style="width:40px" maxlength="2"> max. 30</td>
+</tr>
+<tr>
+    <td align="center" valign="middle" colspan="2"><input type="Submit" name="buchen" value="Jetzt Buchen"></td>
+</tr>
+</table>
+</form>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/werbesystem/paidmail.php b/adminforce/content/werbesystem/paidmail.php
new file mode 100644
index 0000000000000000000000000000000000000000..cb81ee4b933835e413ec1f7c1f39c344bd8d7b5e
--- /dev/null
+++ b/adminforce/content/werbesystem/paidmail.php
@@ -0,0 +1,100 @@
+<?
+if (!isset($_POST['versenden']))	$_POST['versenden']			= "";
+if (!isset($_POST['verdienst']))	$_POST['verdienst']			= "";
+if (!isset($_POST['menge']))		$_POST['menge']				= "0";
+if (!isset($_POST['ziel']))			$_POST['ziel']				= "";
+if (!isset($_POST['mailtext']))		$_POST['mailtext']			= "";
+if (!isset($_POST['beschreibung']))	$_POST['beschreibung']		= "";
+if (!isset($_POST['aufendhalt']))	$_POST['aufendhalt']		= "0";
+if (!isset($_POST['gueltig']))		$_POST['gueltig']			= "1";
+if (!isset($tan))					$tan						= "";
+
+	$empfaenger =  db_query("SELECT e.uid,e.emailadresse FROM 
+                                   ".$db_prefix."_emaildaten e
+                                   LEFT JOIN ".$db_prefix."_kontodaten k ON k.uid=e.uid
+WHERE (e.freigabe_fuer = '3' or e.freigabe_fuer = '2') AND k.status=1");
+      	$maxempf = mysql_num_rows($empfaenger);
+      	
+if ($_POST['versenden'] == 'Paidmail versenden!') {
+
+	
+	if ($_POST['menge'] == 0) $_POST['menge'] = 5000;
+	if ( $_POST['menge'] >= $maxempf ) $_POST['menge'] = $maxempf;
+
+	$tan = create_code(14);
+	$bis = time() + (86400*$_POST['gueltig']);
+	db_query("INSERT INTO ".$db_prefix."_paidmails_versendet (tan,menge,verdienst,ziel,beschreibung,mailtext,aufendhalt,gesendet,gueltig) VALUES ('".$tan."','".$_POST['menge']."','".$_POST['verdienst']."','".$_POST['ziel']."','".$_POST['beschreibung']."','".$_POST['mailtext']."','".$_POST['aufendhalt']."','".time()."','".$bis."')");
+
+	$senden = db_query("SELECT e.uid,e.emailadresse FROM 
+                                   ".$db_prefix."_emaildaten e
+                                   LEFT JOIN ".$db_prefix."_kontodaten k ON k.uid=e.uid
+WHERE (e.freigabe_fuer = '3' or e.freigabe_fuer = '2') AND k.status=1 ORDER BY RAND() LIMIT ".$_POST['menge']."");
+
+		while ($versendet = mysql_fetch_array($senden)) {
+		db_query("INSERT INTO ".$db_prefix."_paidmails_empfaenger (uid,gueltig,tan,status,aufendhalt) VALUES ('".$versendet['uid']."','".$bis."','".$tan."','0','".$_POST['aufendhalt']."')");
+		$message='Hallo,
+		dieses ist eine neue '.$seitenname.' Paidmail, für dessen Bestätigung
+		Du '.$_POST['verdienst'].' '.$waehrung.' für '.$_POST['aufendhalt'].' Sek. aufenthalt erhälst!
+		Diese Paidmail ist gültig bis '.date("d.m.Y - H:i:s",$bis).'
+
+'.$_POST['beschreibung'].'
+
+'.$_POST['mailtext'].'
+--------------------------------------------------------------------
+
+Die Betreiber von '.$seitenname.' distanzieren sich vom Inhalt dieser Mail!
+
+Diese Mail ist kein Spam da der Empfänger als Mitglied von
+'.$seitenname.' dem Empfang zugestimmt hat.
+
+Bestätigungslink:
+'.$domain.'/pclick.php?tan='.$tan.'&uid='.$versendet["uid"].'
+
+Mit freundlichen Grüßen
+Das '.$seitenname.' Team';
+usermail($versendet['emailadresse'], 'Neue '.$seitenname.' Paidmail', $message, '"'.$seitenname.'" <'.$betreibermail.'>') or die('Versandfehler');
+		
+		}
+$msg_send = '<b><div align="center"><font color="#800000">Diese Paidmail wurd an '.$_POST['menge'].' User versendet</font></div></b>';
+}
+
+?>
+
+<? head("Paidmail einbuchen und versenden"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+    <td>Anzahl der Empfänger</td>
+    <td><input type="Text" name="menge" value="<?=$_POST['menge'];?>" style="width:60px" maxlength="6"> (0 = an alle, max: <?=$maxempf;?>)</td>
+</tr>
+<tr>
+    <td>Userverdienst</td>
+    <td><input type="Text" name="verdienst" value="<?=$_POST['verdienst'];?>" style="width:60px" maxlength="6"></td>
+</tr>
+<tr>
+    <td>Ziel URL (mit http://)</td>
+    <td><input type="Text" name="ziel" value="<?=$_POST['ziel'];?>" style="width:330px"></td>
+</tr>
+<tr>
+    <td>Beschreibung</td>
+    <td><input type="Text" name="beschreibung" value="<?=$_POST['beschreibung'];?>" style="width:215px" maxlength="30"> (max. 30 Zeichen)</td>
+</tr>
+<tr>
+    <td valign="top">Mailtext</td>
+    <td><textarea cols="50" rows="10" name="mailtext"><?=$_POST['mailtext'];?></textarea></td>
+</tr>
+<tr>
+    <td>Aufendhalt (Sekunden)</td>
+    <td><input type="Text" name="aufendhalt" value="<?=$_POST['aufendhalt'];?>" style="width:40px" maxlength="2"></td>
+</tr>
+<tr>
+    <td>Gültig (TAGE)</td>
+    <td><input type="Text" name="gueltig" value="<?=$_POST['gueltig'];?>" style="width:40px" maxlength="2"></td>
+</tr>
+<tr>
+    <td align="center" valign="middle" colspan="2"><input type="Submit" name="versenden" value="Paidmail versenden!"></td>
+</tr>
+</table>
+</form>
+<?=$msg_send;?>
+<?foot();?>
\ No newline at end of file
diff --git a/adminforce/content/werbesystem/paidmail_hist.php b/adminforce/content/werbesystem/paidmail_hist.php
new file mode 100644
index 0000000000000000000000000000000000000000..97d3cb9b5a18894e11d8b69d945166ceb5b93482
--- /dev/null
+++ b/adminforce/content/werbesystem/paidmail_hist.php
@@ -0,0 +1,43 @@
+<?
+if (!isset($_GET['tan']))		$_GET['tan']		= "";
+if (!isset($_GET['loeschen']))	$_GET['loeschen']	= "";
+
+if ($_GET['loeschen'] == 'true') {
+db_query("DELETE FROM ".$db_prefix."_paidmails_versendet WHERE tan='".$_GET['tan']."'");
+db_query("DELETE FROM ".$db_prefix."_paidmails_empfaenger WHERE tan='".$_GET['tan']."'");
+}
+?>
+
+
+<?
+$mails = db_query("SELECT * FROM ".$db_prefix."_paidmails_versendet ORDER BY gesendet DESC");
+
+
+while ($history = mysql_fetch_array($mails)) {
+      head('Paidmail: '.$history['beschreibung']);
+?>
+      <b>Tan:</b> <?=$history['tan'];?><br>
+      <b>Menge:</b> <?=$history['menge'];?><br>
+      <b>Bestätigt:</b> <?=$history['bestaedigt'];?> (<?=@round($history['bestaedigt']/$history['menge']*100,2);?> %)<br>
+      <b>Userverdienst:</b> <?=$history['verdienst'];?><br>
+      <b>Gültig bis:</b> <?=date("d.m.Y - H:i",$history['gueltig']);?><br>
+      <b>Gesendet am:</b> <?=date("d.m.Y - H:i",$history['gesendet']);?>  <br>
+      <b>Aufenthalt:</b> <?=$history['aufendhalt'];?> Sek.<br>
+      
+      <p align="center"><textarea style="width:100%"><?=$history['mailtext'];?></textarea></p>
+
+<?
+      if ($history['gueltig'] <= time() or $history['menge']==$history['bestaedigt']){ echo '
+      <br><br><a href="?content=/werbesystem/paidmail_hist&amp;tan='.$history['tan'].'&amp;loeschen=true"><b>Löschen!</b></a>
+      ';
+      }
+foot();
+}
+
+if (!mysql_num_rows($mails)){
+ head("Information");
+ echo 'Noch keine Paidmails vorhanden!';
+ foot();
+}
+?>
+
diff --git a/adminforce/css/main.css b/adminforce/css/main.css
new file mode 100644
index 0000000000000000000000000000000000000000..8b82706620ac5e63ba402d1a552ed3b51772e126
--- /dev/null
+++ b/adminforce/css/main.css
@@ -0,0 +1,78 @@
+BODY {
+	background-color: #665;
+	color: #000000;
+}
+
+td {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
+}
+
+.titel {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	color: #666666;
+	font-size: 11px;
+	font-weight: bold;
+}
+
+a {
+	color: #666655;
+	text-decoration: none;
+	font: 8pt Verdana;
+}
+
+a:hover {
+	text-decoration: underline;
+	color: red;
+}
+
+.tblbgcolor {
+	background-color: #336;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+input {
+        border-width: 1;
+        font-size: 11px;
+        font-family: verdana;
+        border-color: #505050;
+        border-style: solid;
+        background-color: #E6E6E6;
+        color: 333333;
+        font-weight: normal;
+}
+
+select {
+    border-width:1; font-size: 11px; font-family: verdana; border-color:#000080;
+    border-style:solid; background-color:#EEEEEE; color:333333;
+}
+
+textarea {
+        border-width: 1;
+        font-size: 11px;
+        font-family: verdana;
+        border-color: #505050;
+        border-style: solid;
+        background-color: #E6E6E6;
+        color: 333333;
+        font-weight: normal;
+}
+
+option {
+    border-width:1; font-size: 11px; font-family: verdana; border-color:#000080;
+    border-style:solid; background-color:#EEEEEE; color:333333;
+}
+
+.tr_row0 {
+ BACKGROUND-COLOR: #E2E2E2;
+}
+
+.tr_row1 {
+ BACKGROUND-COLOR: #CDCDCD;
+}
+
+.tr_head {
+ BACKGROUND-COLOR: #0099CC;
+ COLOR:#000000;
+ FONT-WEIGHT: bold;
+}
\ No newline at end of file
diff --git a/adminforce/images/gelb.gif b/adminforce/images/gelb.gif
new file mode 100644
index 0000000000000000000000000000000000000000..2668ff9c4237f6759ff440a28101db094fa85149
Binary files /dev/null and b/adminforce/images/gelb.gif differ
diff --git a/adminforce/images/gruen.gif b/adminforce/images/gruen.gif
new file mode 100644
index 0000000000000000000000000000000000000000..51da984c216bf3db6d3b0f83219eee99d48f9e9f
Binary files /dev/null and b/adminforce/images/gruen.gif differ
diff --git a/adminforce/images/rot.gif b/adminforce/images/rot.gif
new file mode 100644
index 0000000000000000000000000000000000000000..b98d7f896e98b3b690bba58dac718c54f58e57d6
Binary files /dev/null and b/adminforce/images/rot.gif differ
diff --git a/adminforce/index.php b/adminforce/index.php
new file mode 100644
index 0000000000000000000000000000000000000000..f5520213c8027437df2ebe2b4ad87f3827c7a5f7
--- /dev/null
+++ b/adminforce/index.php
@@ -0,0 +1,52 @@
+<?
+session_start();
+$shows = 0;
+
+if($_POST['check'] == "Login") {
+  @require_once ('../lib/functions.lib.php');
+  db_connect();
+  $page = mysql_fetch_array(db_query("SELECT admin_name, admin_pass FROM ".$db_prefix."_seitenkonfig LIMIT 1"));
+       if($_POST['loginname'] == $page['admin_name'] && $_POST['passwort'] == $page['admin_pass']) {
+        $_SESSION['admin'] = 1;
+        header("Location: ".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
+       } 
+}
+
+
+if($_SESSION['admin'] == 1) {
+
+@include_once('lib/header.php'); 
+@include_once('content'.$_GET['content'].'.php');
+@include_once('lib/footer.php');
+
+} else {
+?>
+<html>
+<head>
+<title>Adminforce</title>
+</head>
+<link rel="stylesheet" href="css/main.css" type="text/css">
+<body>
+<center>
+<b>Adminlogin</b>
+
+<form action="" method="POST">
+<table border="0">
+<tr>
+    <td><b>Loginname:</b></td>
+    <td><input name="loginname" type="text"></td>
+</tr>
+<tr>
+    <td><b>Passwort:</b></td>
+    <td><input name="passwort" type="password"></td>
+</tr>
+<tr>
+    <td colspan=2 align="center"><input name="check" value="Login" type="submit"></td>
+</tr>
+</table>
+</form>
+
+</center>
+</body>
+</html>
+<?}?>
diff --git a/adminforce/lib/footer.php b/adminforce/lib/footer.php
new file mode 100644
index 0000000000000000000000000000000000000000..3bb6e5720933d44623adbe7826b3448e6dc754bc
--- /dev/null
+++ b/adminforce/lib/footer.php
@@ -0,0 +1,10 @@
+</td>
+<td width="5" valign="top" align="left"></td>
+<td width="130" valign="top" align="left"><? require ( 'lib/menue_rechts.php' ); ?></td>
+</tr>
+</table>
+
+</td></tr></table>
+</body>
+</html>
+<? db_close (); ?>
\ No newline at end of file
diff --git a/adminforce/lib/header.php b/adminforce/lib/header.php
new file mode 100644
index 0000000000000000000000000000000000000000..f31ec2fe242b9e29f488b188a3e368c5702ef47a
--- /dev/null
+++ b/adminforce/lib/header.php
@@ -0,0 +1,99 @@
+<?
+require ('../lib/functions.lib.php');
+db_connect ();
+require ('lib/layout.lib.php');
+
+// Extras-Erweiterung initalisieren und ausfuehren
+require ( '../lib/extras.lib.php' );
+
+if (!isset($_GET['content'])) $_GET['content'] = '/startseite';
+if (!file_exists('content'.$_GET['content'].'.php')) $_GET['content'] = '/error/keine_seite';
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>..:: Adminforce ::..</title>
+<meta name="Author" content="">
+<meta name="Publisher" content="">
+<meta name="Copyright" content="">
+<meta name="Keywords" content="">
+<meta name="Description" content="">
+<meta name="Page-topic" content="">
+<meta name="Audience" content="">
+<meta name="Content-language" content="DE">
+<meta name="Page-type" content="Nicht Gewinnorientiert">
+<meta name="Robots" content="INDEX,FOLLOW">
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> 
+<link rel="stylesheet" href="css/main.css" type="text/css">
+<script type="text/javascript">
+<!--
+function menuebox(id,art){
+
+if(art == 1){
+  document.getElementById(id).style.display = 'block';
+}else{
+  document.getElementById(id).style.display = 'none';
+ }
+
+}
+
+function ShowUserInfo (art) {
+	/* alle container ausblenden */
+	document.getElementById("Userinfo1").style.display = 'none';
+	document.getElementById("Userinfo2").style.display = 'none';
+	document.getElementById("Userinfo3").style.display = 'none';
+	document.getElementById("Userinfo4").style.display = 'none';
+	document.getElementById("Userinfo5").style.display = 'none';
+	document.getElementById("Userinfo6").style.display = 'none';
+
+	/* ausgewaehlten container einblenden */
+	document.getElementById("Userinfo" + art).style.display = 'block';
+}
+-->
+</script>
+<script language="javascript" type="text/javascript">
+<!--
+var win=null;
+
+onerror = stopError;
+function stopError(){
+	return true;
+}
+
+function ShowWindow (url) {
+	var myleft = (screen.availWidth - 640) / 2;
+	var mytop = (screen.availHeight - 480) / 2;
+	settings="width=640,height=480,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=yes,dependent=no";
+	win=window.open(url,"",settings);
+	win.focus();
+
+}
+// -->
+</script>
+</head>
+
+<body style="topmargin:5;leftmargin:0;">
+
+<noscript><div style="font: 10pt Arial; color: #ff0000; text-align: center;">Um <b>alle Funktionen des Adminforce</b> nutzen zu k&ouml;nnen, bitte <b>JavaScript aktivieren</b>!</div></noscript>
+
+<table width="800" cellpadding="0" cellspacing="0" border="0" align="center">
+<tr>
+<td valign="top" align="center">
+
+    <table style="width:800px; background-color:#888855; border-width:1px; cellpading:0; cellspacing:0; border-color:#000000; border-collapse: collapse;">
+    <tr>
+    <td class="titel" height="66" valign="middle" align="left">
+    &nbsp;<font face="Arial" size=6 color="#ffffff">VMS 1.2 Adminforce</font><br>
+    &nbsp;<font face="Arial" size=2 color="#ffffff"><?=$seitenname;?></font>
+    </td>
+    </tr>
+</table>
+
+<table width="800" border="0" cellpadding="0" cellspacing="0"><tr><td height="5">&nbsp;</td></tr></table>
+<!-- Inhalt -->
+
+<table width="800" cellpadding="0" cellspacing="0" border="0">
+<tr>
+<td width="130" valign="top" align="left"><? require ( 'lib/menue_links.php' ); ?></td>
+<td width="5" valign="top" align="left"></td>
+<td width="530" valign="top" align="left">
\ No newline at end of file
diff --git a/adminforce/lib/layout.lib.php b/adminforce/lib/layout.lib.php
new file mode 100644
index 0000000000000000000000000000000000000000..5bf8f0a5cbaa5590ac809a410f955f064cd2473d
--- /dev/null
+++ b/adminforce/lib/layout.lib.php
@@ -0,0 +1,36 @@
+<?
+function head($titel){
+echo '
+<table style="width:100%; border-collapse: collapse; border-color:#000000; background-color:#EEEECC; border-width:7px; cellpading:3; cellspacing:0;">
+<tr>
+    <td><font face="Arial" size=2><b>'.$titel.'</b></font></td>
+</tr>
+<tr>
+<td bgcolor="#ffffff">';
+}
+
+function foot(){
+echo '
+</td>
+</tr>
+</table>
+<br>';
+}
+
+function menuehead($titel){
+echo'
+<table style="width:100%; border-collapse: collapse; border-color:#000000; background-color:#BBBB88; border-width:1px; cellpading:3; cellspacing:0;">
+<tr>
+    <td><font face="Arial" size=2><b>'.$titel.'</b></font></td>
+</tr>
+<tr>
+<td bgcolor="#EEEECC">';
+}
+
+function menuefoot(){
+echo'</td>
+</tr>
+</table>
+<br>';
+}
+?>
\ No newline at end of file
diff --git a/adminforce/lib/menue_links.php b/adminforce/lib/menue_links.php
new file mode 100644
index 0000000000000000000000000000000000000000..2cedd7f0218dc576ecdb591e54dff0e9a6b2384b
--- /dev/null
+++ b/adminforce/lib/menue_links.php
@@ -0,0 +1,33 @@
+<?menuehead("Allgemeines")?>
+&raquo;&nbsp;<a href="?content=/startseite">Adminstart</a><br>
+&raquo;&nbsp;<a href="?content=/usersystem/liste">Userliste</a><br>
+&raquo;&nbsp;<a href="?content=/usersystem/doppelaccis">Doppalccounts</a><br>
+&raquo;&nbsp;<a href="?content=/module">Module</a><br>
+&raquo;&nbsp;<a href="?content=/bilanzsystem">Bilanz</a><br>
+<?menuefoot();?>
+
+<?menuehead("Newssystem")?>
+&raquo;&nbsp;<a href="?content=/newssystem/news">News schreiben</a><br>
+<?menuefoot();?>
+
+<?menuehead("Ralleysystem")?>
+&raquo;&nbsp;<a href="?content=/ralleysystem/aktiv">Aktivralley</a><br>
+&raquo;&nbsp;<a href="?content=/ralleysystem/klick">Klickralley</a><br>
+&raquo;&nbsp;<a href="?content=/ralleysystem/ref">Refralley</a><br>
+<?menuefoot();?>
+
+<?menuehead("Konfigurationen")?>
+&raquo;&nbsp;<a href="?content=/interfacedaten/pageconfig">Seiteneinstell.</a><br>
+&raquo;&nbsp;<a href="?content=/interfacedaten/crons">Crons</a><br>
+&raquo;&nbsp;<a href="?content=/interfacedaten/betreiber">Betreiberdaten</a><br>
+<?menuefoot();?>
+
+<?menuehead("Texte bearbeiten")?>
+&raquo;&nbsp;<a href="?content=/texte/alternativwerbung">Alternativwerbung</a><br>
+&raquo;&nbsp;<a href="?content=/texte/klickralley">Klickralley</a><br>
+&raquo;&nbsp;<a href="?content=/texte/aktivralley">Aktivralley</a><br>
+&raquo;&nbsp;<a href="?content=/texte/refralley">Refralley</a><br>
+&raquo;&nbsp;<a href="?content=/texte/agb">AGB</a><br>
+&raquo;&nbsp;<a href="?content=/texte/faq">FAQ</a><br>
+&raquo;&nbsp;<a href="?content=/texte/wartung">Wartungstext</a><br>
+<?menuefoot();?>
diff --git a/adminforce/lib/menue_rechts.php b/adminforce/lib/menue_rechts.php
new file mode 100644
index 0000000000000000000000000000000000000000..6bfcc41355442acc01734c40ca78dda87cc13f61
--- /dev/null
+++ b/adminforce/lib/menue_rechts.php
@@ -0,0 +1,26 @@
+<?menuehead("Werbung einb.")?>
+&raquo;&nbsp;<a href="?content=/werbesystem/forcedbanner_468">Forced 468</a><br>
+&raquo;&nbsp;<a href="?content=/werbesystem/paidmail"><font color="#FF0000">Paidmails vers.</font></a><br>
+&raquo;&nbsp;<a href="?content=/werbesystem/paidmail_hist"><font color="#FF0000">Paidmail Hist.</font></a><br>
+<?menuefoot();?>
+
+<?menuehead("Interfacedaten")?>
+&raquo;&nbsp;<a href="?content=/interfacedaten/fuco-ads">FuCo-Ads</a><br>
+&raquo;&nbsp;<a href="?content=/interfacedaten/webmasterlose">Webmasterlose</a><br>
+&raquo;&nbsp;<a href="?content=/interfacedaten/lose-ads">Lose-Ads</a><br>
+&raquo;&nbsp;<a href="?content=/interfacedaten/losebox">Losebox</a><br>
+&raquo;&nbsp;<a href="?content=/interfacedaten/hp-lose">HP-Lose</a><br>
+<?menuefoot();?>
+
+<?menuehead("Interfacebanner")?>
+&raquo;&nbsp;<a href="?content=/interfacebanner/fuco-ads">FuCo-Ads</a><br>
+&raquo;&nbsp;<a href="?content=/interfacebanner/webmasterlose">Webmasterlose</a><br>
+&raquo;&nbsp;<a href="?content=/interfacebanner/lose-ads">Lose-Ads</a><br>
+&raquo;&nbsp;<a href="?content=/interfacebanner/losebox">Losebox</a><br>
+&raquo;&nbsp;<a href="?content=/interfacebanner/hp-lose">HP-Lose</a><br>
+&raquo;&nbsp;<a href="?content=/interfacebanner/admin"><b>Adminbanner</b></a><br>
+&raquo;&nbsp;<a href="?content=/interfacebanner/blacklist"><b>Blacklist</b></a><br>
+<?menuefoot();?>
+
+
+
diff --git a/adminforce/moduladmin.php b/adminforce/moduladmin.php
new file mode 100644
index 0000000000000000000000000000000000000000..acf53ddca5788fb23a712ff8ffc681f39f28ebe2
--- /dev/null
+++ b/adminforce/moduladmin.php
@@ -0,0 +1,35 @@
+<?
+require ('../lib/functions.lib.php');
+db_connect ();
+require ('lib/layout.lib.php');
+
+// Extras-Erweiterung initalisieren und ausfuehren
+require ( '../lib/extras.lib.php' );
+?>
+<html>
+<head>
+<link rel="stylesheet" href="css/main.css" type="text/css">
+</head>
+<body topmargin="5" leftmargin="5">
+<noscript><div style="font: 10pt Arial; color: #ff0000; text-align: center;">Um <b>alle Funktionen des Adminforce</b> nutzen zu k&ouml;nnen, bitte <b>JavaScript aktivieren</b>!</div><br /><br /></noscript>
+<?
+$dir = '../module/';
+
+if (isset ($_GET['mod'])) {
+	if (is_dir ($dir.$_GET['mod'])) {
+		require ( '../lib/module.lib.php' );
+		define ('MODULADMIN_LOADED', TRUE);
+		if (file_exists ($dir.$_GET['mod'].'/admin.php')) require ($dir.$_GET['mod'].'/admin.php');
+		else $err = 'Die Moduladministrationsdatei wurde nicht gefunden.';
+	} else $err = 'Das angegebene Modul wurde nicht gefunden.';
+} else $err = 'Es wurde kein Modulname &uuml;bergeben.';
+
+if (isset ($err)) {
+	head ('Fehler');
+	echo 'Es ist ein Fehler auf unserer Seite aufgetreten:<br /><br />' . $err;
+	foot ();
+}
+?>
+</body>
+</html>
+<? db_close (); ?>
\ No newline at end of file
diff --git a/content/betteln.php b/content/betteln.php
new file mode 100644
index 0000000000000000000000000000000000000000..151a552f7789aa7c2c8c1789b2e1b1ab71513590
--- /dev/null
+++ b/content/betteln.php
@@ -0,0 +1,54 @@
+<?
+$_GET['ref'] = (int)$_GET['ref'];
+
+
+if ($pageconfig['reload_betteln'] == 0){
+$betteltext = '<b>Die Bettelfunktion ist auf dieser Seite deaktiviert';
+}else{
+   if ($_SESSION['uid'] == $_GET['ref'] || $_GET['ref'] == $_COOKIE['uid']){
+   $betteltext = '<b><font color="#FF0000">Du kannst dich nicht selbst anbetteln!</font></b>';
+   }else{
+      $reloadcheck = db_query("SELECT bis FROM ".$db_prefix."_reloads WHERE ip = '".$ip."' and tan = 'bettelaufruf' and bis >= ".time()." LIMIT 1");
+
+      if (!mysql_num_rows($reloadcheck)) {
+         $minimum		= $pageconfig['min_betteln'];
+         $maximum		= $pageconfig['max_betteln'];
+         srand((double)microtime()*1000000);
+         $bettelsumme	= rand($minimum*100,$maximum*100)/100;
+         $new_reload = time()+$pageconfig['reload_betteln'];
+         db_query("INSERT INTO ".$db_prefix."_reloads (ip,uid,tan,bis) VALUES ('".$ip."','".$_GET['ref']."','bettelaufruf','".$new_reload."')");
+         db_query("UPDATE ".$db_prefix."_kontodaten  SET angebettelt =angebettelt + 1, bv = bv + ".$bettelsumme.", kontostand = kontostand + '".$bettelsumme."' WHERE uid = '".$_GET['ref']."'");
+
+         refumsatz ($bettelsumme,$_GET['ref']);
+         aktivralley ($bettelsumme,$_GET['ref']);
+         bilanz(0,$bettelsumme);   
+         $betteltext = '<b>Du hast für den User '.$_GET['ref'].' gerade '.$bettelsumme.' '.$waehrung.' erbettelt!</b>';
+     } else {
+     $reloadcheck = mysql_fetch_array($reloadcheck);
+     $betteltext = '<b><font color="#FF0000">Du bist noch für '. round((($reloadcheck['bis'] - time())/60),0) .' Minuten fürs Betteln gesperrt</font></b>';
+     }
+   }
+}
+?>
+
+<?head("Betteln auf ".$seitenname);?>
+Verdiene auch Du mit!<br>
+Melde Dich bei <?=$seitenname;?> an und bewirbe Deinen persönlichen Bettellink, so
+verdienst Du deine <?=$waehrung;?> fast wie im Schlaf!<br>
+<br>
+<div align="center"><?=$betteltext;?></div>
+<?foot();?>
+
+<?
+$filename = 'lib/texte/bettelwerbung.txt';
+$fp = fopen ($filename, "r");
+$inhalt = fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+
+if ($inhalt != ''){
+head("Werbung dieser Seite");
+echo nl2br($inhalt);
+foot();
+}
+?>
\ No newline at end of file
diff --git a/content/error/kein_ref.php b/content/error/kein_ref.php
new file mode 100644
index 0000000000000000000000000000000000000000..1407cd8d2d2084af027bf532aee5c1f935e1086c
--- /dev/null
+++ b/content/error/kein_ref.php
@@ -0,0 +1,6 @@
+<?head("Refdetails - Fehlermeldung!");?>
+Du vesuchst gerade Detaildaten eines Refusers aufzurufen der Dir nicht zugeordnet ist.
+Du kannst nur die Daten aus Deiner ersten Ebene sehen, alle anderen Daten bleiben Dir
+verwehrt.
+</ul>
+<?foot();?>
\ No newline at end of file
diff --git a/content/error/kein_zutritt.php b/content/error/kein_zutritt.php
new file mode 100644
index 0000000000000000000000000000000000000000..73f5b5f22605f18bfa7c68ffa302d13ffd07a41f
--- /dev/null
+++ b/content/error/kein_zutritt.php
@@ -0,0 +1,12 @@
+<?head("Zutritt verweigert");?>
+Der Zutritt zu diesem Bereich wurde Dir verweigert!<br>
+Bevor Du dich an den Support wendest, prüfe bitte erst die unten aufgezählten Möglichkeiten
+um so unnötige Supportanfragen zu vermeiden!<br>
+<ul>
+<b>Mögliche Gründe</b><br>
+<li>Du bist nicht eingeloggt (bitte erst einloggen)</li>
+<li>Die Kontonummer/Passwortkombination stimmt nicht (Loginfehler)</li>
+<li>Du hast deinen Account noch nicht freigeschaltet (bitte Email prüfen)</li>
+<li>Die Session ist abgelaufen (verwende doch den Autologin)</li>
+</ul>
+<?foot();?>
diff --git a/content/error/keine_seite.php b/content/error/keine_seite.php
new file mode 100644
index 0000000000000000000000000000000000000000..92822aaafa7537659359edddec60934769da470a
--- /dev/null
+++ b/content/error/keine_seite.php
@@ -0,0 +1,12 @@
+<?head("Seite nicht gefunden");?>
+Die von Dir angeforderte Seite ist nicht erreichbar.<br>
+Bitte wähle aus dem Menü einen gültigen Link, sollte weiterhin das Problem bestehen informiere
+bitte den Webmaster darüber.<br>
+<ul>
+<b>Mögliche Gründe</b><br>
+<li>Die Seite wurde aus Wartungsgründen entfernt</li>
+<li>Ein Link im Menü wurde falsch gesetzt</li>
+<li>Du hast eine falsche oder ungültige URL erhalten (extern)</li>
+</ul>
+<?foot();?>
+
diff --git a/content/error/user_gesperrt.php b/content/error/user_gesperrt.php
new file mode 100644
index 0000000000000000000000000000000000000000..de50a3fd81a5ff172a324676418b12825ccff03d
--- /dev/null
+++ b/content/error/user_gesperrt.php
@@ -0,0 +1,7 @@
+<?head("Account gesperrt");?>
+Bitte wende Dich an den Webmaster!<br>
+<br>
+<b>Dein Account wurde mit folgender Begründung gesperrt!</b><br>
+<?=nl2br($login_check['hinweis']);?>
+
+<?foot();?>
\ No newline at end of file
diff --git a/content/intern/agbs.php b/content/intern/agbs.php
new file mode 100644
index 0000000000000000000000000000000000000000..cdc2227bfd912409432cda697ce50bb1fbcfa6c8
--- /dev/null
+++ b/content/intern/agbs.php
@@ -0,0 +1,14 @@
+<?
+// Variabeln
+$filename = 'lib/texte/agb.txt';
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("Allgemeine Geschäftsbedingungen");?>
+<?=nl2br($inhalt);?>
+<?foot();?>
\ No newline at end of file
diff --git a/content/intern/aktivieren.php b/content/intern/aktivieren.php
new file mode 100644
index 0000000000000000000000000000000000000000..370e35ac78524ae8e68580d68831e0c4d5192801
--- /dev/null
+++ b/content/intern/aktivieren.php
@@ -0,0 +1,43 @@
+<?
+if (!isset($_GET['ak']))		$_GET['ak']			= "";
+$_GET['ak'] = addslashes ($_GET['ak']);
+
+$aktivierung = db_query('SELECT * FROM '.$db_prefix.'_aktivierungen WHERE ak = "'.$_GET['ak'].'" LIMIT 1');
+
+if (mysql_num_rows($aktivierung)) {
+$aktivieren = mysql_fetch_array($aktivierung);
+db_query("UPDATE ".$db_prefix."_kontodaten SET status = '1' WHERE uid = '".$aktivieren['uid']."' AND status = '0' LIMIT 1");
+db_query("DELETE FROM ".$db_prefix."_aktivierungen WHERE ak = '".$_GET['ak']."' LIMIT 1");
+?>
+
+<?head("$seitenname - Accountaktivierung!");?>
+Die Aktivierung Deines Accounts bei <?=$seitenname;?> war erfolgreich,
+Du kannst Dich nun bei uns  einloggen und unser Angebot in vollem Umfang nutzen.<br>
+<br>
+Solltest Du Fehler auf unserer Webseite finden dann sende uns bitte eine Email
+an <a href="mailto:<?=$betreibermail;?>" target="_blank"><?=$betreibermail;?></a><br>
+<br>
+Wir wünschen Dir nun viel Spaß und viele viele Funcoins!<br>
+<br>
+Mit freundlichen Grüßen<br>
+Das <?=$seitenname;?> Team<br>
+<?foot();?>
+
+<?
+} else {
+?>
+
+<?head("$seitenname - Accountaktivierung [Code falsch]!");?>
+Die Aktivierung Deines Accounts bei <?=$seitenname;?> ist fehlgeschlagen,
+bitte prüfe nochmals den Aktivierungslink oder vordere den Link neu an.<br>
+<br>
+Solltest Du Fehler auf unserer Webseite finden dann sende uns bitte eine Email
+an <a href="mailto:<?=$betreibermail;?>" target="_blank"><?=$betreibermail;?></a><br>
+<br>
+Mit freundlichen Grüßen<br>
+Das <?=$seitenname;?> Team<br>
+<?foot();?>
+
+<?
+}
+?>
diff --git a/content/intern/anmelden.php b/content/intern/anmelden.php
new file mode 100644
index 0000000000000000000000000000000000000000..61439c44203d920c8f857f84bca74f5633884dfd
--- /dev/null
+++ b/content/intern/anmelden.php
@@ -0,0 +1,188 @@
+<?
+// Variabel vordefinieren!
+if (!isset($_POST['anmelden']))		$_POST['anmelden']			= "";
+if (!isset($_POST['nickname']))		$_POST['nickname']			= "";
+if (!isset($_POST['nachname']))		$_POST['nachname']			= "";
+if (!isset($_POST['vorname']))		$_POST['vorname']			= "";
+if (!isset($_POST['emailadresse']))	$_POST['emailadresse']		= "";
+if (!isset($_POST['passwort_1']))	$_POST['passwort_1']		= "";
+if (!isset($_POST['passwort_2']))	$_POST['passwort_2']		= "";
+if (!isset($_POST['uid_passwort']))	$_POST['uid_passwort']		= "";
+if (!isset($_POST['uid']))			$_POST['uid']				= "";
+if (!isset($_POST['agb']))			$_POST['agb']				= "";
+if (!isset($_POST['newsletter']))	$_POST['newsletter']		= "1";
+if (!isset($_POST['paidmails']))	$_POST['paidmails']			= "1";
+if (!isset($error))					$error						= "";
+if (!isset($anmeldeok))				$anmeldeok					= "";
+if (!isset($ak))					$ak							= "";
+
+if ($_POST['anmelden'] == "Jetzt anmelden!") {
+
+	$_POST['nachname'] = addslashes ($_POST['nachname']);
+	$_POST['vorname'] = addslashes ($_POST['vorname']);
+
+
+	$schnittstelle = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_schnittstelle LIMIT 1")) or die("Userinfo");
+	$tag = strtotime("".date("m")."/".date("d")."/".date("Y")." 0 hours 0 minutes 0 seconds");
+	$s_verbrauch = mysql_num_rows(db_query("SELECT * FROM ".$db_prefix."_schnittstelle_anfragen WHERE zeit='".$tag."' and uid='0'"));
+	// Auf Eingabefehler prüfen
+	if(!$_POST['nachname'] || !$_POST['vorname'] || !$_POST['emailadresse'] || !$_POST['passwort_1'] || !$_POST['passwort_2'] || !$_POST['uid'] || !$_POST['uid_passwort'] || !$_POST['nickname']) $error .= 'Bitte fülle alle benötigten Felder aus!<br>';
+
+	// Pruefen, ob man sich mit der eMail-Domain anmelden darf
+	$denied = explode(';', $pageconfig['denied_domains']);
+	foreach ($denied AS $nr => $domain) if (($nr < (count ($denied)-2) || strlen ($domain) >= 5) && strpos ($_POST['emailadresse'], $domain) !== FALSE) $error .= 'E-Mail-Adressen mit der Domain "<i>'.$domain.'</i>" sind bei uns nicht erlaubt!<br>';
+
+	if(!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$",$_POST['emailadresse'])) $error .= 'Der Emailsyntax ist falsch!<br>';
+	if ($_POST['passwort_1'] != $_POST['passwort_2']) $error .= 'Passwörter stimmen nicht überein!<br>';
+	if (strlen($_POST['passwort_1']) < 8) $error .= 'Passwortlänge muss min. 8 Zeichen haben<br>';
+	if (ereg("[^0-9]", $_POST['uid'])) $error .= 'Bei der Klamm Id nur Zahlen!<br>';
+	if ($_POST['agb'] != "ja") $error .= 'Du musst die AGBs bestädigen!<br>';
+	if ($_POST['uid'] == $_SESSION['werber']) $error .= 'Du kannst Dich nicht selber werben<br>';
+	if ($schnittstelle['anfragen_tag'] != 0 and $schnittstelle['anfragen_tag'] <= $s_verbrauch) $error = 'Die Schnittstellenanfragen sind für heute verbraucht!!!<br>';
+
+	// User mit der Datenbank abgleichen
+	if (!$error) {
+	$_POST['nickname'] = mysql_real_escape_string(ucfirst($_POST['nickname']));
+	$nickname_check =db_query ("SELECT `nickname` FROM ".$db_prefix."_userdaten WHERE nickname='".$_POST['nickname']."'");
+	$user_check = db_query ("SELECT `uid` FROM ".$db_prefix."_kontodaten WHERE uid='".$_POST['uid']."'");
+	$mail_check	= db_query ("SELECT `emailadresse` FROM ".$db_prefix."_emaildaten WHERE emailadresse='".$_POST['emailadresse']."'");
+	$black_check= db_query ("SELECT * FROM ".$db_prefix."_userblacklist WHERE uid='".$_POST['uid']."' and zeit >='".time()."'");
+	$sperre = mysql_fetch_array($black_check);
+	if ($sperre['zeit'] != 99999999999) {
+	$sperrtext = 'Du bist für eine Neuanmeldung noch bis <b>'.date("d.m.Y - H:i:s",$sperre['zeit']).'</b> gesperrt!<br>';
+	} else {
+	$sperrtext = '<b><i>Du bist für diese Webseite komplett gesperrt!</i></b>';
+	}
+	if (mysql_num_rows($user_check)) $error .= 'Du bist bereits bei uns angemeldet!<br>';
+	if (mysql_num_rows($mail_check)) $error .= 'Diese Emailadresse ist schon im System!<br>';
+	if (mysql_num_rows($black_check)) $error = $sperrtext;
+	if (mysql_num_rows($nickname_check)) $error .='Der Nickname ist schon vergeben!<br>';
+	}
+
+	// User beim Betreiber prüfen
+	if (!$error) {
+	if ($schnittstelle['anfragen_user'] != 0) db_query("INSERT INTO ".$db_prefix."_schnittstelle_anfragen (zeit,uid) VALUES ('".$tag."','0')");
+	@require_once ("lib/schittstellen/".$schnittstelle['schnittstelle'].".php");
+	@uservalidate ($schnittstelle['betreiber_id'],$schnittstelle['betreiber_passwort'],$_POST['uid'],$_POST['uid_passwort']);
+	if ($error) $error = $trans_ausgabe.'<br>';
+	}
+
+
+	// User eintragen
+	if (!$error) {
+	if ($_POST['newsletter'] == 0 and $_POST['paidmails'] == 0) $mailstatus = 0;
+	if ($_POST['newsletter'] == 1 and $_POST['paidmails'] == 0) $mailstatus = 1;
+	if ($_POST['newsletter'] == 0 and $_POST['paidmails'] == 1) $mailstatus = 2;
+	if ($_POST['newsletter'] == 1 and $_POST['paidmails'] == 1) $mailstatus = 3;
+	db_query("INSERT INTO ".$db_prefix."_kontodaten (uid,passwort,status,hinweis,kontostand) VALUES ('".$_POST['uid']."','".md5($_POST['passwort_1'])."','0','','0')");
+	db_query("INSERT INTO ".$db_prefix."_emaildaten (uid,emailadresse,freigabe_fuer) VALUES ('".$_POST['uid']."','".$_POST['emailadresse']."','".$mailstatus."')");
+	db_query("INSERT INTO ".$db_prefix."_userdaten (uid,nickname,vorname,nachname,angemeldet_seit) VALUES ('".$_POST['uid']."','".$_POST['nickname']."','".$_POST['vorname']."','".$_POST['nachname']."','".time()."')");
+	$ws = db_query("SELECT * FROM ".$db_prefix."_werberdaten WHERE uid='".$_POST['uid']."'");
+	db_query("INSERT INTO ".$db_prefix."_werberdaten (uid,werber,umsatz,zuordnungszeit) VALUES ('".$_POST['uid']."','".$_SESSION['werber']."','0','".time()."')");
+	$ak = md5($_POST['uid'].''.time());
+	db_query("INSERT INTO ".$db_prefix."_aktivierungen (uid,ak) VALUES ('".$_POST['uid']."','".$ak."')");
+	$email_message = 'Hallo, '.$_POST['nickname'].'
+	Du hast Dich soeben erfolgreich bei '.$seitenname.' angemeldet.
+
+	Bitte aktiviere jetzt Deinen Account, klicke dazu bitte auf den
+	Aktivierungslink: '.$domain.'/?content=/intern/aktivieren&ak='.$ak.'
+
+	----------------------------------------------------------
+	Kontonummer: '.$_POST['uid'].'
+	Passwort: '.$_POST['passwort_1'].'
+	----------------------------------------------------------
+
+	Nach der Aktivierung kannst Du dich sofort einloggen und bei
+	uns teilnehmen.
+
+	Mit freundlichen Grüßen
+	Das '.$seitenname.' Team
+	';
+	usermail($_POST['emailadresse'], "$seitenname Accountaktivierung", $email_message, '"'.$seitenname.'" <'.$betreibermail.'>');
+	$anmeldeok = "true";
+	}
+
+}
+
+if ($error){
+head("Anmeldefehler");
+echo '<font color="#cc0000">'.$error.'</font>';
+foot();
+}
+?>
+
+<? if ($anmeldeok != "true") { ?>
+<?head("$seitenname - Neuanmeldung");?>
+<center><b>Neuanmeldung</b></center>
+  <table width="100%" cellpadding="3" cellspacing="0" border="0">
+  <form action="" method="post">
+   <tr>
+    <td class="main"><b>Nickname:</b></td>
+    <td class="main"><input type="text" name="nickname" value="<?=$_POST['nickname'];?>"></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Nachname:</b></td>
+    <td class="main"><input type="text" name="nachname" value="<?=$_POST['nachname'];?>"></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Vorname:</b></td>
+    <td class="main"><input type="text" name="vorname" value="<?=$_POST['vorname'];?>"></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Emailadresse:</b></td>
+    <td class="main"><input type="text" name="emailadresse" value="<?=$_POST['emailadresse'];?>"></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Klamm Id:</b></td>
+    <td class="main"><input type="text" name="uid" value="<?=$_POST['uid'];?>"></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Lose-Passwort zur Identifizierung:</b></td>
+    <td class="main"><input type="password" name="uid_passwort"></td>
+   </tr>
+   <tr>
+    <td class="main">Werber:</td>
+    <td class="main"><? if($_SESSION['werber'] == 0) {echo '<b>keinen</b>';} else {echo $_SESSION['werber'];}?></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Passwort:</b></td>
+    <td class="main"><input type="password" name="passwort_1"></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Passwortbestätigung:</b></td>
+    <td class="main"><input type="password" name="passwort_2"></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Paidmails empfangen:</b></td>
+    <td class="main"><select name="paidmails"><option value="1" <? if ($_POST['paidmails'] == 1) { echo 'selected';}?>>Ja</option><option value="0" <? if ($_POST['paidmails'] != 1) { echo 'selected';}?>>Nein</option></select></td>
+   </tr>
+   <tr>
+    <td class="main"><b>Newsletter:</b></td>
+    <td class="main"><select name="newsletter"><option value="1" <? if ($_POST['newsletter'] == "1") { echo 'selected';}?>>Ja</option><option value="0" <? if ($_POST['newsletter'] != "1") { echo 'selected';}?>>Nein</option></select></td>
+   </tr>
+   <tr>
+    <td class="main"><b>AGB`s gelesen und akzeptiert:</b></td>
+    <td class="main"><select name="agb"><option value="ja" <? if ($_POST['agb'] == "ja") { echo 'selected';}?>>Ja</option><option value="nein" <? if ($_POST['agb'] != "ja") { echo 'selected';}?>>Nein</option></select></td>
+   </tr>
+   <tr>
+   <td class="main" align="center" colspan="2">
+   Vor dem Anmelden lese bitte die AGB`s!<br><br>
+   <input type="submit" name="anmelden" value="Jetzt anmelden!">
+   </td>
+   </tr>
+   </form>
+  </table>
+<?foot();?>
+<?} else {?>
+<?head("$seitenname - Anmeldung erfolgreich!");?>
+Deine Anmeldung bei <?=$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 <?=$seitenname;?> Team<br>
+
+<?foot();?>
+<? } ?>
+
diff --git a/content/intern/daten.php b/content/intern/daten.php
new file mode 100644
index 0000000000000000000000000000000000000000..4cac64ba5f314ca120cfead4c021a63de26c9f0b
--- /dev/null
+++ b/content/intern/daten.php
@@ -0,0 +1,42 @@
+<?
+if (isset($_POST['anf_daten']) && isset($_POST['anf_email'])) {
+        $_POST['anf_email'] = addslashes ($_POST['anf_email']);
+
+	$daten_anfordern = mysql_fetch_array(db_query("SELECT `uid`,`emailadresse` FROM ".$db_prefix."_emaildaten WHERE emailadresse = '".$_POST['anf_email']."' LIMIT 1"));
+	if ($daten_anfordern['emailadresse']) {
+	$neues_passwort = create_code(8);
+	db_query ("UPDATE ".$db_prefix."_kontodaten SET passwort='".md5($neues_passwort)."' WHERE uid=".$daten_anfordern['uid']."");
+	$email_message = 'Hallo,
+	Du hast soeben die Zugangsdaten für '.$seitenname.' angefordert.
+
+	----------------------------------------------------------
+	Kontonummer: '.$daten_anfordern['uid'].'
+	Passwort: '.$neues_passwort.'
+	----------------------------------------------------------
+
+	Jetzt kannst Du dich wieder auf '.$domain.'
+	einloggen und das Passwort wieder ändern!
+
+	Mit freundlichen Grüßen
+	Das '.$seitenname.' Team
+	';
+	usermail ($daten_anfordern['emailadresse'], "$seitenname Passwort", $email_message, '"'.$seitenname.'" <'.$betreibermail.'>');
+	$error_msg = '<b>Passwort wurde zugesandt!</b><br>';
+	} else {
+	$error_msg = '<b>Emailadresse nicht bekannt!</b><br>';
+	}
+}
+?>
+<?head("Zugangsdaten anfordern");?>
+<p align="center"><font color="red">&nbsp;<?=$error_msg;?></font></p>
+
+Wenn Du deine Zugangsdaten mal verloren haben solltest oder diese einfach nur mal verlegt hast,
+kannst Du hier diese Daten wieder in Erfahrung bringen. Wir senden an Deine bei uns gespeicherte
+Emailadresse sofort die Daten zu.<br>
+<form action="" method="post">
+<div align="center">
+<b>Angemeldetet Email-Adresse: </b><input type="Text" name="anf_email">&nbsp;&nbsp;<input type="Submit" name="anf_daten" value="Anfordern!" style="width:120px;">
+</div>
+</form>
+<?foot();?>
+
diff --git a/content/intern/faqs.php b/content/intern/faqs.php
new file mode 100644
index 0000000000000000000000000000000000000000..7fcc2873b3eafca390046d3df2d5cea3ef6e1b55
--- /dev/null
+++ b/content/intern/faqs.php
@@ -0,0 +1,14 @@
+<?
+// Variabeln
+$filename = 'lib/texte/faq.txt';
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+
+<?head("Fragen und Antworten");?>
+<?=nl2br($inhalt);?>
+<?foot();?>
\ No newline at end of file
diff --git a/content/intern/impressum.php b/content/intern/impressum.php
new file mode 100644
index 0000000000000000000000000000000000000000..ddfc23b9cd7d402f63627805fd65e7fefc93b61c
--- /dev/null
+++ b/content/intern/impressum.php
@@ -0,0 +1,20 @@
+<?head("Impressum von ".$seitenname."");?>
+Daniel Roß<BR>
+Mittelweg 6<BR>
+56479 Niederroßbach<BR>
+DEUTSCHLAND<BR>
+<BR>
+<b>Betreiber:</b> gremlincomputer [~at~] gmx.de
+<?foot();?>
+
+<?head("Rechtlicher Hinweis");?>
+Alle verwendeten Fotos, Grafiken, Texte und sonstigen Bestandteile dieser Website unterliegen dem Copyright von <a href="<?=$domain;?>" target="_blank"><?=$seitenname;?></a> und sind Eigentum von <a href="<?=$domain;?>" target="_blank"><?=$seitenname;?></a>.<br>
+<br>
+Die private oder gewerbliche Verwendung von Inhalten jeglicher Art bedarf der vorherigen Zustimmung von <a href="<?=$domain;?>" target="_blank"><?=$seitenname;?></a>.<br>
+<br>
+Die Inhalte unserer Internetseiten werden sorgfältig geprüft. Eine Garantie für die Vollständigkeit, Richtigkeit und letzte Aktualität kann jedoch nicht übernommen werden.<br>
+<br>
+<a href="<?=$domain;?>" target="_blank"><?=$seitenname;?></a> ist für den Inhalt von Websites, auf die von unseren Seiten verlinkt wird, nicht verantwortlich. Der Verweis mittels Hyperlink stellt auch keine Empfehlung dieser Websites oder der sie betreibenden Unternehmen oder ihrer Produkte durch uns dar.<br>
+<br>
+Haftungsansprüche, die durch die Nutzung unseres Internetangebotes verursacht werden, sind ausgeschlossen, sofern wir nicht vorsätzlich oder grob fahrlässig gehandelt haben. Des weiteren behält sich <a href="<?=$domain;?>" target="_blank"><?=$seitenname;?></a> das Recht vor, Änderungen oder Ergänzungen der bereitgestellten Informationen vorzunehmen.<br>
+<?foot();?>
\ No newline at end of file
diff --git a/content/intern/mediadaten.php b/content/intern/mediadaten.php
new file mode 100644
index 0000000000000000000000000000000000000000..f90c44df9c83087f4cc08a2fc7627f7e18542130
--- /dev/null
+++ b/content/intern/mediadaten.php
@@ -0,0 +1,102 @@
+<?
+if (!isset($fc_gebucht))	$fc_gebucht	= '';
+if (!isset($fc_menge))		$fc_menge	= '';
+if (!isset($fc_wert))		$fc_wert	= '';
+if (!isset($in_fc_gebucht))	$in_fc_gebucht	= '';
+if (!isset($in_fc_menge))	$in_fc_menge	= '';
+if (!isset($in_fc_wert))	$in_fc_wert	= '';
+
+$kontostats	= mysql_fetch_array(db_query("SELECT COUNT(uid) AS kd_uid , SUM(kontostand) AS kd_kontostand , SUM(klicks) AS kd_klicks , SUM(angebettelt) AS kd_angebettelt , SUM(kv) AS kd_kv , SUM(bv) AS kd_bv FROM ".$db_prefix."_kontodaten"));
+$werberdaten	= mysql_fetch_array(db_query("SELECT SUM(gesamt) AS wd_gesamt FROM ".$db_prefix."_werberdaten"));
+
+$ex_fc = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE menge >= 1 and werbeart = 'forcedbanner' and status = '1'");
+while ($count = mysql_fetch_array($ex_fc)) {
+$fc_gebucht++;
+$fc_menge = $fc_menge + $count['menge'];
+$fc_wert = $fc_wert + ($count['verdienst']*$count['menge']);
+}
+
+$heute			= strtotime("".date("m")."/".date("d")."/".date("Y").""); // Format mm.tt.yyyy
+$seitenstart	        = strtotime("04/02/2005"); // Format mm.tt.yyyy
+$tage			= ($heute - $seitenstart) / 86400;
+if ($tage <= 1) $tage = 1;
+?>
+
+<?head("Mediadaten - $seitenname");?>
+<table width="100%" border="0" cellpadding="1" cellspacing="1">
+<tr>
+<td width="50%">Start dieser Seite</td>
+<td width="50%"><?=date("d.m.Y",$seitenstart);?></td>
+</tr>
+<tr>
+<td width="50%">Guthaben aller User</td>
+<td width="50%"><?=@number_format($kontostats['kd_kontostand'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+<tr>
+<td width="50%">Guthaben Ø pro User</td>
+<td width="50%"><?=@number_format($kontostats['kd_kontostand'] / $kontostats['kd_uid'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+<tr>
+<td width="50%">Angemeldete User</td>
+<td width="50%"><?=@number_format($kontostats['kd_uid'],0,",",".");?></td>
+</tr>
+<tr>
+<td width="50%">Anmeldungen pro Tag</td>
+<td width="50%"><?=@number_format($kontostats['kd_uid'] / $tage,2,",",".");?></td>
+</tr>
+</table>
+<?foot();?>
+
+<?head("Mediadaten - Diverses");?>
+<table width="100%" border="0" cellpadding="1" cellspacing="1">
+<tr>
+<td width="50%">Forcedklicks aller User</td>
+<td width="50%"><?=@number_format($kontostats['kd_klicks'],0,",",".");?> Klicks</td>
+</tr>
+<tr>
+<td width="50%">Verdienst bei allen Forcedklicks</td>
+<td width="50%"><?=@number_format($kontostats['kd_kv'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+<tr>
+<td width="50%">Ø Verdienst pro Klick</td>
+<td width="50%"><?=@number_format($kontostats['kd_kv']/$kontostats['kd_klicks'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+</table>
+<table width="100%" border="0" cellpadding="1" cellspacing="1">
+<tr>
+<td width="50%">Bettelaufrufe alle User</td>
+<td width="50%"><?=@number_format($kontostats['kd_angebettelt'],0,",",".");?> Aufrufe</td>
+</tr>
+<tr>
+<td width="50%">Verdienst bei allen Bettelaufrufen</td>
+<td width="50%"><?=@number_format($kontostats['kd_bv'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+<tr>
+<td width="50%">Ø Verdienst pro Aufruf</td>
+<td width="50%"><?=@number_format($kontostats['kd_bv']/$kontostats['kd_angebettelt'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+</table>
+<table width="100%" border="0" cellpadding="1" cellspacing="1">
+<tr>
+<td width="50%">Refverdienste für alle Werber</td>
+<td width="50%"><?=@number_format($werberdaten['wd_gesamt'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+</table>
+<?foot();?>
+
+<?head("Mediadaten - Werbung");?>
+<table width="100%" border="0" cellpadding="1" cellspacing="1">
+<tr>
+<td width="50%">Forcedklick Kampagnen</td>
+<td width="50%"><?=@number_format($fc_gebucht,0,",",".");?> Kampagnen</td>
+</tr>
+<tr>
+<td width="50%">Forcedklick Restklicks</td>
+<td width="50%"><?=@number_format($fc_menge,0,",",".");?> Klicks</td>
+</tr>
+<tr>
+<td width="50%">Forcedklicks Gesamtwert</td>
+<td width="50%"><?=@number_format($fc_wert,2,",",".");?> <?=$waehrung;?></td>
+</tr>
+</table>
+<?foot();?>
\ No newline at end of file
diff --git a/content/intern/startseite.php b/content/intern/startseite.php
new file mode 100644
index 0000000000000000000000000000000000000000..5141a511a9b21ef907283296bb539cee81b8fa57
--- /dev/null
+++ b/content/intern/startseite.php
@@ -0,0 +1,42 @@
+<?head("Willkommen auf ".$seitenname);?>
+Hier werden sie mit Klammlose für das Surfen mit einer Surfbar bezahlt.
+Die Surfbar ist so klein das sie nicht störend wirkt und doch funktionell ist.
+Man bekommt Banner angezeigt die alle 45 Sekunden wechseln. Ergänzt wird die
+Surfbar durch Clickbanner und Paidmails durch die sie ihren Verdienst noch
+massiv steigern können<br>
+<br>
+Viel Spaß beim verdienen wünscht Vorname Nachname<br>
+<?foot();?>
+
+<?
+if ($_SESSION['login'] == 'true'){
+   $news = db_query("SELECT * FROM ".$db_prefix."_news ORDER BY id DESC LIMIT 1");
+   while ($nz = mysql_fetch_array($news)) {
+         head($nz['titel'].' vom '.date("d.m.Y - H:i:s",$nz['zeit']));
+         echo nl2br($nz['news']);
+         foot();
+   }
+}   
+?>
+
+<?head("Verdienst auf ganzer Linie !");?>
+Bei <?=$seitenname;?> verdienen sie für fast alles Klammlose. Sie können durch das
+surfen mit der Surfbar, Clickbanner, Paidmails, Werben neuer Mitglieder, etc...
+viele Klammlose erwirtschaften.
+<ul>
+<li><b>3 Ref-Ebenen:</b>
+Über 3-Refebenen verdienen Sie an ihren geworbenen Mitgliedern. Somit lohnt sich
+das werben neue Mitglieder. Allein durch das Ref-System können Sie viele Klammlose
+verdienen selbst wenn Sie selbst nichts als werben neuer Mitglieder machen.
+Die Ref-Ebenen: 8% / 3% / 1%<br>
+</li>
+<li><b>Clickbanner &amp; Paidmails:</b>
+Durch das klicken auf Clickbanner oder das bestätigen von Paidmails können Sie
+ihrer Verdienst weiter steigern<br>
+</li>
+<li><b>Bettelsystem:</b>
+Bringen sie andere User dazu ihren Bettelink zu klicken und erhöhen Sie sich
+so ihren Verdienst<br>
+</li>
+</ul>
+<?foot();?>
diff --git a/content/intern/werbemittel.php b/content/intern/werbemittel.php
new file mode 100644
index 0000000000000000000000000000000000000000..a939302a0135ad79b23724d90a0e0fe702f5e2a1
--- /dev/null
+++ b/content/intern/werbemittel.php
@@ -0,0 +1,39 @@
+<?
+/*
+Weitere Werbemittel einfach in den Ordner /images/banner/ laden!
+Diese werden automatisch erkannt und aufgelistet!
+*/
+
+if ($_SESSION['uid'] >= 0) {?>
+<? head("Dein Werbelinks"); ?>
+<table>
+<tr><td align="right"><b>Dein Reflink:</b></td><td align="left">&nbsp;<a href="<?=$domain;?>/?ref=<?=$_SESSION['uid'];?>" target="_blank"><?=$domain;?>/?ref=<?=$_SESSION['uid'];?></a></td></tr>
+<tr><td align="right"><b>Reflink und Bettellink:</b></td><td align="left">&nbsp;<a href="<?=$domain;?>/?content=/betteln&amp;ref=<?=$_SESSION['uid'];?>" target="_blank"><?=$domain;?>/?content=/betteln&amp;ref=<?=$_SESSION['uid'];?></a></td></tr>
+</table>
+<? foot(); 
+
+   $url = $domain.'/?content=/betteln&amp;ref='.$_SESSION['uid'].'';
+}else{
+   $url = $domain;
+}
+
+?>
+
+<?head("".$seitenname." - Werbemittel");?>
+<div align="center">
+<?
+$open = opendir('./images/banner/');
+while ($banner = readdir($open)){
+  if ($banner != '..' && $banner != '.' && $banner != 'Thumbs.db'){
+  $size = getimagesize('images/banner/'.$banner);
+  $groesse = filesize('images/banner/'.$banner.'')/1024;
+   echo '
+   <b>'.$size[0].'x'.$size[1].' (~ '.round($groesse).' KB)</b><br>
+   <img src="images/banner/'.$banner.'" alt="'.$seitenname.'"><br>
+   <textarea style="width:468px; height:50px;">&lt;a href="'.$url.'" target="_blank"&gt;&lt;img src="'.$domain.'/images/banner/'.$banner.'" alt="'.$seitenname.'" border="0"&gt;&lt;/a&gt;</textarea><br><br>';
+  }
+}
+closedir($open);
+?>
+</div>
+<?foot();?>
\ No newline at end of file
diff --git a/content/konto/auszahlen.php b/content/konto/auszahlen.php
new file mode 100644
index 0000000000000000000000000000000000000000..4ed852910bd6ea45fe12734e9daf62aa01653b0d
--- /dev/null
+++ b/content/konto/auszahlen.php
@@ -0,0 +1,79 @@
+<? userstatus();
+
+// Variabeln definieren
+if (!isset($_POST['auszahlen']))	$_POST['auszahlen']			= "";
+if (!isset($_POST['uid_passwort']))	$_POST['uid_passwort']		= "";
+if (!isset($_POST['trans_menge']))	$_POST['trans_menge']		= "";
+if (!isset($auszahlmeldung))		$auszahlmeldung				= "";
+
+$tag = strtotime("".date("m")."/".date("d")."/".date("Y")." 0 hours 0 minutes 0 seconds");
+$schnittstelle = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_schnittstelle LIMIT 1")) or die("Keine Schnittstellendaten!");
+
+if ($schnittstelle['anfragen_user'] != 0){
+$s_verbrauch = mysql_num_rows(db_query("SELECT * FROM ".$db_prefix."_schnittstelle_anfragen WHERE uid='".$_SESSION['uid']."' and zeit='".$tag."'"));
+}
+
+$kontodaten	= mysql_fetch_array(db_query("SELECT `kontostand` FROM ".$db_prefix."_kontodaten WHERE uid=".$_SESSION['uid']." LIMIT 1"));
+
+if ($_POST['auszahlen'] == 'Auszahlen' && $_POST['uid_passwort'] && $_POST['trans_menge']) {
+	if (!ereg("[^0-9]", $_POST['trans_menge']) and $_POST['trans_menge']  >= $schnittstelle['auszahlsumme']) {
+		if ($_POST['trans_menge'] <= $kontodaten['kontostand']) {
+			if ($schnittstelle['anfragen_user'] == 0 or $s_verbrauch < $schnittstelle['anfragen_user']) {
+				$buchungs_id = create_code(14);
+				@require_once ("lib/schnittstellen/".$schnittstelle['schnittstelle'].".php");
+				@auszahlen ($schnittstelle['betreiber_id'],$schnittstelle['betreiber_passwort'],$_SESSION['uid'],$_POST['uid_passwort'],$schnittstelle['betreiber_kennung'],$_POST['trans_menge'],$schnittstelle['auszahltext'],'');
+				if ($schnittstelle['anfragen_user'] != 0) db_query("INSERT INTO ".$db_prefix."_schnittstelle_anfragen (zeit,uid) VALUES ('".$tag."','".$_SESSION['uid']."')");
+					if ($error) {
+					$auszahlmeldung = $trans_ausgabe;
+					} else {
+					kontobuchung ('-',$_POST['trans_menge'],$_SESSION['uid']);
+					buchungsliste ($buchungs_id,'-'.$_POST['trans_menge'],$schnittstelle['auszahltext'],$_SESSION['uid']);
+					$auszahlmeldung = 'Es wurden '.$_POST['trans_menge'].' '.$waehrung.' ausgezahlt';
+					}
+			} else {
+			$auszahlmeldung = 'Deine Schnittstellenanfragen sind verbraucht!!!';
+			}
+		} else {
+		$auszahlmeldung = 'Soviel Guthaben hast Du nicht!!!';
+		}
+	} else {
+	$auszahlmeldung = 'Bitte achte auch die Buchungsmenge!!!';
+	}
+} else {
+if ($_POST['auszahlen'] == 'Auszahlen') $auszahlmeldung = 'Eingabefehler, bitte wiederholen!!!';
+}
+
+?>
+<?head($waehrung." auszahlen");?>
+Hier kannst Du deine <?=$waehrung;?> wieder auszahlen, auch bei der Auszahlung wird das Lose-Passwort benötigt um
+festzustellen ob Du nicht gesperrt bist.<br>
+<br>
+Hinweis: Wenn Du mal nicht auszahlen kannst weil es heisst das der Betreiber nicht genug Klammlose hat, dann erschrecke
+bitte nicht gleich. Zur Sicherheit des Userguthabens haben wir nur ca. 20% des Userguthabens offen liegen und der Rest
+ist im Tresor. Schreibe einfache eine Email, wenn wir es mal vergessen haben sollten genug umzubuchen.<br>
+<br>
+<i><font color="#FF0000">* Das Lose-Passwort wird nicht gespeichert, es dient nur zur Indentifizierung!</font></i>
+<?foot();?>
+
+<?head("Auszahlen");?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Kontonummer</td><td align="left"><?=$_SESSION['uid'];?></td>
+</tr>
+<tr>
+<td align="left">Aktueller Kontostand</td><td align="left"><?=number_format($kontodaten['kontostand'],2,",",".").' '.$waehrung;?></td>
+</tr>
+<tr>
+<td align="left"><?=$waehrung;?> (min. <?=$schnittstelle['auszahlsumme'];?> <?=$waehrung;?>)</td><td align="left"><input type="Text" name="trans_menge" value=""></td>
+</tr>
+<tr>
+<td align="left">Lose-Passwort *</td><td align="left"><input type="Password" name="uid_passwort" value=""></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="auszahlen" value="Auszahlen"></td>
+</tr>
+</table>
+</form>
+<?if ($auszahlmeldung) echo '<div align="center"><font color="#800000">'.$auszahlmeldung.'</font></div>';?>
+<?foot();?>
diff --git a/content/konto/buchungen.php b/content/konto/buchungen.php
new file mode 100644
index 0000000000000000000000000000000000000000..464678a1bb6a77331414a0b204c46626cc63c711
--- /dev/null
+++ b/content/konto/buchungen.php
@@ -0,0 +1,34 @@
+<? userstatus();?>
+
+<?head('Buchungsübersicht (max. 50 Buchungen)');?>
+<table border="0" width="100%" cellpadding="1" cellspacing="1" bgcolor="#000000">
+<tr class="tr_head">
+<td align="center"><b>Zeit</b></td>
+<td align="center"><b>Buchung</b></td>
+<td align="center"><b><?=$waehrung;?></b></td>
+<td align="center"><b>Verwendungszweck</b></td>
+</tr>
+<?
+$buchungen_lesen = db_query("SELECT * FROM ".$db_prefix."_buchungen WHERE uid=".$_SESSION['uid']." ORDER BY buchungszeit DESC LIMIT 50");
+while ($buchung_schreiben = mysql_fetch_array($buchungen_lesen)) {
+$i++;
+$buchcolor = '#000000';
+if ($buchung_schreiben['buchungsmenge'] < 0) $buchcolor='#cc0000';
+
+if ($i % 2 == 0){
+   $row = 0;
+} else {
+   $row = 1;
+}   
+?>
+<tr class="tr_row<?=$row;?>">
+<td align="left">&nbsp;<?=date("d.m.Y - H:i",$buchung_schreiben['buchungszeit']);?>&nbsp;</td>
+<td align="center">&nbsp;<?=$buchung_schreiben['buchungs_id'];?></td>
+<td align="right">&nbsp;<font color="<?=$buchcolor;?>"><?=number_format($buchung_schreiben['buchungsmenge'],2,",",".");?></font>&nbsp;</td>
+<td align="left">&nbsp;<?=$buchung_schreiben['verwendungszweck'];?></td>
+</tr>
+<?
+}
+?>
+</table>
+<?foot();?>
\ No newline at end of file
diff --git a/content/konto/einzahlen.php b/content/konto/einzahlen.php
new file mode 100644
index 0000000000000000000000000000000000000000..89f7ab4ad117818feb42ad89ca142fa54cd9464b
--- /dev/null
+++ b/content/konto/einzahlen.php
@@ -0,0 +1,71 @@
+<? userstatus();
+
+// Variabeln definieren
+if (!isset($_POST['einzahlen']))	$_POST['einzahlen']			= "";
+if (!isset($_POST['uid_passwort']))	$_POST['uid_passwort']		= "";
+if (!isset($_POST['trans_menge']))	$_POST['trans_menge']		= "";
+if (!isset($einzahlmeldung))		$einzahlmeldung				= "";
+
+$schnittstelle = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_schnittstelle LIMIT 1")) or die("Userinfo");
+$tag = strtotime("".date("m")."/".date("d")."/".date("Y")." 0 hours 0 minutes 0 seconds");
+
+if ($schnittstelle['anfragen_user'] != 0){
+$s_verbrauch = mysql_num_rows(db_query("SELECT * FROM ".$db_prefix."_schnittstelle_anfragen WHERE uid='".$_SESSION['uid']."' and zeit='".$tag."'"));
+}
+
+$kontodaten	= mysql_fetch_array(db_query("SELECT `kontostand` FROM ".$db_prefix."_kontodaten WHERE uid=".$_SESSION['uid']." LIMIT 1"));
+if ($_POST['einzahlen'] == 'Einzahlen' && $_POST['uid_passwort'] && $_POST['trans_menge']) {
+	$einzahlgrenze = mysql_fetch_array(db_query("SELECT `einzahlgrenze` FROM ".$db_prefix."_seitenkonfig LIMIT 1"));
+	if (!ereg("[^0-9]", $_POST['trans_menge']) and $_POST['trans_menge'] >= $schnittstelle['einzahlsumme'] and ($kontodaten['kontostand']+$_POST['trans_menge']) <= $einzahlgrenze['einzahlgrenze']) {
+		if ($schnittstelle['anfragen_user'] == 0 or $s_verbrauch < $schnittstelle['anfragen_user']) {
+			$buchungs_id = create_code(14);
+			@require_once ("lib/schnittstellen/".$schnittstelle['schnittstelle'].".php");
+			@einzahlen ($schnittstelle['betreiber_id'],$schnittstelle['betreiber_passwort'],$_SESSION['uid'],$_POST['uid_passwort'],$schnittstelle['betreiber_kennung'],$_POST['trans_menge'],$schnittstelle['einzahltext'],'');
+			if ($schnittstelle['anfragen_user'] != 0) db_query("INSERT INTO ".$db_prefix."_schnittstelle_anfragen (zeit,uid) VALUES ('".$tag."','".$_SESSION['uid']."')");
+				if ($error) {
+				$einzahlmeldung = $trans_ausgabe;
+				} else {
+				kontobuchung ('+',$_POST['trans_menge'],$_SESSION['uid']);
+				buchungsliste ($buchungs_id,$_POST['trans_menge'],$schnittstelle['einzahltext'],$_SESSION['uid']);
+				$einzahlmeldung = 'Es wurden '.$_POST['trans_menge'].' '.$waehrung.' eingezahlt';
+				}
+			} else {
+			$einzahlmeldung = 'Deine Schnittstellenanfragen sind verbraucht!!!';
+			}
+	} else {
+	$einzahlmeldung = 'Bitte achte auch die Buchungsmenge!!!';
+	}
+} else {
+if ($_POST['einzahlen'] == 'Einzahlen') $einzahlmeldung = 'Eingabefehler, bitte wiederholen!!!';
+}
+
+?>
+<?head($waehrung." einzahlen");?>
+Hier kannst Du Klammlose zu uns transferieren, die Lose werden Dir dann bei uns auf Dein Konto gutgeschrieben,
+nach der Einzahlung kannst Du Dein Guthaben nutzen.<br>
+<br>
+<i><font color="#FF0000">* Das Lose-Passwort wird nicht gespeichert, es dient nur zur Indentifizierung!</font></i>
+<?foot();?>
+
+<? head("Einazhlen"); ?>
+<form action="" method="post">
+<table width="100%" border="0" cellpadding="2" cellspacing="2">
+<tr>
+<td align="left" width="55%">Kontonummer</td><td align="left"><?=$_SESSION['uid'];?></td>
+</tr>
+<tr>
+<td align="left">Aktueller Kontostand</td><td align="left"><?=number_format($kontodaten['kontostand'],2,",",".").' '.$waehrung;?></td>
+</tr>
+<tr>
+<td align="left"><?=$waehrung;?> (min. <?=$schnittstelle['einzahlsumme'];?> <?=$waehrung;?>)</td><td align="left"><input type="Text" name="trans_menge" value=""></td>
+</tr>
+<tr>
+<td align="left">Lose-Passwort *</td><td align="left"><input type="Password" name="uid_passwort" value=""></td>
+</tr>
+<tr>
+<td align="center" colspan="2"><input type="Submit" name="einzahlen" value="Einzahlen"></td>
+</tr>
+</table>
+</form>
+<?if ($einzahlmeldung) echo '<div align="center"><font color="#800000">'.$einzahlmeldung.'</font></div>';?>
+<?foot();?>
diff --git a/content/konto/refdetails.php b/content/konto/refdetails.php
new file mode 100644
index 0000000000000000000000000000000000000000..fee76525f2842e818e6b5e5ab415a59ae33a2b72
--- /dev/null
+++ b/content/konto/refdetails.php
@@ -0,0 +1,107 @@
+<?
+userstatus();
+// Variabeln definieren
+if (!isset($_POST['refback']))	        $_POST['refback']	= "";
+if (!isset($_POST['save']))		$_POST['save']	        = "";
+if (!isset($_GET['ruid']))		$_GET['ruid']	        = "";
+if (!isset($_GET['reset']))		$_GET['reset']	        = "";
+$ebene2 = 0;
+$ebene3 = 0;
+$_GET['ruid'] = (int)$_GET['ruid'];
+
+if ($_GET['reset'] == 'true') {
+db_query("UPDATE ".$db_prefix."_werberdaten SET 
+                 resetzeit = '".time()."', 
+                 reset = 0 
+WHERE uid='".$_GET['ruid']."' and werber='".$_SESSION['uid']."' LIMIT 1");
+}
+
+if ($_POST['save'] == 'Save' && $_POST['refback'] >= 0 && $_POST['refback'] <= 100 && !ereg("[^0-9]", $_POST['refback'])) {
+db_query("UPDATE ".$db_prefix."_werberdaten SET 
+                 refback = '".$_POST['refback']."' 
+WHERE uid='".$_GET['ruid']."' and werber='".$_SESSION['uid']."' LIMIT 1");
+}
+
+
+$ref_check = db_query("SELECT w.uid,w.umsatz,w.reset,w.resetzeit,w.gesamt,w.refback,w.aktivzeit,w.zuordnungszeit,k.loginzeit,u.nickname FROM 
+                              ".$db_prefix."_werberdaten w
+                              LEFT JOIN ".$db_prefix."_kontodaten k ON k.uid = w.uid
+                              LEFT JOIN ".$db_prefix."_userdaten u ON u.uid = k.uid 
+WHERE w.uid=".$_GET['ruid']." and w.werber=".$_SESSION['uid']." LIMIT 1");
+
+if (!mysql_num_rows($ref_check)) {
+@include_once('content/error/kein_ref.php');
+@include_once('lib/footer.php');
+die();
+}
+
+$refuser = mysql_fetch_assoc($ref_check);
+
+if ($refuser['aktivzeit'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$refuser['aktivzeit']).'" align="absmiddle"> &raquo; User ist aktiv';
+if ($refuser['aktivzeit'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$refuser['aktivzeit']).'" align="absmiddle"> &raquo; User seit 7 tagen inaktiv';
+if ($refuser['aktivzeit'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$refuser['aktivzeit']).'" align="absmiddle"> &raquo; User seit 30 tagen inaktiv';
+
+
+$refebene_1 = db_query ("SELECT uid FROM ".$db_prefix."_werberdaten WHERE werber='".$_GET['ruid']."'");
+while ($anzeigen_1 = mysql_fetch_array($refebene_1)) {
+$ebene2++;
+}
+
+if ($ebene2 > 0){
+   $refebene_1 = db_query ("SELECT uid FROM ".$db_prefix."_werberdaten WHERE werber='".$_GET['ruid']."'");
+   while ($anzeigen_1 = mysql_fetch_array($refebene_1)) {
+   	$refebene_2 = db_query ("SELECT * FROM ".$db_prefix."_werberdaten WHERE werber='".$anzeigen_1['uid']."' ORDER BY uid ASC");
+	while ($anzeigen_2 = mysql_fetch_array($refebene_2)) {
+	$ebene3++;
+	}
+   }
+}
+?>
+
+<?head("Refdeteils von ".$refuser['nickname']);?>
+<table width="100%" cellpadding="2" cellspacing="2" border="0">
+<tr>
+<td width="50%"><b>User</b></td><td><?=$refuser['nickname'];?></td>
+</tr>
+<tr>
+<td><b>Aktueller Verdienst</b></td><td><?=number_format($refuser['umsatz']/$pageconfig['re1'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+
+<?if($refuser['resetzeit'] > 0){?>
+<tr>
+<td><b>Verdienst seit Reset</b></td><td><?=number_format($refuser['reset'],2,",",".");?> <?=$waehrung;?>&nbsp;&nbsp;&raquo;&nbsp;<a href="?content=/konto/refdetails&ruid=<?=$refuser['uid'];?>&reset=true" target="_self">Reset</a>&nbsp;&laquo;</td>
+</tr>
+<tr>
+<td><b>Letzer Reset</b></td><td><?=date("d.m.Y - H:i:s",$refuser['resetzeit']);?></td>
+</tr>
+<?}?>
+
+<tr>
+<td><b>Gesamtverdienst</b></td><td><?=number_format($refuser['gesamt'],2,",",".");?> <?=$waehrung;?></td>
+</tr>
+<tr>
+<td><b>Refback in Prozent</b></td><form action="?content=/konto/refdetails&ruid=<?=$refuser['uid'];?>" method="post"><td><input type="Text" name="refback" value="<?=$refuser['refback'];?>" maxlength="3" style="width:30px">&nbsp;<input type="Submit" name="save" value="Save" style="width:60px"></td></form>
+</tr>
+<tr>
+<td><b>Refs in Ebene 2</b></td><td><?=number_format($ebene2,0,",",".");?></td>
+</tr>
+<tr>
+<tr>
+<td><b>Refs in Ebene 3</b></td><td><?=number_format($ebene3,0,",",".");?></td>
+</tr>
+<tr>
+<td><b>Status</b></td><td><?=$refstatus;?></td>
+</tr>
+<tr>
+<td><b>Refzuordnung am</b></td><td><?if ($refuser['zuordnungszeit'] >= 1) {echo date("d.m.Y - H:i:s",$refuser['zuordnungszeit']);} else {echo'<i>Durch Admin zugewiesen!</i>';}?></td>
+</tr>
+
+<tr>
+<td><b>Letzter Login</b></td><td><?if ($refuser['loginzeit'] >= 1) {echo date("d.m.Y - H:i:s",$refuser['loginzeit']);} else {echo'<i>User war noch nie eingeloggt!</i>';}?></td>
+</tr>
+
+<tr>
+<td><b>Letzte Aktivität</b></td><td><?if ($refuser['aktivzeit'] >= 1) {echo date("d.m.Y - H:i:s",$refuser['aktivzeit']);} else {echo'<i><font color="#800000">User war noch nie aktiv!</font></i>';}?></td>
+</tr>
+</table>
+<?foot();?>
diff --git a/content/konto/refuebersicht.php b/content/konto/refuebersicht.php
new file mode 100644
index 0000000000000000000000000000000000000000..4af43cae583369613332f335d083feaf41b5b6d6
--- /dev/null
+++ b/content/konto/refuebersicht.php
@@ -0,0 +1,136 @@
+<? userstatus(); 
+
+$ebene_1 = false;
+$ebene_2 = false;
+$ebene_3 = false;
+
+$ebene1 = db_query("SELECT * FROM ".$db_prefix."_werberdaten WHERE werber=".$_SESSION['uid']." ORDER BY uid ASC");
+if (mysql_num_rows($ebene1)){
+   while ($user1 = mysql_fetch_assoc($ebene1)){
+   $ebene_1 = true;
+   $count++;
+   if ($count % 2 == 0){$row = 0;}else{$row = 1;}
+   
+    if ($user1['aktivzeit'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user1['aktivzeit']).'">';
+    if ($user1['aktivzeit'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user1['aktivzeit']).'">';
+    if ($user1['aktivzeit'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user1['aktivzeit']).'">';
+
+    $anz .= '
+    <tr class="tr_row'.$row.'">
+        <td align="center"><a href="?content=/nickpage&amp;uid='.$user1['uid'].'">'.$user1['uid'].'</a></td>
+        <td align="center">'.number_format($user1['umsatz']/100*$pageconfig['re1'],2,",",".").'</td>
+        <td align="center">'.number_format($user1['gesamt'],2,",",".").'</td>
+        <td align="center">'.$user1['refback'].'%</td>
+        <td align="center"><a href="?content=/konto/refdetails&amp;ruid='.$user1['uid'].'" target="_self">'.$refstatus.'</a></td>
+    </tr>    
+    ';
+      $ebene2 = db_query("SELECT * FROM ".$db_prefix."_werberdaten WHERE werber=".$user1['uid']." ORDER BY uid ASC");
+      while ($user2 = mysql_fetch_assoc($ebene2)){
+      $ebene_2 = true;
+      $count++;
+      if ($count % 2 == 0){$row = 0;}else{$row = 1;}
+      
+      if ($user2['aktivzeit'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user2['aktivzeit']).'">';
+      if ($user2['aktivzeit'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user2['aktivzeit']).'">';
+      if ($user2['aktivzeit'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user2['aktivzeit']).'">';
+
+      $anz2 .= '
+      <tr class="tr_row'.$row.'">
+        <td align="center"><a href="?content=/nickpage&amp;uid='.$user2['uid'].'">'.$user2['uid'].'</a></td>
+        <td align="center">'.$user1['werber'].'</td>
+        <td align="center">'.number_format($user2['umsatz']/100*$pageconfig['re2'],2,",",".").'</td>
+        <td align="center">'.number_format($user2['gesamt'],2,",",".").'</td>
+        <td align="center">'.$refstatus.'</td>
+      </tr>    
+      ';
+      
+        $ebene3 = db_query("SELECT * FROM ".$db_prefix."_werberdaten WHERE werber=".$user2['uid']." ORDER BY uid ASC");
+        while ($user3 = mysql_fetch_assoc($ebene3)){
+        $ebene_3 = true;
+        $count++;
+        if ($count % 2 == 0){$row = 0;}else{$row = 1;}
+        
+         if ($user3['aktivzeit'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['aktivzeit']).'">';
+         if ($user3['aktivzeit'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['aktivzeit']).'">';
+         if ($user3['aktivzeit'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['aktivzeit']).'">';
+
+         $anz3 .= '
+         <tr class="tr_row'.$row.'">
+            <td align="center"><a href="?content=/nickpage&amp;uid='.$user3['uid'].'">'.$user3['uid'].'</a></td>
+            <td align="center">'.$user1['werber'].'</td>
+            <td align="center">'.number_format($user3['umsatz']/100*$pageconfig['re3'],2,",",".").'</td>
+            <td align="center">'.number_format($user3['gesamt'],2,",",".").'</td>
+            <td align="center">'.$refstatus.'</td>
+         </tr>    
+               ';
+        
+        }    
+      }
+      
+   }
+
+}
+?>
+
+<?
+if($ebene_1 == true){
+head("Refübersicht (Ebene 1)");?>
+<table width="100%" cellpadding="0" cellspacing="1" bgcolor="#000000">
+<tr class="tr_head">
+<td align="center" width="20%"><b>User</b></td>
+<td align="center" width="25%"><b>Aktuell</b></td>
+<td align="center" width="25%"><b>Gesamt</b></td>
+<td align="center" width="20%"><b>Refback</b></td>
+<td align="center" width="10%"><b>Status</b></td>
+</tr>
+<?=$anz;?>
+</table>
+<?foot();
+}else{
+head("Keine Refs");
+echo "Keine Refs in Ebene 1";
+foot();
+}
+?>
+
+<?
+if ($ebene_2 == true){
+head("Refübersicht (Ebene 2)");?>
+<table width="100%" cellpadding="0" cellspacing="1" bgcolor="#000000">
+<tr class="tr_head">
+<td align="center" width="20%"><b>User</b></td>
+<td align="center" width="20%"><b>Werber</b></td>
+<td align="center" width="25%"><b>Aktuell</b></td>
+<td align="center" width="25%"><b>Gesamt</b></td>
+<td align="center" width="10%"><b>Status</b></td>
+</tr>
+<?=$anz2;?>
+</table>
+<?foot();
+}else{
+head("Keine Refs");
+echo "Keine Refs in Ebene 2";
+foot();
+}
+?>
+
+<?
+if ($ebene_3 == true){
+head("Refübersicht (Ebene 3)");?>
+<table width="100%" cellpadding="0" cellspacing="1" bgcolor="#000000">
+<tr class="tr_head">
+<td align="center" width="20%"><b>User</b></td>
+<td align="center" width="20%"><b>Werber</b></td>
+<td align="center" width="25%"><b>Aktuell</b></td>
+<td align="center" width="25%"><b>Gesamt</b></td>
+<td align="center" width="10%"><b>Status</b></td>
+</tr>
+<?$anz3;?>
+</table>
+<?foot();
+}else{
+head("Keine Refs");
+echo "Keine Refs in Ebene 3";
+foot();
+}
+?>
\ No newline at end of file
diff --git a/content/konto/uebersicht.php b/content/konto/uebersicht.php
new file mode 100644
index 0000000000000000000000000000000000000000..3799fed83a8bdeeda2babf450875849f65942502
--- /dev/null
+++ b/content/konto/uebersicht.php
@@ -0,0 +1,65 @@
+<? userstatus();
+$sql = db_query("SELECT u.nickname,u.vorname,u.nachname,u.angemeldet_seit,w.werber,w.umsatz,w.gesamt,w.refback,k.kontostand,k.klicks,k.kv,k.angebettelt,k.bv FROM
+                        ".$db_prefix."_kontodaten k
+                        LEFT JOIN ".$db_prefix."_userdaten u ON u.uid = k.uid
+                        LEFT JOIN ".$db_prefix."_werberdaten w ON w.uid = k.uid
+WHERE k.uid=".$_SESSION['uid']." LIMIT 1");
+
+$kontoinfo = mysql_fetch_array($sql);
+
+
+if ($kontoinfo['werber'] == 0) $kontoinfo['werber'] = '<i>Kein Werber</i>';
+?>
+<?head("Kontoübersicht von ".$kontoinfo['vorname']." ".$kontoinfo['nachname']);?>
+<table width="100%" border="0" cellpadding="1" cellspacing="1">
+<tr>
+<td align="left" width="55%">Nickname:</td><td align="left"><?=$kontoinfo['nickname'];?></td>
+</tr>
+<tr>
+<td align="left" width="55%">Kontonummer</td><td align="left"><?=$_SESSION['uid'];?></td>
+</tr>
+<tr>
+<td align="left">Konto eröffnet am</td><td align="left"><?=date("d.m.Y - H:i",$kontoinfo['angemeldet_seit']);?></td>
+</tr>
+<tr>
+<td align="left">Aktueller Kontostand</td><td align="left"><?=number_format($kontoinfo['kontostand'],2,",",".").' '.$waehrung;?></td>
+</tr>
+<tr>
+<td align="left">Dein Werber (Refback %)</td><td align="left"><?=$kontoinfo['werber'];?> (<?=$kontoinfo['refback'];?> %)</td>
+</tr>
+<tr>
+<td align="left">Aktueller Verdienst</td><td align="left"><?=number_format($kontoinfo['umsatz'] / 100 * $pageconfig['re1'],2,",",".").' '.$waehrung;?></td>
+</tr>
+<tr>
+<td align="left">Gesamt für den Werber</td><td align="left"><?=number_format($kontoinfo['gesamt'],2,",",".").' '.$waehrung;?></td>
+</tr>
+</table>
+<?foot();?>
+
+<?head("Diverse Einnahmen");?>
+<hr size="1" width="100%" color="#800000">
+<table width="100%" border="0" cellpadding="1" cellspacing="1">
+<tr>
+<td align="left" width="55%">Forcedklicks seit Anmeldung</td><td align="left"><?=number_format($kontoinfo['klicks'],0,",",".");?></td>
+</tr>
+<tr>
+<td align="left">Gesamtverdienst bei Forcedklicks</td><td align="left"><?=number_format($kontoinfo['kv'],2,",",".").' '.$waehrung;?></td>
+</tr>
+<tr>
+<td align="left">Ø Verdienst pro Forcedklick</td><td align="left"><?=number_format((($kontoinfo['klicks'] > 0 && $kontoinfo['kv'] > 0) ? $kontoinfo['kv']/$kontoinfo['klicks'] : 0),2,",",".").' '.$waehrung;?></td>
+</tr>
+<tr>
+<td colspan="2" width="100%%"><hr size="1" width="100%" color="#800000"></td>
+</tr>
+<tr>
+<td align="left" width="55%">Bettelaufrufe seit Anmeldung</td><td align="left"><?=number_format($kontoinfo['angebettelt'],0,",",".");?></td>
+</tr>
+<tr>
+<td align="left">Gesamtverdienst bei Bettelaufrufe</td><td align="left"><?=number_format($kontoinfo['bv'],2,",",".").' '.$waehrung;?></td>
+</tr>
+<tr>
+<td align="left">Ø Verdienst pro Bettelaufruf</td><td align="left"><?=number_format((($kontoinfo['angebettelt'] > 0 && $kontoinfo['bv'] > 0) ? $kontoinfo['bv']/$kontoinfo['angebettelt'] : 0),2,",",".").' '.$waehrung;?></td>
+</tr>
+</table>
+<?foot();?>
+
diff --git a/content/konto/userprofil.php b/content/konto/userprofil.php
new file mode 100644
index 0000000000000000000000000000000000000000..7b2b955ab01c5699d6ded89f3a558dff95a25fbc
--- /dev/null
+++ b/content/konto/userprofil.php
@@ -0,0 +1,193 @@
+<?
+userstatus();
+// Variabeln definieren
+if (!isset($_POST['aendern']))		$_POST['aendern']			= "";
+if (!isset($_POST['acc_del']))		$_POST['acc_del']			= "";
+if (!isset($_POST['del_passwort']))	$_POST['del_passwort']		= "";
+if (!isset($_POST['pwd']))			$_POST['pwd']				= "";
+if (!isset($_POST['pwd2']))			$_POST['pwd2']				= "";
+if (!isset($_POST['nickname']))		$_POST['nickname']			= "";
+if (!isset($_POST['newsletter']))	$_POST['newsletter']		= "";
+if (!isset($_POST['paidmails']))	$_POST['paidmails']			= "";
+if (!isset($change))				$change						= "";
+if (!isset($mailstatus))			$mailstatus					= "";
+if (!isset($delchange))				$delchange					= "";
+
+if ($_POST['acc_del'] == 'Jetzt löschen!' && $_POST['del_passwort']) {
+	$schnittstelle = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_schnittstelle LIMIT 1")) or die("Userinfo");
+	@require_once ("lib/schnittstellen/".$schnittstelle['schnittstelle'].".php");
+	@uservalidate ($schnittstelle['betreiber_id'],$schnittstelle['betreiber_passwort'],$_SESSION['uid'],$_POST['del_passwort']);
+	if ($error) {
+	$delchange = $trans_ausgabe.'<br>';
+	} else {
+	$sperrzeit = time()+(86400*30);
+	db_query("INSERT INTO ".$db_prefix."_userblacklist (uid,zeit) VALUES ('".$_SESSION['uid']."','".$sperrzeit."')");
+	db_query("DELETE FROM ".$db_prefix."_kontodaten WHERE uid=".$_SESSION['uid']."");
+	db_query("DELETE FROM ".$db_prefix."_emaildaten WHERE uid=".$_SESSION['uid']."");
+	db_query("DELETE FROM ".$db_prefix."_userdaten WHERE uid=".$_SESSION['uid']."");
+	db_query("DELETE FROM ".$db_prefix."_werberdaten WHERE uid=".$_SESSION['uid']."");
+	db_query("UPDATE ".$db_prefix."_werberdaten SET werber = 0 WHERE werber=".$_SESSION['uid']."");
+	echo '<meta http-equiv="refresh" content="0; URL=http://'.$_SERVER['HTTP_HOST'].'/?content=/intern/startseite&logout=true">';
+	}
+
+}
+
+if ($_POST['aendern'] == 'Jetzt ändern!') {
+	// Passwort ändern beginn!
+	if ($_POST['pwd'] && $_POST['pwd2']) {
+		if ($_POST['pwd'] == $_POST['pwd2']) {
+			if (strlen($_POST['pwd']) >= 8) {
+			db_query("UPDATE ".$db_prefix."_kontodaten SET passwort = '".md5($_POST['pwd'])."' WHERE uid=".$_SESSION['uid']."");
+			echo '<meta http-equiv="refresh" content="0; URL=http://'.$_SERVER['HTTP_HOST'].'/?content=/intern/startseite&logout=true">';
+			//$change .= 'Das Passwort wurde geändert!<br><b><font color="#FF0000">Bitte logge Dich jetzt aus und wieder neu ein!</font></b><br>';
+			} else {
+			$change = 'Passwörter müssen min. 8 Zeichen haben!';
+			}
+		} else {
+		$change = 'Die Passwörter stimmen nicht überein!';
+		}
+	}
+	// Passwort ändern ende!
+
+	//Nickname ändern beginn !
+if ($_POST['aendern'] == 'Jetzt ändern!') 
+	{
+	if (isset ($_POST['nickname'])) {
+	$nickname = mysql_real_escape_string(ucfirst($_POST['nickname']));
+	$nickname_check =db_query ("SELECT `nickname` FROM ".$db_prefix."_userdaten WHERE nickname='".$nickname."'");
+	$nickname_check2 =db_query ("SELECT `nickname` FROM ".$db_prefix."_userdaten WHERE nickname='".$nickname."'AND uid=".$_SESSION['uid']."");
+		if (mysql_num_rows($nickname_check)) 
+			if (mysql_num_rows($nickname_check2)) {
+			    
+			}else{
+			$change = 'Dieser Nickname ist schon vergeben!<br>';
+			}
+		else
+			{
+		db_query("UPDATE ".$db_prefix."_userdaten SET nickname = '".$nickname."' WHERE uid=".$_SESSION['uid']."");
+			}
+	    }
+	}
+	
+	if(!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$",$_POST['emailadresse']))
+	{
+		$change .= 'Der Emailsyntax ist falsch!<br>';
+	}
+	else
+	{
+		if ($_POST['newsletter'] == 0 and $_POST['paidmails'] == 0) $mailstatus = 0;
+		if ($_POST['newsletter'] == 1 and $_POST['paidmails'] == 0) $mailstatus = 1;
+		if ($_POST['newsletter'] == 0 and $_POST['paidmails'] == 1) $mailstatus = 2;
+		if ($_POST['newsletter'] == 1 and $_POST['paidmails'] == 1) $mailstatus = 3;
+$_POST['max_forced'] = (int)$_POST['max_forced'];
+		db_query("UPDATE ".$db_prefix."_emaildaten SET freigabe_fuer = ".$mailstatus.", emailadresse = '".$_POST['emailadresse']."' WHERE uid=".$_SESSION['uid']."");
+		db_query("UPDATE ".$db_prefix."_userdaten SET max_forced = '".$_POST['max_forced']."' WHERE uid=".$_SESSION['uid']."");
+		$change .= 'Deine Daten wurden aktualisiert!<br>';
+	}
+
+}
+
+
+$info = mysql_fetch_array(db_query("SELECT u.*,e.emailadresse,e.freigabe_fuer FROM
+                                           ".$db_prefix."_userdaten AS u
+                                           LEFT JOIN ".$db_prefix."_emaildaten AS e ON e.uid=u.uid
+WHERE u.uid=".$_SESSION['uid']." LIMIT 1"));
+
+
+if ($info['freigabe_fuer'] == 0) {$newsletter = 0; $paidmails = 0;}
+if ($info['freigabe_fuer'] == 1) {$newsletter = 1; $paidmails = 0;}
+if ($info['freigabe_fuer'] == 2) {$newsletter = 0; $paidmails = 1;}
+if ($info['freigabe_fuer'] == 3) {$newsletter = 1; $paidmails = 1;}
+?>
+
+<?head("$seitenname - Userprofil");?>
+Hier findest Du deine Profildaten, bitte passe diese Daten immer an so das diese aktuell sind. Deaktiviere bitte
+die Paidmails wenn Du keine habe möchtest!<br>
+<?foot();?>
+
+<?head("$seitenname - Profildaten");?>
+  <form action="" method="post">
+  <table width="100%" border="0" cellpadding="1" cellspacing="1">
+   <tr>
+    <td>Nickname:</td>
+    <td><input type="text" name="nickname" value="<?=$info['nickname'];?>"></td>
+   </tr>
+   <tr>
+    <td>Name:</td>
+    <td><input type="text" value="<?=$info['nachname'];?>"></td>
+   </tr>
+   <tr>
+    <td>Vorname:</td>
+    <td><input type="text" value="<?=$info['vorname'];?>"></td>
+   </tr>
+   <tr>
+    <td>Emailadresse:</td>
+    <td><input type="text" name="emailadresse" value="<?=$info['emailadresse'];?>"></td>
+   </tr>
+   <tr>
+    <td>Klamm-Id:</td>
+    <td><?=$_SESSION['uid'];?></td>
+   </tr>
+   <tr>
+    <td>Neues Passwort:</td>
+    <td><input type="password" name="pwd"></td>
+   </tr>
+   <tr>
+    <td>Neues Passwortbestätigung:</td>
+    <td><input type="password" name="pwd2"></td>
+   </tr>
+   <tr>
+    <td>Newsletter:</td>
+    <td>
+	<select name="newsletter">
+	<option value="1" <? if ($newsletter == 1) echo 'selected';?>>Ja</option>
+	<option value="0" <? if ($newsletter == 0) echo 'selected';?>>Nein</option>
+	</select>
+	</td>
+   </tr>
+   <tr>
+    <td>Paidmails:</td>
+    <td>
+	<select name="paidmails">
+	<option value="1" <? if ($paidmails == 1) echo 'selected';?>>Ja</option>
+	<option value="0" <? if ($paidmails == 0) echo 'selected';?>>Nein</option>
+	</select>
+	</td>
+   </tr>
+   <tr>
+    <td>Max. anzeigbare Forcedbanner:</td>
+    <td>
+	<select name="max_forced">
+	<option value="3" <? if ($info['max_forced'] == 3) echo 'selected';?>>3</option>
+	<option value="5" <? if ($info['max_forced'] == 5) echo 'selected';?>>5</option>
+	<option value="10" <? if ($info['max_forced'] == 10) echo 'selected';?>>10</option>
+	<option value="20" <? if ($info['max_forced'] == 20) echo 'selected';?>>20</option>
+	<option value="30" <? if ($info['max_forced'] == 30) echo 'selected';?>>30</option>
+	<option value="40" <? if ($info['max_forced'] == 40) echo 'selected';?>>40</option>
+	<option value="50" <? if ($info['max_forced'] == 50) echo 'selected';?>>50</option>
+	</select>
+	</td>
+   </tr>
+   <tr>
+   <td align="center" colspan="2"><br>
+   <input type="submit" name="aendern" value="Jetzt ändern!"><br>
+   <br>
+   <?=$change;?>
+   </td>
+   </tr>
+  </table>
+     </form>
+<?foot();?>
+
+<?head("$seitenname - Account löschen");?>
+Hier an dieser Stelle kannst Du deinen Account sofort selber löschen wenn Du es wünscht.
+Bitte bedenke das alle Daten von Dir verloren gehen und bestehendes Guthaben dann auch
+verloren geht, eine spätere Forderung an <?=$waehrung;?> ist ausgeschlossen!
+<div align="center">
+<form action="" method="post"><br>
+<?=$delchange;?>
+Schnittstellen-Passwort:&nbsp;&nbsp;<input type="Password" name="del_passwort" value="">&nbsp;&nbsp;&nbsp;<input type="Submit" name="acc_del" value="Jetzt löschen!">
+</form>
+<div align="center"><font color="#cc0000">Bei Löschung des Accounts bist Du für 30 Tage für eine Neuanmeldung gesperrt!</font></div><br>
+</div>
+<?foot();?>
diff --git a/content/module.php b/content/module.php
new file mode 100644
index 0000000000000000000000000000000000000000..27cbcee9093fc87fa0fe368843ed008d656762b8
--- /dev/null
+++ b/content/module.php
@@ -0,0 +1,38 @@
+<?
+// Aussehen des Copyrights einstellen
+$style = 2; // Design: Zahlen 1-4; Jeweils die gewuenschte Zahl eingeben und speichern.
+// Einstellungen Ende
+
+$dir = './module/';
+$linkstyle = 'index.php?content=/module&mod=';
+if (isset ($err)) unset ($err);
+
+function display ($msg) {
+global $style;
+	if ($style == 1) head ('<div style="text-align: center;">'.$msg.'</div>').foot();
+	elseif ($style == 2) {
+		head ('Hersteller');
+		echo '<div style="text-align: center;">'.$msg.'</div>';
+		foot();
+	} elseif ($style == 3) echo '<div style="text-align: right;">'.$msg.'</div>';
+	else echo '<div style="text-align: center;">'.$msg.'</div>';
+}
+
+if (isset ($_GET['mod'])) {
+	if (is_dir ($dir.$_GET['mod'])) {
+		require ( './lib/module.lib.php' );
+		define ('MODULSYSTEM_LOADED', TRUE); // "Modulsystem geladen" melden wegen Sicherheitspruefung
+		if (!isset ($_GET['open']) && file_exists ($dir.$_GET['mod'].'/module.php')) require ($dir.$_GET['mod'].'/module.php');
+		elseif (isset ($_GET['open']) && file_exists ($dir.$_GET['mod'].'/'.$_GET['open'].'.php')) require ($dir.$_GET['mod'].'/'.$_GET['open'].'.php');
+		else $err = 'Die Moduldatei wurde nicht gefunden.';
+	} else $err = 'Das angegebene Modul wurde nicht gefunden.';
+} else $err = 'Es wurde kein Modulname &uuml;bergeben.';
+
+if (isset ($err)) {
+	head ('Fehler');
+	echo 'Es ist ein Fehler auf unserer Seite aufgetreten:<br /><br />' . $err;
+	foot ();
+
+	display ('Modulsystem &copy; by <a href="http://www.totaltoll.de" target="_blank">TotalToll.de</a>');
+} else display ('<a href="javascript:;">Modulinformationen</a>');
+?>
diff --git a/content/nickpage.php b/content/nickpage.php
new file mode 100644
index 0000000000000000000000000000000000000000..3f5d8e929115247e46fd31949d5731c1d9d8e22a
--- /dev/null
+++ b/content/nickpage.php
@@ -0,0 +1,15 @@
+<?
+$_GET['nick'] = addslashes($_GET['nick']);
+
+$sql = db_query("SELECT u.angemeldet_seit,k.klicks,k.kv,k.angebettelt,k.bv FROM
+                        ".$db_prefix."_kontodaten k
+                        LEFT JOIN ".$db_prefix."_userdaten u ON u.uid = k.uid
+WHERE u.nickname='".$_GET['nick']."' LIMIT 1");
+
+$np = mysql_fetch_assoc($sql);
+head("Nickpage von ".$_GET['nick']);?>
+
+<b>Angemeldet seit:</b> <?=date("d.m.Y - H:i",$np['angemeldet_seit']);?><br>
+<b>Paidbannerstatistik:</b> <?=$np['klicks'];?> Klicks | Verdienst: <?=$np['kv'];?><br>
+<b>Bettellinkstatistik:</b> <?=$np['angebettelt'];?> Aufrufe | Verdienst: <?=$np['bv'];?>
+<?foot();?>
\ No newline at end of file
diff --git a/content/ralleys/aktiv.php b/content/ralleys/aktiv.php
new file mode 100644
index 0000000000000000000000000000000000000000..51425c319a2084b1e116da3989d760138d743008
--- /dev/null
+++ b/content/ralleys/aktiv.php
@@ -0,0 +1,63 @@
+<?
+// Variabeln
+$filename = 'lib/texte/aktivralley.txt';
+$rp = 1;
+
+// Ralleydaten auslesen
+$ralleydaten = mysql_fetch_array (db_query ('SELECT * FROM '.$db_prefix.'_ralleydaten WHERE ralley = "aktivralley" LIMIT 1'));
+
+// Datei auslesen
+if (is_readable ($filename)) $inhalt = implode ('', file ($filename));
+else echo 'Datei '.$filename.' kann nicht gelesen werden!';
+//$inhalt = str_replace('\\', '', $inhalt);
+
+if (!empty ($inhalt)){
+	head ('Unsere Aktivralley');
+	echo nl2br ($inhalt);
+	foot ();
+}
+
+head ('Platzierungen und Preise'); ?>
+Dieses Aktivralley läuft von <b><?=date("d.m.Y - H:i:s",$ralleydaten['start']);?></b> bis <b><?=date("d.m.Y - H:i:s",$ralleydaten['ende']);?></b>.<br>
+Für diese Ralley sind <b><?=number_format($ralleydaten['p1']+$ralleydaten['p2']+$ralleydaten['p3']+$ralleydaten['p4']+$ralleydaten['p5']+$ralleydaten['p6']+$ralleydaten['p7']+$ralleydaten['p8']+$ralleydaten['p9']+$ralleydaten['p10'],2,",",".").' '.$waehrung;?></b> ausgelobt die auf die Plätze <b>1</b> bis <b><?=$ralleydaten['plaetze'];?></b> verteilt werden.
+<? 
+if ($ralleydaten['pro'] > 0.00) echo 'Es müssen mindestens <b>'.number_format($ralleydaten['pro'], 0, ',', '.').' Punkte</b> erreicht werden um gewertet zu werden'; ?>
+<br />
+<br />
+
+<table width="100%" cellpadding="1" cellspacing="1" border="0">
+	<tr class="tr_head">
+		<td width="50"><b>Rang</b></td>
+		<td><b>User</b></td>
+		<td width="100"><b>Punkte</b></td>
+		<td width="150"><b>möglicher Gewinn</b></td>
+	</tr>
+
+<?
+$platz = db_query ('SELECT a.punkte, u.nickname FROM '.$db_prefix.'_aktivralley AS a LEFT JOIN '.$db_prefix.'_userdaten AS u ON u.uid = a.uid WHERE a.punkte > '.$ralleydaten['pro'].' AND a.uid != 0 ORDER BY a.punkte DESC LIMIT 10');
+while ($pa = mysql_fetch_array($platz)) {
+	$row = ($rp % 2 == 0) ? 0 : 1;
+	$mg = ($rp <= $ralleydaten['plaetze']) ? number_format($ralleydaten['p'.$rp],2, ',', '.').' '.$waehrung : '---'; ?>
+	<tr class="tr_row<?=$row;?>">
+		<td align="right"><?=$rp++;?>.&nbsp;</td>
+		<td>&nbsp;<?=$pa['nickname'];?></td>
+		<td align="right"><?=number_format($pa['punkte'],2,",",".");?>&nbsp;</td>
+		<td align="right"><?=$mg;?>&nbsp;</td>
+	</tr>
+<?
+}
+
+for($x=$rp;$x<11;$x++){
+	$row = ($rp % 2 == 0) ? 0 : 1;
+	$mg = ($rp <= $ralleydaten['plaetze']) ? number_format($ralleydaten['p'.$rp],2, ',', '.').' '.$waehrung : '---'; ?>
+	<tr class="tr_row<?=$row;?>">
+		<td align="right"><?=$rp++;?>.&nbsp;</td>
+		<td>&nbsp;n/a</td>
+		<td align="right">0&nbsp;</td>
+		<td align="right"><?=$mg;?>&nbsp;</td>
+	</tr>
+<?
+      } ?>
+</table>
+<?
+foot(); ?>
\ No newline at end of file
diff --git a/content/ralleys/klick.php b/content/ralleys/klick.php
new file mode 100644
index 0000000000000000000000000000000000000000..504e5b5323e6f9c491695ef6765288fda6c679a6
--- /dev/null
+++ b/content/ralleys/klick.php
@@ -0,0 +1,71 @@
+<?
+// Variabeln
+$filename = 'lib/texte/klickralley.txt';
+$rp = 1;
+
+// Ralleydaten auslesen
+$ralleydaten = mysql_fetch_array (db_query ('SELECT * FROM '.$db_prefix.'_ralleydaten WHERE ralley = "klickralley" LIMIT 1'));
+
+// Datei auslesen
+if (is_readable ($filename)) $inhalt = implode ('', file ($filename));
+else echo 'Datei '.$filename.' kann nicht gelesen werden!';
+
+if ($inhalt != ''){
+	head ('Unsere Klickralley');
+	echo nl2br ($inhalt);
+	foot ();
+}
+
+
+head ('Platzierungen und Preise');
+
+if ($ralleydaten['art'] != 'statisch') { ?>
+<div>Diese Klickralley läuft vom <b><?=date('d.m.Y H:i', $ralleydaten['start']);?></b> bis zum <b><?=date('d.m.Y H:i', $ralleydaten['ende']);?></b>.<br />
+Dabei handelt es sich um eine dynamische Klickralley wo pro Klick <b><?=number_format($ralleydaten['pro'], 2, ',', '.').' '.$waehrung;?></b> in den Jackpot fliesen.<br />
+Im Jackpot befinden sicher gerade <b><?=number_format($ralleydaten['jackpot'], 2, ',', '.').' '.$waehrung;?></b> die wie unten aufgeführt auf die Plätze <b>1 bis <?=$ralleydaten['plaetze'];?></b> verteilt werden.</div>
+<br />
+<?
+} else { ?>
+<div>Diese Klickralley läuft vom <b><?=date('d.m.Y H:i', $ralleydaten['start']);?></b> bis zum <b><?=date('d.m.Y H:i', $ralleydaten['ende']);?></b>.<br />
+Für diese Klickralley sind <b><?=number_format($ralleydaten['p1']+$ralleydaten['p2']+$ralleydaten['p3']+$ralleydaten['p4']+$ralleydaten['p5']+$ralleydaten['p6']+$ralleydaten['p7']+$ralleydaten['p8']+$ralleydaten['p9']+$ralleydaten['p10'],2,",",".").' '.$waehrung;?></b> ausgelobt und werden wie unten angezeigt auf die Plätze <b>1</b> bis <b><?=$ralleydaten['plaetze'];?></b> verteilt.</div>
+<br />
+<?
+} ?>
+
+<table width="100%" cellpadding="1" cellspacing="1" border="0">
+	<tr class="tr_head">
+		<td width="50"><b>Rang</b></td>
+		<td><b>User</b></td>
+		<td width="100"><b>Klicks</b></td>
+		<td width="150"><b>möglicher Gewinn</b></td>
+	</tr>
+<?
+$platz = db_query ('SELECT k.klicks,u.nickname FROM '.$db_prefix.'_klickralley k LEFT JOIN '.$db_prefix.'_userdaten u ON u.uid = k.uid ORDER BY klicks DESC LIMIT 10');
+while ($pa = mysql_fetch_array($platz)) {
+		$row = ($rp % 2 == 0) ? 0 : 1;
+		$mg = ($ralleydaten['art'] == 'statisch') ? number_format($ralleydaten['p'.$rp], 2, ',', '.').' '.$waehrung : number_format(($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$rp]), 2, ',', '.').' '.$waehrung;
+		if ($rp > $ralleydaten['plaetze']) $mg = '---'; ?>
+	<tr class="tr_row<?=$row;?>">
+		<td align="right"><?=$rp++;?>.&nbsp;</td>
+		<td>&nbsp;<?=$pa['nickname'];?></td>
+		<td align="right"><?=number_format($pa['klicks'], 0);?>&nbsp;</td>
+		<td align="right"><?=$mg;?>&nbsp;</td>
+	</tr>
+<?
+}
+
+for($x=$rp;$x<11;$x++){
+	$mg = ($ralleydaten['art'] == 'statisch') ? number_format($ralleydaten['p'.$x], 2, ',', '.').' '.$waehrung : number_format(($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$x]), 2, ',', '.').' '.$waehrung;
+	$row = ($rp % 2 == 0) ? 0 : 1;
+	if ($x > $ralleydaten['plaetze']) $mg = '---'; ?>
+	<tr class="tr_row<?=$row;?>">
+		<td align="right"><?=$rp++;?>.&nbsp;</td>
+		<td>&nbsp;n/a</td>
+		<td align="right">0&nbsp;</td>
+		<td align="right"><?=$mg;?>&nbsp;</td>
+	</tr>
+<?
+} ?>
+</table>
+<?
+foot(); ?>
diff --git a/content/ralleys/ref.php b/content/ralleys/ref.php
new file mode 100644
index 0000000000000000000000000000000000000000..536e16e7bb77450e034b91f1bee4479061ab29ed
--- /dev/null
+++ b/content/ralleys/ref.php
@@ -0,0 +1,59 @@
+<?
+// Variabeln
+$filename = 'lib/texte/refralley.txt';
+$rp = 1;
+
+// Ralleydaten auslesen
+$ralleydaten = mysql_fetch_array (db_query ('SELECT * FROM '.$db_prefix.'_ralleydaten WHERE ralley = "refralley"'));
+
+// Datei auslesen
+if (is_readable ($filename)) $inhalt = implode ('', file ($filename));
+else echo 'Datei '.$filename.' kann nicht gelesen werden!';
+//$inhalt = str_replace('\\', '', $inhalt);
+
+if (!empty ($inhalt)){
+	head ('Unsere Refralley');
+	echo nl2br ($inhalt);
+	foot ();
+}
+
+$refs = db_query ('SELECT u.nickname, COUNT(w.werber) AS total FROM '.$db_prefix.'_werberdaten w LEFT JOIN '.$db_prefix.'_userdaten u ON u.uid=w.werber WHERE w.werber != 0 AND w.zuordnungszeit >= '.$ralleydaten['start'].' AND w.zuordnungszeit <= '.$ralleydaten['ende'].' AND w.gesamt >= '.$ralleydaten['pro'].' GROUP BY w.werber ORDER BY total DESC LIMIT 10');
+$count = 1;
+while ($row = mysql_fetch_assoc($refs)) {
+	$users[$count] = $row['nickname'];
+	$ref[$count] = $row['total'];
+	$count++;
+}
+
+head ('Platzierungen und Preise'); ?>
+<div>Dieses Refralley läuft vom <b><?=date('d.m.Y H:i', $ralleydaten['start']);?></b> bis zum <b><?=date('d.m.Y H:i', $ralleydaten['ende']);?></b>.<br />
+Für diese Refralley sind <b><?=number_format($ralleydaten['p1']+$ralleydaten['p2']+$ralleydaten['p3']+$ralleydaten['p4']+$ralleydaten['p5']+$ralleydaten['p6']+$ralleydaten['p7']+$ralleydaten['p8']+$ralleydaten['p9']+$ralleydaten['p10'],2,",",".").' '.$waehrung;?></b> ausgelobt und werden wie unten angezeigt auf die Plätze <b>1</b> bis <b><?=$ralleydaten['plaetze'];?></b> verteilt.</div>
+<br />
+<?
+if ($ralleydaten['pro'] == 0) echo '<div align="center"><b>Es werden alle Refs gezählt!</b></div>';
+else echo '<div align="center"><b>Es werden nur Refs gezählt ab '.number_format($ralleydaten['pro'],2,',','.').' '.$waehrung.' Refgewinn!</b></div><br />'; ?>
+<br />
+
+<table width="100%" cellpadding="1" cellspacing="1" border="0" align="center">
+	<tr class="tr_head">
+		<td width="50"><b>Rang</b></td>
+		<td><b>User</b></td>
+		<td width="100"><b>Refs</b></td>
+		<td width="150"><b>möglicher Gewinn</b></td>
+	</tr>
+<?
+for($x=1;$x<11;$x++){
+	if (!isset($users[$x])) $users[$x] = 'n/a';
+	if (!isset($ref[$x])) $ref[$x] = 0;
+	$row = ($rp % 2 == 0) ? 0 : 1; ?>
+	<tr class="tr_row<?=$row;?>">
+		<td align="right"><?=$rp++;?>.&nbsp;</td>
+		<td>&nbsp;<?=$users[$x];?></td>
+		<td align="right"><?=$ref[$x];?>&nbsp;</td>
+		<td align="right"><?=number_format($ralleydaten['p'.$x], 0).' '.$waehrung;?>&nbsp;</td>
+	</tr>
+<?
+} ?>
+</table>
+<?
+foot(); ?>
\ No newline at end of file
diff --git a/content/verdienen/betteln4.php b/content/verdienen/betteln4.php
new file mode 100644
index 0000000000000000000000000000000000000000..0613b6327f4e482344cd7ef3f3fc657c44330386
--- /dev/null
+++ b/content/verdienen/betteln4.php
@@ -0,0 +1,39 @@
+<?
+userstatus();
+head('Dein Bettellink'); ?>
+<table width="100%" cellpadding="1" cellspacing="1" border="0">
+	<tr>
+		<td align="right"><b>Dein Reflink:</b></td>
+		<td align="left">&nbsp;<a href="<?=$domain;?>/?ref=<?=$_SESSION['uid'];?>" target="_blank"><?=$domain;?>/?ref=<?=$_SESSION['uid'];?></a></td>
+	</tr>
+	<tr>
+		<td align="right"><b>Reflink und Bettellink:</b></td>
+		<td align="left">&nbsp;<a href="<?=$domain;?>/?content=/betteln&amp;ref=<?=$_SESSION['uid'];?>" target="_blank"><?=$domain;?>/?content=/betteln&amp;ref=<?=$_SESSION['uid'];?></a></td>
+	</tr>
+</table>
+<?
+foot();
+
+head('Die Top 25 Bettler'); ?>
+<table width="100%" cellpadding="1" cellspacing="1" border="0">
+	<tr class="tr_head">
+		<td width="50"><b>Rang</b></td>
+		<td><b>Mitglied</b></td>
+		<td width="100"><b>Aufrufe</b></td>
+		<td width="150"><b><?=$waehrung;?></b></td>
+	</tr>
+<?
+$rang = 1;
+$sql = db_query ('SELECT k.uid, k.angebettelt, k.bv, u.nickname FROM '.$db_prefix.'_kontodaten k LEFT JOIN '.$db_prefix.'_userdaten u ON u.uid = k.uid ORDER BY angebettelt DESC LIMIT 25');
+while ($user = mysql_fetch_array($sql)) {
+	$row = ($rang % 2 == 0) ? 0 : 1; ?>
+	<tr class="tr_row<?=$row;?>">
+		<td align="right"><?=$rang++;?>.&nbsp;</td>
+		<td>&nbsp;<?=$user['nickname'];?></td>
+		<td align="right"><?=number_format($user['angebettelt'], 0);?>&nbsp;</td>
+		<td align="right"><?=number_format($user['bv'], 2, ',', '.').' '.$waehrung;?>&nbsp;</td>
+	</tr>
+<?
+} ?>
+</table>
+<? foot(); ?>
\ No newline at end of file
diff --git a/content/verdienen/klick4.php b/content/verdienen/klick4.php
new file mode 100644
index 0000000000000000000000000000000000000000..9d50b71175cf66a49941de23bd6cc1cb01dadf6a
--- /dev/null
+++ b/content/verdienen/klick4.php
@@ -0,0 +1,22 @@
+<?
+userstatus (); 
+head ('Paidbanner');
+
+$usr = mysql_fetch_assoc (db_query ('SELECT max_forced FROM '.$db_prefix.'_userdaten WHERE uid = '.$_SESSION['uid'].' LIMIT 1'));
+
+$fbanner = db_query ('SELECT t1.* 
+          FROM '.$db_prefix.'_gebuchte_werbung t1 
+          LEFT JOIN '.$db_prefix.'_reloads t2 
+          ON (t1.tan = t2.tan AND (t2.uid = '.$_SESSION['uid'].' OR t2.ip = "'.$ip.'")) 
+          WHERE t2.tan IS NULL AND t1.werbeart = "forcedbanner" AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '.$_SESSION['uid'].' ORDER BY t1.verdienst DESC LIMIT '.$usr['max_forced']);
+
+while ($f_banner = mysql_fetch_assoc ($fbanner)){
+	echo '<div align="center" id="banner_'.$f_banner['tan'].'"><a href="fc.php?tan='.$f_banner['tan'].'" target="_blank"><img src="'.$f_banner['banner'].'" border="0" height="60" width="468" alt="'.$f_banner['tan'].'" onClick="document.getElementById(\'banner_'.$f_banner['tan'].'\').style.display=\'none\';"></a>'
+	. '<br>Reload:'. $f_banner['reload']/3600 .' Std. | Verdienst: '.number_format($f_banner['verdienst'],2,',','.').' | Aufenthalt: '.$f_banner['aufendhalt'].' Sekunden<br><br></div>';    
+}  
+
+if (mysql_num_rows ($fbanner) > 0) echo '<div align="center"><input type="button" name="mehr_banner" value="Weitere Banner !" onclick="javascript:location.reload();" /></div>';  
+else echo '<div style="text-align: center; font-weight: bold; color: #ff0000;">Alle Banner im Reload !</div>';
+
+foot ();
+?>
\ No newline at end of file
diff --git a/content/verdienen/paidmails.php b/content/verdienen/paidmails.php
new file mode 100644
index 0000000000000000000000000000000000000000..c92451ec708bdf036c98b3f3a2e258ead31bae43
--- /dev/null
+++ b/content/verdienen/paidmails.php
@@ -0,0 +1,34 @@
+<?
+userstatus();
+head("Paidmailhistory");
+
+$paidmails     = db_query("SELECT
+                e.gueltig, e.tan, v.verdienst, v.beschreibung, v.mailtext, v.aufendhalt
+                FROM ".$db_prefix."_paidmails_empfaenger e
+                LEFT JOIN ".$db_prefix."_paidmails_versendet v ON v.tan = e.tan
+                WHERE e.uid=".$_SESSION['uid']." && e.gueltig > ".time()." && e.status=0 
+                LIMIT 10");
+    while ($mail = mysql_fetch_array($paidmails)){    
+
+            echo '
+    <table border="1" id="mail_'.$mail['tan'].'" width="100%">
+    <tr>
+        <td colspan="2" align="center"><b>'.$mail['beschreibung'].'</b></td>
+    </tr>
+    <tr>
+        <td colspan="2" align="center"><textarea readonly rows="5" cols="60">'.$mail['mailtext'].'</textarea></td>
+    </tr>
+    <tr>
+        <td><font size="2"><b>Verdienst:</b> '.$mail['verdienst'].' '.$waehrung.' &nbsp;&nbsp;&nbsp; <b>Aufenthalt:</b> '.$mail['aufendhalt'].' Sek.</td>
+        <td align="center"><b><a href="pclick.php?tan='.$mail['tan'].'&uid='.$_SESSION['uid'].'" onClick=document.getElementById("mail_'.$mail['tan'].'").style.display="none" target="_Blank">Bestätigen</a></td>
+    </Tr>
+    </table>
+    ';
+    }
+    if (!mysql_num_rows($paidmails)){
+    echo '<center><b>Keine Paidmails vorhanden!</b></center>';
+    }
+
+echo '<p align="center"><input type="button" onClick="javascript:location.reload();" value="Weitere Paidmails"></p>';
+
+foot();?>
diff --git a/cron.php b/cron.php
new file mode 100644
index 0000000000000000000000000000000000000000..b940aa3a43ede74c76bfb799050413d2f5331c8a
--- /dev/null
+++ b/cron.php
@@ -0,0 +1,22 @@
+<?
+set_time_limit(0);
+ignore_user_abort(true);
+ 
+require ( 'lib/functions.lib.php' );
+
+if ($_GET['pw'] != $cron_pw) die('Zugriff verweigert!');
+
+$cron = (int)$_GET['id'];
+
+db_connect ();
+
+$sql = db_query ('SELECT datei FROM '.$db_prefix.'_crons WHERE id = '.$cron.' LIMIT 1') or die(mysql_error());
+$result = mysql_fetch_assoc ($sql);
+
+if ( include ($result['datei']) ){
+	db_query ('UPDATE '.$db_prefix.'_crons SET laufzeit = '.time().' WHERE id = '.$cron.' LIMIT 1') or die(mysql_error());
+	echo 'Cron gelaufen';
+} else echo 'Cron nicht gelaufen';
+
+db_close();
+?>
\ No newline at end of file
diff --git a/crons/fuco-ads.int.php b/crons/fuco-ads.int.php
new file mode 100644
index 0000000000000000000000000000000000000000..c8a1adf279a31262e55ba76eebe41869c5bbf45f
--- /dev/null
+++ b/crons/fuco-ads.int.php
@@ -0,0 +1,129 @@
+<?
+unset($file1);
+$interfacedaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface = 'fuco-ads'"));
+
+if ($interfacedaten['mindestverguetung'] > 0.00) {
+// fuco-ads Forcedbanner nullen
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='fuco-ads' and werbeart='forcedbanner' and status='1'");
+// Forcedbanner einlesen
+$fb=@fopen("http://www.fuco-ads.de/interface/kampagne.php?id=".$interfacedaten['betreiber']."&pw=".$interfacedaten['pass']."&art=forcedclick&verguetung=".$interfacedaten['mindestverguetung']."&reload=24&uebrig=1","r");
+if($fb){
+	while($line=fgets($fb,1000)) {
+	$file1.=$line;
+	}
+fclose($fb);
+}
+$code = explode("|", $file1);
+$tl_count = (count($code)/6)-1;
+$bid_lesen = 4;
+// Forcedbannercodes splitten
+for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+$int_tan		= '';
+$int_ziel		= "http://www.fuco-ads.de/lose/clickbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_banner		= "http://www.fuco-ads.de/lose/viewbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_menge		= round($code[$bid_lesen-1]);
+$int_kid		= $code[$bid_lesen-4];
+$int_reload		= $code[$bid_lesen+1]*3600;
+$int_verdienst	= ($code[$bid_lesen-2]*$interfacedaten['umrechnung']) - (($code[$bid_lesen-2]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+$int_preis		= $code[$bid_lesen-2]*$interfacedaten['umrechnung'];
+$ext_verguetung	= $code[$bid_lesen-2];
+$int_tan		= create_code(32);
+$bid_lesen=$bid_lesen+6;
+// Forcedbanner updaten oder eintragen
+$int_menge = round($int_menge/$interfacedaten['restklicks']);
+if ($ext_verguetung >= $interfacedaten['mindestverguetung'] and $int_menge > 1) {
+	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'fuco-ads' and kid = '".$int_kid."'");
+	if (!mysql_num_rows($forcedbanner_check)) {
+	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','fuco-ads','forcedbanner')");
+	} else {
+	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'fuco-ads' and kid = '".$int_kid."' and status = '0'");
+	}
+}
+}
+}
+
+$file1 = "";
+if ($interfacedaten['surfklick'] > 0.00) {
+// fuco-ads Surfklick nullen
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='fuco-ads' and werbeart='surfklick' and status='1'");
+// Forcedbanner einlesen
+$fb=@fopen("http://www.fuco-ads.de/interface/kampagne.php?id=".$interfacedaten['betreiber']."&pw=".$interfacedaten['pass']."&art=surfclick&verguetung=".$interfacedaten['surfklick']."&reload=24&uebrig=1","r");
+if($fb){
+	while($line=fgets($fb,1000)) {
+	$file1.=$line;
+	}
+fclose($fb);
+}
+$code = explode("|", $file1);
+$tl_count = (count($code)/6)-1;
+$bid_lesen = 4;
+// Forcedbannercodes splitten
+for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+$int_tan		= '';
+$int_ziel		= "http://www.fuco-ads.de/lose/clickbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_banner		= "http://www.fuco-ads.de/lose/viewbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_menge		= round($code[$bid_lesen-1]);
+$int_kid		= $code[$bid_lesen-4];
+$int_reload		= $code[$bid_lesen+1]*3600;
+$int_verdienst	= ($code[$bid_lesen-2]*$interfacedaten['umrechnung']) - (($code[$bid_lesen-2]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+$int_preis		= $code[$bid_lesen-2]*$interfacedaten['umrechnung'];
+$ext_verguetung	= $code[$bid_lesen-2];
+$int_tan		= create_code(32);
+$bid_lesen=$bid_lesen+6;
+// Forcedbanner updaten oder eintragen
+$int_menge = round($int_menge/$interfacedaten['restklicks']);
+if ($ext_verguetung >= $interfacedaten['surfklick'] and $int_menge > 1) {
+	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'fuco-ads' and kid = '".$int_kid."'");
+	if (!mysql_num_rows($forcedbanner_check)) {
+	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','fuco-ads','surfklick')");
+	} else {
+	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'fuco-ads' and kid = '".$int_kid."' and status = '0'");
+	}
+}
+}
+}
+
+$file1 = "";
+if ($interfacedaten['surfview'] > 0.00) {
+// fuco-ads Surfklick nullen
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='fuco-ads' and werbeart='surfview' and status='1'");
+// Forcedbanner einlesen
+$fb=@fopen("http://www.fuco-ads.de/interface/kampagne.php?id=".$interfacedaten['betreiber']."&pw=".$interfacedaten['pass']."&art=surfview&verguetung=".$interfacedaten['surfview']."&reload=24&uebrig=1","r");
+if($fb){
+	while($line=fgets($fb,1000)) {
+	$file1.=$line;
+	}
+fclose($fb);
+}
+$code = explode("|", $file1);
+$tl_count = (count($code)/6)-1;
+$bid_lesen = 4;
+// Forcedbannercodes splitten
+for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+$int_tan		= '';
+$int_ziel		= "http://www.fuco-ads.de/lose/clickbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_banner		= "http://www.fuco-ads.de/lose/viewbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_menge		= round($code[$bid_lesen-1]);
+$int_kid		= $code[$bid_lesen-4];
+$int_reload		= $code[$bid_lesen+1]*3600;
+$int_verdienst	= ($code[$bid_lesen-2]*$interfacedaten['umrechnung']) - (($code[$bid_lesen-2]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+$int_preis		= $code[$bid_lesen-2]*$interfacedaten['umrechnung'];
+$ext_verguetung	= $code[$bid_lesen-2];
+$int_tan		= create_code(32);
+$bid_lesen=$bid_lesen+6;
+// Forcedbanner updaten oder eintragen
+$int_menge = round($int_menge/$interfacedaten['restklicks']);
+if ($ext_verguetung >= $interfacedaten['surfview'] and $int_menge > 1) {
+	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'fuco-ads' and kid = '".$int_kid."'");
+	if (!mysql_num_rows($forcedbanner_check)) {
+	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','fuco-ads','surfview')");
+	} else {
+	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'fuco-ads' and kid = '".$int_kid."' and status = '0'");
+	}
+}
+}
+}
+
+// Abgelaufene Banner löschen
+db_query ("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'fuco-ads' and status = '0'");
+?>
diff --git a/crons/fucoex.int.php b/crons/fucoex.int.php
new file mode 100644
index 0000000000000000000000000000000000000000..5d3fff02defa73eda8c9f96470faa7631c7a748d
--- /dev/null
+++ b/crons/fucoex.int.php
@@ -0,0 +1,50 @@
+<?
+unset($file1);
+
+$interfacedaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface = 'fucoex'"));
+
+// Multi-Sponsor Forcedbanner nullen
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='fucoex' and werbeart='forcedbanner' and status='1'");
+
+// Forcedbanner einlesen
+$fb=@fopen("http://www.FuCoEx.de/sponsornet/engine/output_kampagne.php?bid=".$interfacedaten['betreiber']."&pwd=".$interfacedaten['pass']."&art=forcedclick&verguetung=".$interfacedaten['mindestverguetung']."&reload=24&uebrig=1&size=468x60","r");
+if($fb){
+   while($line=fgets($fb,1000)){
+   $file1.=$line;
+   }
+   fclose($fb);
+}
+$code = explode("|", $file1);
+$tl_count = (count($code)/6)-1;
+$bid_lesen = 4;
+
+// Forcedbannercodes splitten
+for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+$int_tan		= '';
+$int_ziel		= "http://www.fucoex.de/sponsornet/engine/spwmklickn.php?linkid=".$code[$bid_lesen-4]."&bid=".$interfacedaten['betreiber'];
+$int_banner		= "http://www.fucoex.de/sponsornet/engine/spwmshowb.php?linkid=".$code[$bid_lesen-4]."&bid=".$interfacedaten['betreiber'];
+$int_menge		= round($code[$bid_lesen-1]);
+$int_kid		= $code[$bid_lesen-4];
+$int_reload		= $code[$bid_lesen+1]*3600;
+$int_verdienst	= ($code[$bid_lesen-2]*$interfacedaten['umrechnung']) - (($code[$bid_lesen-2]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+$int_preis		= $code[$bid_lesen-2]*$interfacedaten['umrechnung'];
+$ext_verguetung	= $code[$bid_lesen-2];
+$int_tan		= create_code(32);
+$bid_lesen		= $bid_lesen+6;
+
+// Forcedbanner updaten oder eintragen
+$int_menge = round($int_menge/$interfacedaten['restklicks']);
+if ($ext_verguetung >= $interfacedaten['mindestverguetung'] and $int_menge > 1) {
+	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'fucoex' and kid = '".$int_kid."'");
+	if (!mysql_num_rows($forcedbanner_check)) {
+	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','fucoex','forcedbanner')");
+	} else {
+	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'fucoex' and kid = '".$int_kid."' and status = '0'");
+	}
+}
+
+}
+
+// Abgelaufene Banner löschen
+db_query ("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'fucoex' and status = '0'");
+?>
diff --git a/crons/hp-lose.int.php b/crons/hp-lose.int.php
new file mode 100644
index 0000000000000000000000000000000000000000..0cf40e805d7aeaa1f69d4762d3c403165178e9bf
--- /dev/null
+++ b/crons/hp-lose.int.php
@@ -0,0 +1,50 @@
+<?
+unset($file1);
+
+$interfacedaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface = 'hp-lose'"));
+
+// HPLose Forcedbanner nullen
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='hp-lose' and werbeart='forcedbanner' and status='1'");
+
+// Forcedbanner einlesen
+$fb=@fopen("http://www.hplose.de/lose/interface/output_kampagne.php?id=".$interfacedaten['betreiber']."&art=forcedclick&verguetung=".$interfacedaten['mindestverguetung']."&reload=24&uebrig=1","r");
+if($fb){
+   while($line=fgets($fb,1000)){
+   $file1.=$line;
+   }
+   fclose($fb);
+}
+$code = explode("|", $file1);
+$tl_count = (count($code)/6)-1;
+$bid_lesen = 4;
+
+// Forcedbannercodes splitten
+for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+$int_tan		= '';
+$int_ziel		= "http://www.hplose.de/lose/clickbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_banner		= "http://www.hplose.de/lose/viewbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_menge		= round($code[$bid_lesen-1]);
+$int_kid		= $code[$bid_lesen-4];
+$int_reload		= $code[$bid_lesen+1]*3600;
+$int_verdienst	= ($code[$bid_lesen-2]*$interfacedaten['umrechnung']) - (($code[$bid_lesen-2]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+$int_preis		= $code[$bid_lesen-2]*$interfacedaten['umrechnung'];
+$ext_verguetung	= $code[$bid_lesen-2];
+$int_tan		= create_code(32);
+$bid_lesen=$bid_lesen+6;
+
+// Forcedbanner updaten oder eintragen
+$int_menge = round($int_menge/$interfacedaten['restklicks']);
+if ($ext_verguetung >= $interfacedaten['mindestverguetung'] and $int_menge > 1) {
+	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'hp-lose' and kid = '".$int_kid."'");
+	if (!mysql_num_rows($forcedbanner_check)) {
+	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','hp-lose','forcedbanner')");
+	} else {
+	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'hp-lose' and kid = '".$int_kid."' and status = '0'");
+	}
+}
+
+}
+
+// Abgelaufene Banner löschen
+db_query ("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'hp-lose' and status = '0'");
+?>
diff --git a/crons/lose-ads.int.php b/crons/lose-ads.int.php
new file mode 100644
index 0000000000000000000000000000000000000000..ea1d9fdc564063b723f37be196420b0a32e15527
--- /dev/null
+++ b/crons/lose-ads.int.php
@@ -0,0 +1,53 @@
+<?
+unset($file1);
+
+$interfacedaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface = 'lose-ads'"));
+
+// Lose-Ads Forcedbanner nullen
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='lose-ads' and werbeart='forcedbanner' and status='1'");
+
+// Forcedbanner einlesen
+$fb=@fopen("http://www.lose-ads.de/antisinterface/abruf.php?uid=".$interfacedaten['betreiber']."&sid=".$interfacedaten['seite']."&size=468x60&art=forcedclick&ab=".$interfacedaten['mindestverguetung']."&reload=24&uebrig=1","r");
+if($fb){
+   while($line=fgets($fb,1000)){
+   $file1.=$line;
+   }
+   fclose($fb);
+}
+$code = explode("|", $file1);
+$tl_count = (count($code)/7)-1;
+$bid_lesen = 0;
+
+//0bid|1name|2verguetung|3uebrig|4reload|5id|6sekunden|
+// Forcedbannercodes splitten
+for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+$int_tan		= '';
+$int_ziel		= "http://www.lose-ads.de/lose/clickbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_banner		= "http://www.lose-ads.de/lose/viewbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_menge		= round($code[$bid_lesen+3]);
+$int_kid		= $code[$bid_lesen+5];
+$int_reload		= $code[$bid_lesen+4]*3600;
+$int_verdienst	= ($code[$bid_lesen+2]*$interfacedaten['umrechnung']) - (($code[$bid_lesen+2]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+$int_preis		= $code[$bid_lesen+2]*$interfacedaten['umrechnung'];
+$ext_verguetung	= $code[$bid_lesen+2];
+$int_tan		= create_code(32);
+$bid_lesen=$bid_lesen+7;
+
+// Forcedbanner updaten oder eintragen
+$int_menge = round($int_menge/$interfacedaten['restklicks']);
+if ($ext_verguetung >= $interfacedaten['mindestverguetung'] and $int_menge > 1) {
+	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'lose-ads' and kid = '".$int_kid."'");
+	if (!mysql_num_rows($forcedbanner_check)) {
+	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','lose-ads','forcedbanner')");
+	} else {
+	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'lose-ads' and kid = '".$int_kid."' and status = '0'");
+	}
+}
+
+}
+
+// Abgelaufene Banner löschen
+db_query ("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'lose-ads' and status = '0'");
+
+?>
+
diff --git a/crons/losebox.int.php b/crons/losebox.int.php
new file mode 100644
index 0000000000000000000000000000000000000000..94fc53a78979d8e5e1fc562fff0b8418f501ecb2
--- /dev/null
+++ b/crons/losebox.int.php
@@ -0,0 +1,53 @@
+<?
+unset($file1);
+
+$interfacedaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface = 'losebox'"));
+
+// Losebox Forcedbanner nullen
+db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='losebox' and werbeart='forcedbanner' and status='1'");
+
+// Forcedbanner einlesen
+$fb=@fopen("http://www.losebox.de/lose/interface/output_kampagne.php?art=forcedclick&verguetung=".$interfacedaten['mindestverguetung']."&reload=24&uebrig=1&user_id=".$interfacedaten['betreiber']."","r");
+if($fb){
+	while($line=fgets($fb,1000)) {
+	$file1.=$line;
+	}
+fclose($fb);
+}
+$code = explode("|", $file1);
+$tl_count = (count($code)/8)-1;
+$bid_lesen = 5;
+
+// Forcedbannercodes splitten
+for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+$int_tan		= '';
+$int_ziel		= "http://www.losebox.de/lose/clickbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_banner		= "http://www.losebox.de/lose/viewbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+$int_menge		= round($code[$bid_lesen-2]);
+$int_kid		= $code[$bid_lesen];
+$int_reload		= $code[$bid_lesen-1]*3600;
+$int_verdienst	= ($code[$bid_lesen-3]*$interfacedaten['umrechnung']) - (($code[$bid_lesen-3]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+$int_preis		= $code[$bid_lesen-3]*$interfacedaten['umrechnung'];
+$ext_verguetung	= $code[$bid_lesen-3];
+$int_tan		= create_code(32);
+$bid_lesen=$bid_lesen+8;
+
+
+// Forcedbanner updaten oder eintragen
+$int_menge = round($int_menge/$interfacedaten['restklicks']);
+if ($ext_verguetung >= $interfacedaten['mindestverguetung'] and $int_menge > 1) {
+	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'losebox' and kid = '".$int_kid."'");
+	if (!mysql_num_rows($forcedbanner_check)) {
+	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','losebox','forcedbanner')");
+	} else {
+	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'losebox' and kid = '".$int_kid."' and status = '0'");
+	}
+}
+
+}
+
+// Abgelaufene Banner löschen
+db_query ("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'losebox' and status = '0'");
+
+?>
+
diff --git a/crons/refzahlungen.knt.php b/crons/refzahlungen.knt.php
new file mode 100644
index 0000000000000000000000000000000000000000..c2b33c8ad6f3d08839e15f691de43ce242e86060
--- /dev/null
+++ b/crons/refzahlungen.knt.php
@@ -0,0 +1,58 @@
+<?
+
+// Prozente laden!
+$refdaten = mysql_fetch_array(db_query("SELECT `re1`,`re2`,`re3` FROM ".$db_prefix."_seitenkonfig"));
+
+// Userdurchlauf
+$refliste = db_query ("SELECT * FROM ".$db_prefix."_werberdaten");
+while ($refliste_1 = mysql_fetch_array($refliste)) {
+$verdienst = 0;
+
+	// Ebene 1
+	$refebene_1 = db_query ("SELECT `uid`,`umsatz`,`werber`,`refback`,`gesamt` FROM ".$db_prefix."_werberdaten WHERE werber='".$refliste_1['uid']."'");
+	while ($anzeigen_1 = mysql_fetch_array($refebene_1)) {
+	      $verdienst = $verdienst + ($anzeigen_1['umsatz']/100*$refdaten['re1']);
+              $pro_verdienst = $anzeigen_1['umsatz'] / 100 * $refdaten['re1'];
+	      db_query ("UPDATE ".$db_prefix."_werberdaten SET gesamt=gesamt+'".$pro_verdienst."' , reset=reset+'".$pro_verdienst."' WHERE uid='".$anzeigen_1['uid']."'");
+	               if ($anzeigen_1['refback'] >= 1 && ($anzeigen_1['umsatz']/100*$refdaten['re1'])/100*$anzeigen_1['refback'] >= 0.01) {
+	               $buchungs_id = create_code(14);
+	               $refback = ($anzeigen_1['umsatz']/100*$refdaten['re1'])/100*$anzeigen_1['refback'];
+	               kontobuchung ('+',$refback,$anzeigen_1['uid']);
+	               buchungsliste ($buchungs_id,'+'.$refback,'Refback '.$anzeigen_1['refback'].'% ('.$refliste_1['uid'].')',$anzeigen_1['uid']);
+	               buchungsliste ($buchungs_id,'-'.$refback,'Refback '.$anzeigen_1['refback'].'% gezahlt ('.$anzeigen_1['uid'].')',$refliste_1['uid']);
+	               $pro_verdienst = $pro_verdienst - $refback;
+	               $refback = 0;
+	               $buchungs_id = '';
+	               }
+	kontobuchung ('+',$pro_verdienst,$refliste_1['uid']);
+	$pro_verdienst = 0;
+
+		// Ebene 2
+		$refebene_2 = db_query ("SELECT `uid`,`umsatz`,`werber`,`refback`,`gesamt` FROM ".$db_prefix."_werberdaten WHERE werber='".$anzeigen_1['uid']."'");
+		while ($anzeigen_2 = mysql_fetch_array($refebene_2)) {
+		$verdienst = $verdienst + ($anzeigen_2['umsatz']/100*$refdaten['re2']);
+		$pro_verdienst = $anzeigen_2['umsatz']/100*$refdaten['re2'];
+		kontobuchung ('+',$pro_verdienst,$refliste_1['uid']);
+		$pro_verdienst = 0;
+
+			// Ebene 3
+			$refebene_3 = db_query ("SELECT `uid`,`umsatz`,`werber`,`refback`,`gesamt` FROM ".$db_prefix."_werberdaten WHERE werber='".$anzeigen_2['uid']."'");
+			while ($anzeigen_3 = mysql_fetch_array($refebene_3)) {
+			$verdienst = $verdienst + ($anzeigen_3['umsatz']/100*$refdaten['re3']);
+			$pro_verdienst = $anzeigen_3['umsatz']/100*$refdaten['re3'];
+			kontobuchung ('+',$pro_verdienst,$refliste_1['uid']);
+			$pro_verdienst = 0;
+
+			}
+		}
+	}
+
+	if ($verdienst >= 0.01) {
+	$buchungs_id = create_code(14);
+	buchungsliste ($buchungs_id,'+'.$verdienst,'Refverdienste',$refliste_1['uid']);
+        bilanz(0,$verdienst);	
+	}
+
+}
+db_query("UPDATE ".$db_prefix."_werberdaten SET umsatz=0");
+?>
\ No newline at end of file
diff --git a/crons/webmasterlose.int.php b/crons/webmasterlose.int.php
new file mode 100644
index 0000000000000000000000000000000000000000..713c20dcdd40d005036e26bb10a66e9dcbf45345
--- /dev/null
+++ b/crons/webmasterlose.int.php
@@ -0,0 +1,53 @@
+<?
+// Forcedbanner
+$interfacedaten = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_interface WHERE interface = 'webmasterlose'"));
+
+if ($interfacedaten['mindestverguetung'] > 0.00) {
+unset($file1);
+
+   // Status 0 setzen
+   db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET status='0' WHERE sponsor='webmasterlose' and werbeart='forcedbanner' and status='1'");
+   
+   // Forcedbanner einlesen
+   $fb=@fopen("http://www.webmasterlose.de/lose/interface/output_kampagne.php?id=".$interfacedaten['betreiber']."&pw=".$interfacedaten['pass']."&art=forcedclick&verguetung=".$interfacedaten['mindestverguetung']."&reload=24&uebrig=1","r");
+   if($fb){
+	while($line=fgets($fb,1000)) {
+	$file1.=$line;
+	}
+   fclose($fb);
+   }
+   $code = explode("|", $file1);
+   $tl_count = (count($code)/6)-1;
+   $bid_lesen = 4;
+   // Forcedbannercodes splitten
+   for ($tl_anz=0;$tl_anz <= $tl_count;$tl_anz++) {
+    $int_tan		= '';
+    $int_ziel		= "http://www.webmasterlose.de/lose/clickbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+    $int_banner		= "http://www.webmasterlose.de/lose/viewbanner.php?id=".$interfacedaten['betreiber']."&bid=".$code[$bid_lesen]."&aid=".$interfacedaten['seite']."";
+    $int_menge		= round($code[$bid_lesen-1]);
+    $int_kid		= $code[$bid_lesen-4];
+    $int_reload		= $code[$bid_lesen+1]*3600;
+    $int_verdienst	= ($code[$bid_lesen-2]*$interfacedaten['umrechnung']) - (($code[$bid_lesen-2]*$interfacedaten['umrechnung']) / 100 * $interfacedaten['eigenverdienst']);
+    $int_preis		= $code[$bid_lesen-2]*$interfacedaten['umrechnung'];
+    $ext_verguetung	= $code[$bid_lesen-2];
+    $int_tan		= create_code(32);
+    $bid_lesen=$bid_lesen+6;
+
+          if ($ext_verguetung >= $interfacedaten['mindestverguetung'] and $int_menge > 1) {
+          	$forcedbanner_check = db_query ("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'webmasterlose' and kid = '".$int_kid."'");
+           	if (!mysql_num_rows($forcedbanner_check)) {
+            	db_query ("INSERT INTO ".$db_prefix."_gebuchte_werbung (tan,kid,ziel,banner,preis,verdienst,aufendhalt,menge,reload,sponsor,werbeart) VALUES ('".$int_tan."','".$int_kid."','".$int_ziel."','".$int_banner."','".$int_preis."','".$int_verdienst."','".$interfacedaten['aufendhalt']."','".$int_menge."','".$int_reload."','webmasterlose','forcedbanner')");
+             	} else {
+              	db_query ("UPDATE ".$db_prefix."_gebuchte_werbung SET status = '1',menge = '".$int_menge."',preis = '".$int_preis."',verdienst = '".$int_verdienst."', aufendhalt = '".$interfacedaten['aufendhalt']."' WHERE sponsor = 'webmasterlose' and kid = '".$int_kid."' and status = '0'");
+               	}
+          }
+    }
+}
+// Forcedbanner Ende
+
+
+
+// Abgelaufene Banner löschen
+db_query ("DELETE FROM ".$db_prefix."_gebuchte_werbung WHERE sponsor = 'webmasterlose' and status = '0'");
+?>
+
diff --git a/css/bframe.css b/css/bframe.css
new file mode 100644
index 0000000000000000000000000000000000000000..e8170611011905176264b5ff73aba3ad00b1c2d3
--- /dev/null
+++ b/css/bframe.css
@@ -0,0 +1,34 @@
+
+A:link,A:visited,A:active {
+color: #800000;
+text-decoration: none;
+}
+
+A:hover { 
+color: #000000;
+text-decoration: none;
+}
+
+.topic {
+font-family: Geneva, Arial, Helvetica, san-serif;
+font-size: 12px;
+}
+
+body {
+margin-top:0;
+margin-bottom:0;
+margin-left:0;
+margin-right:0;
+}
+
+body {
+background-image:url('img/bg.gif');
+background-color:#F2EEEA;
+}
+
+body, table, td, tr, div, p, pre, h1, h2, h3, h4, ul {
+font-family: Geneva, Arial, Helvetica, san-serif;
+font-size:12px;
+color:#41261B;
+line-height:10pt;
+}
diff --git a/css/main.css b/css/main.css
new file mode 100644
index 0000000000000000000000000000000000000000..af92336c266ccaa20ec6a966926412f1b9bc6e58
--- /dev/null
+++ b/css/main.css
@@ -0,0 +1,119 @@
+.rand {
+border: #000000;
+border-style: solid;
+border-top-width: 1px;
+border-right-width: 1px;
+border-bottom-width: 1px;
+border-left-width: 1px;
+}
+
+.titel-rand {
+border: #000000;
+border-style: solid;
+border-top-width: 0px;
+border-right-width: 0px;
+border-bottom-width: 1px;
+border-left-width: 0px;
+}
+
+.rand-menue {
+border: #000000;
+border-style: solid;
+background-color: #FEFBF5;
+font-family: Geneva, Arial, Helvetica, san-serif;
+font-size: 12px;
+font-weight: normal;
+color: #000000;
+border-width: 1px 1px 1px 0px;
+}
+
+A:link,A:visited,A:active {
+color: #1e364c;
+text-decoration: none;
+}
+
+A:hover { 
+color: #4B69FF;
+text-decoration: none;
+}
+
+.small {
+font-family: Geneva, Arial, Helvetica, san-serif;
+font-size: 12px;
+}
+
+.topic {
+font-family: Geneva, Arial, Helvetica, san-serif;
+font-size: 12px;
+}
+
+body {
+margin-top:5;
+margin-bottom:5;
+margin-left:5;
+margin-right:5;
+background-color:#F2EEEA;
+}
+
+body, table, td, tr, div, p, pre, h1, h2, h3, h4, ul {
+font-family: Geneva, Arial, Helvetica, san-serif;
+font-size:12px;
+color:#41261B;
+line-height:10pt;
+}
+
+input {
+border-width: 1;
+font-size: 12px;
+font-family: Geneva, Arial, Helvetica, san-serif;
+border-color: #000000;
+border-style: solid;
+background-color: #A2B5CD;
+color: #000000;
+font-weight: normal;
+}
+
+select {
+border-width:1;
+font-size: 12px;
+font-family: Geneva, Arial, Helvetica, san-serif;
+border-color: #000000;
+border-style: solid;
+background-color: #A2B5CD;
+color: #000000;
+}
+
+textarea {
+border-width: 1;
+font-size: 12px;
+font-family: Geneva, Arial, Helvetica, san-serif;
+border-color: #000000;
+border-style: solid;
+background-color: #A2B5CD;
+color: #000000;
+font-weight: normal;
+}
+
+option {
+border-width:1;
+font-size: 12px;
+font-family: Geneva, Arial, Helvetica, san-serif;
+border-color: #000000;
+border-style: solid;
+background-color: #A2B5CD;
+color: #000000;
+}
+
+.tr_row0 {
+ BACKGROUND-COLOR: #E2E2E2;
+}
+
+.tr_row1 {
+ BACKGROUND-COLOR: #CDCDCD;
+}
+
+.tr_head {
+ BACKGROUND-COLOR: #0099CC;
+ COLOR:#000000;
+ FONT-WEIGHT: bold;
+}
\ No newline at end of file
diff --git a/fc.php b/fc.php
new file mode 100644
index 0000000000000000000000000000000000000000..4085083e4c008d4232dc2ffc0449342b5b708845
--- /dev/null
+++ b/fc.php
@@ -0,0 +1,27 @@
+<?
+@require_once ('lib/functions.lib.php');
+@db_connect();
+@require_once ('lib/session.lib.php');
+if (!isset($_GET['art']))		$_GET['art']		= "";
+if (!isset($forced['tan']))		$forced['tan']		= "";
+if (!isset($forced['ziel']))	        $forced['ziel']		= "";
+
+$_GET['tan'] = addslashes ($_GET['tan']);
+
+$forced = mysql_fetch_array(db_query("SELECT ziel,tan FROM ".$db_prefix."_gebuchte_werbung WHERE tan='".$_GET['tan']."' LIMIT 1"));
+?>
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+	<title>Forcedklick by <?=$seitenname;?></title>
+</head>
+
+<frameset rows="15,*" border="0">
+<frame name="abuse" src="topframe_forced.php?tan=<?=$forced['tan'];?>" scrolling="no" frameborder="0">
+<frame name="werbung" src="<?=$forced['ziel'];?>" scrolling="auto" frameborder="0">
+</frameset>
+</body>
+</html>
+<?db_close();?>
diff --git a/images/Thumbs.db b/images/Thumbs.db
new file mode 100644
index 0000000000000000000000000000000000000000..7a2af3e18dd2e13c36e5ccd940350a625997c971
Binary files /dev/null and b/images/Thumbs.db differ
diff --git a/images/banner/2.gif b/images/banner/2.gif
new file mode 100644
index 0000000000000000000000000000000000000000..058f14602aff2547a227e2e3725335a368fd982d
Binary files /dev/null and b/images/banner/2.gif differ
diff --git a/images/banner/3.gif b/images/banner/3.gif
new file mode 100644
index 0000000000000000000000000000000000000000..f98ec5c6ebc85a881cf9e99e8f4d172879df29a9
Binary files /dev/null and b/images/banner/3.gif differ
diff --git a/images/banner/Thumbs.db b/images/banner/Thumbs.db
new file mode 100644
index 0000000000000000000000000000000000000000..7d00e702de2c914d27182242c9ea96451dc56e87
Binary files /dev/null and b/images/banner/Thumbs.db differ
diff --git a/images/gelb.gif b/images/gelb.gif
new file mode 100644
index 0000000000000000000000000000000000000000..2668ff9c4237f6759ff440a28101db094fa85149
Binary files /dev/null and b/images/gelb.gif differ
diff --git a/images/gruen.gif b/images/gruen.gif
new file mode 100644
index 0000000000000000000000000000000000000000..51da984c216bf3db6d3b0f83219eee99d48f9e9f
Binary files /dev/null and b/images/gruen.gif differ
diff --git a/images/header.gif b/images/header.gif
new file mode 100644
index 0000000000000000000000000000000000000000..78ac9cdba07b8d96bd68d0ff037716c6f64c1fce
Binary files /dev/null and b/images/header.gif differ
diff --git a/images/pfeil.gif b/images/pfeil.gif
new file mode 100644
index 0000000000000000000000000000000000000000..8013aa5e426c908d5f45d6aee5296859a52b3dcb
Binary files /dev/null and b/images/pfeil.gif differ
diff --git a/images/rand.gif b/images/rand.gif
new file mode 100644
index 0000000000000000000000000000000000000000..072d9913014dbdd0613763d53d7803cbc6ca0707
Binary files /dev/null and b/images/rand.gif differ
diff --git a/images/rot.gif b/images/rot.gif
new file mode 100644
index 0000000000000000000000000000000000000000..b98d7f896e98b3b690bba58dac718c54f58e57d6
Binary files /dev/null and b/images/rot.gif differ
diff --git a/index.php b/index.php
new file mode 100644
index 0000000000000000000000000000000000000000..fcede58198cfaabf0c29d2331fe758811a727190
--- /dev/null
+++ b/index.php
@@ -0,0 +1,11 @@
+<?
+if (isset ($_GET['content']) && !empty ($_GET['content'])) {
+	if (strpos ($_GET['content'], '../') !== FALSE) die ('Zugriffsverletzung !');
+	if ($_GET['content']{0} != '/') $_GET['content'] = '/'.$_GET['content'];
+}
+
+require ( './lib/header.php' );
+require ( './content'.$_GET['content'].'.php' );
+require ( './lib/footer.php' );
+?>
+
diff --git a/lib/extras.init.php b/lib/extras.init.php
new file mode 100644
index 0000000000000000000000000000000000000000..74af8617700bcd4db148312c637f8e5505ce08a1
--- /dev/null
+++ b/lib/extras.init.php
@@ -0,0 +1,11 @@
+<?
+// Datei: lib/extras.init.php
+// Datei um Funktionen aus der Extras-Erweiterung aufzurufen
+
+
+// Variablen absichern !
+array_walk($_GET, 'extra_securevars', 'GET');
+array_walk($_POST, 'extra_securevars', 'POST');
+array_walk($_SERVER, 'extra_securevars', 'SERVER');
+if (count ($_SESSION) > 0) array_walk($_SESSION, 'extra_securevars', 'SESSION');
+?>
\ No newline at end of file
diff --git a/lib/extras.lib.php b/lib/extras.lib.php
new file mode 100644
index 0000000000000000000000000000000000000000..305ef0197c7aab3fa3d6f2bb6265420f3859d532
--- /dev/null
+++ b/lib/extras.lib.php
@@ -0,0 +1,95 @@
+<?
+// E-Mail-Klasse einbinden
+require (dirname (__FILE__) . '/mail/klasse.php');
+
+// PHP-Version ausgeben. Beipspiel (PHP-Version 4.1.2-stable): 412
+function extra_phpversion () {
+	$ver = explode ('.', phpversion ());
+	return ($ver[0].$ver[1].$ver[2]);
+}
+
+
+// Löscht alle Datensätze aus Tabelle [table] wenn keine gueltige
+// UserID zu dem angegebenen Feld [row] existiert.
+function extra_cleantable ($table, $row) {
+  global $db_prefix;
+	return db_query ('DELETE x FROM '.$table.' AS x LEFT JOIN '.$db_prefix.'_kontodaten AS u ON (u.uid = x.'.$row.') WHERE u.uid IS NULL');
+}
+
+// Funktion zum Variablen absichern !
+function extra_securevars ($value, $name, $art) {
+global $GLOBALS;
+	// magic_quotes = on?
+	if (get_magic_quotes_gpc ()) $value = stripslashes ($value);
+	if ($art == 'GET') $_GET[$name] = $value;
+	elseif ($art == 'POST') $_POST[$name] = $value;
+	elseif ($art == 'COOKIE') $_COOKIE[$name] = $value;
+	elseif ($art == 'SERVER') $_SERVER[$name] = $value;
+	elseif ($art == 'SESSION') $_SESSION[$name] = $value;
+	else die ('Fehler in der Variablenabsicherungsfunktion!');
+}
+
+// Funktion um ein Array optisch darzustellen
+function print_a ( $TheArray )
+{ // Note: the function is recursive
+  echo '<table border=1 cellpadding=1 style="border-collapse: collapse; font: 8pt Arial;">'."\n";
+
+  $Keys = array_keys( $TheArray );
+  foreach( $Keys as $OneKey )
+  {
+    echo '<tr>'."\n";
+
+    echo '<td bgcolor="#727450" style="color: #ededed;">'."\n";
+    echo '<B>' . $OneKey . '</B>';
+    echo '</td>'."\n";
+
+    echo '<td bgcolor="#C4C2A6">'."\n";
+    if ( is_array($TheArray[$OneKey]) )
+      print_a($TheArray[$OneKey]);
+    else
+      echo $TheArray[$OneKey];
+    echo '</td>'."\n";
+
+    echo '</tr>'."\n";
+  }
+  echo '</table>'."\n";
+}
+
+// Erweiterte E-Mail-Funktion
+function usermail ($an, $betreff, $nachricht, $von) {
+     //    global $mail;
+	// Zeichenketten bei max 70 Zeichen trennen
+
+	// Nachricht mit HTML
+	$html_nachricht = '<HTML>
+<HEAD>
+	<STYLE TYPE="text/css">
+	<!--
+	H1 {font-family: Verdana; font-size: 18pt}
+	BODY {font-family: Verdana; font-size: 10pt; margin-left: 30px}
+	// --> 
+	</STYLE>
+</HEAD>
+<BODY BGCOLOR="beige" BACKGROUND="background.gif">
+
+<H1>'.$betreff.'</H1>
+
+'.nl2br($nachricht).'
+
+</BODY>
+</HTML>';
+
+	// HTML-Codes entfernen
+	$nachricht = strip_tags ($nachricht);
+
+ 	$mail = new htmlMimeMail();
+	$mail->setFrom($von);
+	$mail->setSubject($betreff);
+	$mail->setHTML($html_nachricht, $nachricht);
+	$mail->setHeader('X-Mailer', 'HTML Mime mail class (http://www.phpguru.org)');
+	return $mail->send(array($an));
+}
+
+
+require (dirname (__FILE__) . '/extras.init.php');
+?>
\ No newline at end of file
diff --git a/lib/footer.php b/lib/footer.php
new file mode 100644
index 0000000000000000000000000000000000000000..fcc69d6b495e1cfdd0e0fbfd8fc90d754f78e6da
--- /dev/null
+++ b/lib/footer.php
@@ -0,0 +1,13 @@
+</td>
+<td width="5" valign="top" align="left"></td>
+<td width="150" valign="top" align="left"><?@include_once('lib/menue_rechts.php');?></td>
+</tr>
+</table>
+
+<?=$count_query;?> MySQL Abfragen
+<!-- Fussnote -->
+
+</td></tr></table>
+</body>
+</html>
+<?db_close();?>
\ No newline at end of file
diff --git a/lib/functions.lib.php b/lib/functions.lib.php
new file mode 100644
index 0000000000000000000000000000000000000000..50da37a3d0746cbcc2074347e4be5a080e27b800
--- /dev/null
+++ b/lib/functions.lib.php
@@ -0,0 +1,156 @@
+<?
+header("Cache-control: no-cache");
+$db_host		= "localhost";                              // Datenbankhost meistens localhost/127.0.0.1
+$db_user		= "web1";                                   // MySQL User
+$db_pass		= "QRWSshez";                                       // MySQL Passwort
+$db_base		= "usr_web1_7";                                    // Datenbankname
+$db_prefix		= "vms";                                    // Datenbankpräfix bei Verwendung mehrerer Script in einer DB
+$domain			= "http://vms.designerscripte.net";                   // Url zum Script Ohne Slash am Ende 
+$seitenname		= "VMS Demo";                               // Name der Seite
+$waehrung		= "Lose";                                   // Währungsname der Seite
+$admin_id		= 1;                                        // Userid des Admins
+$betreibermail		= "admin@vms1.de";                          // Email des Betreibers
+$cron_pw                = "geheimespasswort";                       // Passwort für Cronjobs
+$percode 		= 'AbCdEfGhIjKlMnOpQrStUvWxYz123456789';    // beliebiger Alphanumerischer String 
+
+
+/* Globale Variablen nichts ändern */
+$ip 			= $_SERVER['REMOTE_ADDR'];
+if (!isset($login_check['hinweis']))	$login_check['hinweis']		= "";
+
+
+/* Funktionen Start */
+
+// Datenbankverbindung
+function db_connect() {
+global $db_host,$db_user,$db_pass,$db_base,$sql_open;
+	$sql_open	= @mysql_connect($db_host,$db_user,$db_pass) or die('Verbindung zum Mysql Server fehlgeschlagen!');
+	$sql_base	= @mysql_select_db($db_base) or die("Keine oder falsche Datenbank gewählt!");
+}
+
+// Mysql Querys
+function db_query($sql_tag){
+global $count_query;
+    $count_query++;
+    $vargs = array();
+    $fargs = func_get_args();
+    foreach($fargs as $key => $arg){
+      $vargs[$key] = mysql_real_escape_string($arg);
+    }
+    array_shift($vargs);
+    $sql_tag = vsprintf($sql_tag,$vargs);
+    if($ret = mysql_query($sql_tag)){
+      return $ret;
+    }else{
+      return 0;
+    }
+  }
+
+// Datenbank schließen
+function db_close() {
+global $sql_open;
+	@mysql_close($sql_open) or die('Konnte die Verbindung mit Datenbank nicht schliessen!');
+}
+
+// Zufallscode
+function create_code($code_laenge) {
+srand((double)microtime()*1000000);
+$created_code = '';
+$zeichen="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
+for ($i=0;$i<$code_laenge;$i++) {
+$n=rand() % strlen($zeichen);
+$created_code .=substr($zeichen, $n, 1);
+}
+return $created_code;
+}
+
+
+// Einträge in Buchungsliste
+function buchungsliste ($buchungs_id,$trans_menge,$verwendung,$fuer) {
+global $db_prefix;
+	db_query("INSERT INTO ".$db_prefix."_buchungen (uid,buchungszeit,buchungs_id,buchungsmenge,verwendungszweck) VALUES (".$fuer.",".time().",'".$buchungs_id."','".$trans_menge."','".$verwendung."')");
+}
+
+// Kontotransaktionen
+function kontobuchung ($art,$trans_menge,$fuer) {
+global $db_prefix;
+	db_query("UPDATE ".$db_prefix."_kontodaten SET `kontostand` = `kontostand` ".$art." ".$trans_menge." WHERE uid=".$fuer."");
+}
+
+// Schutz von internen Seiten
+function userstatus () {
+global $_SESSION,$db_prefix;
+	if ($_SESSION['login'] == 'true') {
+	$us = db_query("SELECT `uid`,`passwort`,`status`,`hinweis` FROM ".$db_prefix."_kontodaten WHERE uid=".$_SESSION['uid']." and passwort='".$_SESSION['passwort']."' LIMIT 1");
+	$login_check = mysql_fetch_array($us);
+
+                // nicht aktiviert oder nicht angemeldet!
+		if (!mysql_num_rows($us) or $login_check['status'] == 0) {
+		setCookie('uid','',time()-86400*30);
+		setCookie('passwort','',time()-86400*30);
+		setCookie('autologin','',time()-86400*30);
+		$_SESSION['uid']		= "";
+		$_SESSION['passwort']	= "";
+		$_SESSION['login']		= "";
+		@include_once('content/error/kein_zutritt.php');
+		@include_once('lib/footer.php');
+		die();
+		}
+		
+                // gesperrt
+                if ($login_check['status'] == 2) {
+		setCookie('uid','',time()-86400*30);
+		setCookie('passwort','',time()-86400*30);
+		setCookie('autologin','',time()-86400*30);
+		$_SESSION['uid']		= "";
+		$_SESSION['passwort']	= "";
+		$_SESSION['login']		= "";
+		@include_once('content/error/user_gesperrt.php');
+		@include_once('lib/footer.php');
+		die();
+		}
+	} else {
+	@include_once('content/error/kein_zutritt.php');
+	@include_once('lib/footer.php');
+	die();
+	}
+}
+
+// Refumsatz gutschreiben
+function refumsatz ($buchungssumme,$fuer) {
+global $db_prefix;
+	db_query ('UPDATE '.$db_prefix.'_werberdaten SET umsatz = umsatz + '.$buchungssumme.' WHERE uid = '.$fuer.' and werber != 0');
+}
+
+// Aktivrally
+function aktivralley ($buchungssumme,$fuer) {
+global $db_prefix;
+	// Wenn Aktivralley läuft
+	$ralleydaten_aktiv = mysql_fetch_array(db_query("SELECT `start`,`ende` FROM ".$db_prefix."_ralleydaten WHERE ralley = 'aktivralley' LIMIT 1"));
+	if ($ralleydaten_aktiv['start'] <= time() && $ralleydaten_aktiv['ende'] >= time()) {
+		db_query ('UPDATE '.$db_prefix.'_aktivralley SET punkte = punkte + '.$buchungssumme.' WHERE uid = '.$fuer);
+		if (mysql_affected_rows () == 0) db_query ('INSERT INTO '.$db_prefix.'_aktivralley (uid,punkte) VALUES ('.$fuer.', '.$buchungssumme.')');
+	}
+}
+
+// Klickrally
+function klickralley () {
+global $db_prefix,$_SESSION;
+	// wenn Klickralley läuft
+	$ralleydaten_klick = mysql_fetch_array(db_query("SELECT `start`,`ende`,`art`,`pro` FROM ".$db_prefix."_ralleydaten WHERE ralley = 'klickralley' LIMIT 1"));
+	if ($ralleydaten_klick['start'] <= time() && $ralleydaten_klick['ende'] >= time()) {
+		db_query ('UPDATE '.$db_prefix.'_klickralley SET klicks = klicks + 1 WHERE uid = '.$_SESSION['uid']);
+		if (mysql_affected_rows () == 0) db_query ('INSERT INTO '.$db_prefix.'_klickralley (uid,klicks) VALUES ('.$_SESSION['uid'].', 1)');
+	}
+}
+
+// Bilanzen
+function bilanz ($ein,$aus) {
+global $db_prefix;
+     $ein = round($ein,2);
+     $aus = round($aus,2);
+     $date_stamp = mktime(0,0,0,date(m),date(d),date(Y));
+       mysql_query('UPDATE '.$db_prefix.'_bilanz SET ein=ein+"'.$ein.'", aus=aus+"'.$aus.'" WHERE date='.$date_stamp.' LIMIT 1');
+       if (mysql_affected_rows() == 0) db_query('INSERT INTO '.$db_prefix.'_bilanz (ein,aus,date) VALUES ("'.$ein.'","'.$aus.'",'.$date_stamp.')');
+}
+?>
\ No newline at end of file
diff --git a/lib/header.php b/lib/header.php
new file mode 100644
index 0000000000000000000000000000000000000000..7e423202314d5057c94208837f09cc583471ef75
--- /dev/null
+++ b/lib/header.php
@@ -0,0 +1,82 @@
+<?
+require ('lib/functions.lib.php');
+db_connect();
+require ('lib/session.lib.php');
+require ('lib/layout.lib.php');
+
+// Extras-Erweiterung initalisieren und ausfuehren
+require ( 'lib/extras.lib.php' );
+
+// SecVMS change begin
+if (!isset($_GET['content']) || empty ($_GET['content'])) $_GET['content'] = '/intern/startseite';
+// SecVMS change end
+
+if (!file_exists('content'.$_GET['content'].'.php')) $_GET['content'] = '/error/keine_seite';
+
+// Reloads noch in Cron auslagern -> zu performancelastig!
+// db_query ("DELETE FROM ".$db_prefix."_reloads WHERE bis <= '".time()."'");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title><?=$seitenname;?></title>
+<link rel="stylesheet" href="css/main.css" type="text/css">
+<meta name="Author" content="Designerscripte.net">
+<meta name="Publisher" content="Designerscripte.net">
+<meta name="Copyright" content="Designerscripte.net">
+<meta name="Keywords" content="vms,paid4,loginscript">
+<meta name="Description" content="Verdien was Du willst">
+<meta name="Page-topic" content="Loseseite zu Klamm.de">
+<meta name="Audience" content="">
+<meta name="Content-language" content="DE">
+<meta name="Page-type" content="Nicht Gewinnorientiert">
+<meta name="Robots" content="INDEX,FOLLOW">
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> 
+<link rel="stylesheet" href="/css/main.css" type="text/css">
+
+<?
+if ($_GET['content'] == '/intern/startseite') @require_once ('lib/texte/alt_startseitenpopup.txt');
+if ($_GET['content'] == '/betteln') @require_once ('lib/texte/alt_bettelseitenpopup.txt');
+?>
+
+</head>
+<body style="topmargin:5; leftmargin:0;">
+<table width="800" cellpadding="0" cellspacing="0" border="0" align="center"><tr><td valign="top" align="center">
+<table style="border:solid 1px #4B69FF" width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#FEFBF5">
+<tr>
+<td height="120" width="100%" valign="top" style="background-image:url('./images/header.gif');">
+<div style="position:relative; top:20px; right:-321px;">
+<?@require_once ('lib/texte/alt_headerbanner.txt');?>
+</div>
+</td></tr>
+<tr>
+<td bgcolor="#FEFBF5" valign="top" align="center">
+<table width="100%">
+<tr>
+<td height="100%" width="100%" align="center">
+&nbsp;&nbsp;
+&nbsp;&nbsp;<a href="index.php">Home</a>&nbsp;&nbsp;
+&nbsp;<a href="?content=/intern/mediadaten">Mediadaten</a>&nbsp;&nbsp;
+&nbsp;<a href="?content=/intern/agbs">AGB</a>&nbsp;&nbsp;
+&nbsp;<a href="?content=/intern/faqs">FAQ</a>&nbsp;&nbsp;
+&nbsp;<a href="?content=/intern/werbemittel">Werbemittel</a>&nbsp;&nbsp;
+&nbsp;<a href="?content=/intern/impressum">Impressum</a>&nbsp;&nbsp;
+</td>
+</tr>
+</table>
+
+</td>
+</tr>
+</table>
+
+
+<table width="800" border="0" cellpadding="0" cellspacing="0">
+<tr><td height="5"></td></tr></table>
+
+<!-- Inhalt -->
+
+<table width="800" cellpadding="0" cellspacing="0" border="0">
+<tr>
+<td width="150" valign="top" align="left"><?@include_once('lib/menue_links.php');?></td>
+<td width="5" valign="top" align="left"></td>
+<td width="490" valign="top" align="left">
\ No newline at end of file
diff --git a/lib/layout.lib.php b/lib/layout.lib.php
new file mode 100644
index 0000000000000000000000000000000000000000..115dc029953d518f58edb03902838fa0c589200c
--- /dev/null
+++ b/lib/layout.lib.php
@@ -0,0 +1,53 @@
+<?
+function head($titel){
+echo '
+<table style="border:solid 0px black" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#4B69FF">
+<tr>
+<td valign="middle" align="center" height="18" bgcolor="#1e364c"><b><font color="#ffffff">'.$titel.'</font></b></td>
+</tr>
+<tr>
+<td bgcolor="#FEFBF5" valign="top" align="left">
+<table width="98%" cellpadding="2" cellspacing="2">
+<tr>
+<td>
+';
+}
+
+function foot(){
+echo '
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0"><tr><td height="5"></td></tr></table>
+';
+}
+
+function menuehead($titel){
+echo'
+<table style="border:solid 0px black" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#4B69FF">
+<tr>
+<td valign="middle" align="center" height="18" bgcolor="#1e364c"><b><font color="#ffffff">'.$titel.'</font></b></td>
+</tr>
+<tr>
+<td bgcolor="#FEFBF5" valign="top" align="left">
+<table width="98%" cellpadding="2" cellspacing="2">
+<tr>
+<td>
+';
+}
+
+function menuefoot(){
+echo'
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0"><tr><td height="5"></td></tr></table>
+';
+}
+?>
\ No newline at end of file
diff --git a/lib/mail/LICENSE b/lib/mail/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..207a79cbdbb53b8d591f37c87e8564197ae7f23c
--- /dev/null
+++ b/lib/mail/LICENSE
@@ -0,0 +1,278 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
diff --git a/lib/mail/RFC822.php b/lib/mail/RFC822.php
new file mode 100644
index 0000000000000000000000000000000000000000..e4220ee0e71e73f15aac43259c22daecdbfb2ca9
--- /dev/null
+++ b/lib/mail/RFC822.php
@@ -0,0 +1,872 @@
+<?php
+/**
+* RFC 822 Email address list validation Utility
+*
+* What is it?
+*
+* This class will take an address string, and parse it into it's consituent
+* parts, be that either addresses, groups, or combinations. Nested groups
+* are not supported. The structure it returns is pretty straight forward,
+* and is similar to that provided by the imap_rfc822_parse_adrlist(). Use
+* print_r() to view the structure.
+*
+* How do I use it?
+*
+* $address_string = 'My Group: "Richard Heyes" <richard@localhost> (A comment), ted@example.com (Ted Bloggs), Barney;';
+* $structure = Mail_RFC822::parseAddressList($address_string, 'example.com', TRUE)
+* print_r($structure);
+*
+* @author  Richard Heyes <richard@phpguru.org>
+* @author  Chuck Hagenbuch <chuck@horde.org>
+* @version $Revision: 1.1 $
+* @package Mail
+*/
+
+class Mail_RFC822
+{
+    /**
+     * The address being parsed by the RFC822 object.
+     * @var string $address
+     */
+    var $address = '';
+
+    /**
+     * The default domain to use for unqualified addresses.
+     * @var string $default_domain
+     */
+    var $default_domain = 'localhost';
+
+    /**
+     * Should we return a nested array showing groups, or flatten everything?
+     * @var boolean $nestGroups
+     */
+    var $nestGroups = true;
+
+    /**
+     * Whether or not to validate atoms for non-ascii characters.
+     * @var boolean $validate
+     */
+    var $validate = true;
+
+    /**
+     * The array of raw addresses built up as we parse.
+     * @var array $addresses
+     */
+    var $addresses = array();
+
+    /**
+     * The final array of parsed address information that we build up.
+     * @var array $structure
+     */
+    var $structure = array();
+
+    /**
+     * The current error message, if any.
+     * @var string $error
+     */
+    var $error = null;
+
+    /**
+     * An internal counter/pointer.
+     * @var integer $index
+     */
+    var $index = null;
+
+    /**
+     * The number of groups that have been found in the address list.
+     * @var integer $num_groups
+     * @access public
+     */
+    var $num_groups = 0;
+
+    /**
+     * A variable so that we can tell whether or not we're inside a
+     * Mail_RFC822 object.
+     * @var boolean $mailRFC822
+     */
+    var $mailRFC822 = true;
+    
+    /**
+    * A limit after which processing stops
+    * @var int $limit
+    */
+    var $limit = null;
+
+
+    /**
+     * Sets up the object. The address must either be set here or when
+     * calling parseAddressList(). One or the other.
+     *
+     * @access public
+     * @param string  $address         The address(es) to validate.
+     * @param string  $default_domain  Default domain/host etc. If not supplied, will be set to localhost.
+     * @param boolean $nest_groups     Whether to return the structure with groups nested for easier viewing.
+     * @param boolean $validate        Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance.
+     * 
+     * @return object Mail_RFC822 A new Mail_RFC822 object.
+     */
+    function Mail_RFC822($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null)
+    {
+        if (isset($address))        $this->address        = $address;
+        if (isset($default_domain)) $this->default_domain = $default_domain;
+        if (isset($nest_groups))    $this->nestGroups     = $nest_groups;
+        if (isset($validate))       $this->validate       = $validate;
+        if (isset($limit))          $this->limit          = $limit;
+    }
+
+
+    /**
+     * Starts the whole process. The address must either be set here
+     * or when creating the object. One or the other.
+     *
+     * @access public
+     * @param string  $address         The address(es) to validate.
+     * @param string  $default_domain  Default domain/host etc.
+     * @param boolean $nest_groups     Whether to return the structure with groups nested for easier viewing.
+     * @param boolean $validate        Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance.
+     * 
+     * @return array A structured array of addresses.
+     */
+    function parseAddressList($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null)
+    {
+
+        if (!isset($this->mailRFC822)) {
+            $obj = new Mail_RFC822($address, $default_domain, $nest_groups, $validate, $limit);
+            return $obj->parseAddressList();
+        }
+
+        if (isset($address))        $this->address        = $address;
+        if (isset($default_domain)) $this->default_domain = $default_domain;
+        if (isset($nest_groups))    $this->nestGroups     = $nest_groups;
+        if (isset($validate))       $this->validate       = $validate;
+        if (isset($limit))          $this->limit          = $limit;
+
+        $this->structure  = array();
+        $this->addresses  = array();
+        $this->error      = null;
+        $this->index      = null;
+
+        while ($this->address = $this->_splitAddresses($this->address)) {
+            continue;
+        }
+        
+        if ($this->address === false || isset($this->error)) {
+            return false;
+        }
+
+        // Reset timer since large amounts of addresses can take a long time to
+        // get here
+        set_time_limit(30);
+
+        // Loop through all the addresses
+        for ($i = 0; $i < count($this->addresses); $i++){
+
+            if (($return = $this->_validateAddress($this->addresses[$i])) === false
+                || isset($this->error)) {
+                return false;
+            }
+            
+            if (!$this->nestGroups) {
+                $this->structure = array_merge($this->structure, $return);
+            } else {
+                $this->structure[] = $return;
+            }
+        }
+
+        return $this->structure;
+    }
+
+    /**
+     * Splits an address into seperate addresses.
+     * 
+     * @access private
+     * @param string $address The addresses to split.
+     * @return boolean Success or failure.
+     */
+    function _splitAddresses($address)
+    {
+
+        if (!empty($this->limit) AND count($this->addresses) == $this->limit) {
+            return '';
+        }
+
+        if ($this->_isGroup($address) && !isset($this->error)) {
+            $split_char = ';';
+            $is_group   = true;
+        } elseif (!isset($this->error)) {
+            $split_char = ',';
+            $is_group   = false;
+        } elseif (isset($this->error)) {
+            return false;
+        }
+
+        // Split the string based on the above ten or so lines.
+        $parts  = explode($split_char, $address);
+        $string = $this->_splitCheck($parts, $split_char);
+
+        // If a group...
+        if ($is_group) {
+            // If $string does not contain a colon outside of
+            // brackets/quotes etc then something's fubar.
+
+            // First check there's a colon at all:
+            if (strpos($string, ':') === false) {
+                $this->error = 'Invalid address: ' . $string;
+                return false;
+            }
+
+            // Now check it's outside of brackets/quotes:
+            if (!$this->_splitCheck(explode(':', $string), ':'))
+                return false;
+
+            // We must have a group at this point, so increase the counter:
+            $this->num_groups++;
+        }
+
+        // $string now contains the first full address/group.
+        // Add to the addresses array.
+        $this->addresses[] = array(
+                                   'address' => trim($string),
+                                   'group'   => $is_group
+                                   );
+
+        // Remove the now stored address from the initial line, the +1
+        // is to account for the explode character.
+        $address = trim(substr($address, strlen($string) + 1));
+
+        // If the next char is a comma and this was a group, then
+        // there are more addresses, otherwise, if there are any more
+        // chars, then there is another address.
+        if ($is_group && substr($address, 0, 1) == ','){
+            $address = trim(substr($address, 1));
+            return $address;
+
+        } elseif (strlen($address) > 0) {
+            return $address;
+
+        } else {
+            return '';
+        }
+
+        // If you got here then something's off
+        return false;
+    }
+
+    /**
+     * Checks for a group at the start of the string.
+     * 
+     * @access private
+     * @param string $address The address to check.
+     * @return boolean Whether or not there is a group at the start of the string.
+     */
+    function _isGroup($address)
+    {
+        // First comma not in quotes, angles or escaped:
+        $parts  = explode(',', $address);
+        $string = $this->_splitCheck($parts, ',');
+
+        // Now we have the first address, we can reliably check for a
+        // group by searching for a colon that's not escaped or in
+        // quotes or angle brackets.
+        if (count($parts = explode(':', $string)) > 1) {
+            $string2 = $this->_splitCheck($parts, ':');
+            return ($string2 !== $string);
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * A common function that will check an exploded string.
+     * 
+     * @access private
+     * @param array $parts The exloded string.
+     * @param string $char  The char that was exploded on.
+     * @return mixed False if the string contains unclosed quotes/brackets, or the string on success.
+     */
+    function _splitCheck($parts, $char)
+    {
+        $string = $parts[0];
+
+        for ($i = 0; $i < count($parts); $i++) {
+            if ($this->_hasUnclosedQuotes($string)
+                || $this->_hasUnclosedBrackets($string, '<>')
+                || $this->_hasUnclosedBrackets($string, '[]')
+                || $this->_hasUnclosedBrackets($string, '()')
+                || substr($string, -1) == '\\') {
+                if (isset($parts[$i + 1])) {
+                    $string = $string . $char . $parts[$i + 1];
+                } else {
+                    $this->error = 'Invalid address spec. Unclosed bracket or quotes';
+                    return false;
+                }
+            } else {
+                $this->index = $i;
+                break;
+            }
+        }
+
+        return $string;
+    }
+
+    /**
+     * Checks if a string has an unclosed quotes or not.
+     * 
+     * @access private
+     * @param string $string The string to check.
+     * @return boolean True if there are unclosed quotes inside the string, false otherwise.
+     */
+    function _hasUnclosedQuotes($string)
+    {
+        $string     = explode('"', $string);
+        $string_cnt = count($string);
+
+        for ($i = 0; $i < (count($string) - 1); $i++)
+            if (substr($string[$i], -1) == '\\')
+                $string_cnt--;
+
+        return ($string_cnt % 2 === 0);
+    }
+
+    /**
+     * Checks if a string has an unclosed brackets or not. IMPORTANT:
+     * This function handles both angle brackets and square brackets;
+     * 
+     * @access private
+     * @param string $string The string to check.
+     * @param string $chars  The characters to check for.
+     * @return boolean True if there are unclosed brackets inside the string, false otherwise.
+     */
+    function _hasUnclosedBrackets($string, $chars)
+    {
+        $num_angle_start = substr_count($string, $chars[0]);
+        $num_angle_end   = substr_count($string, $chars[1]);
+
+        $this->_hasUnclosedBracketsSub($string, $num_angle_start, $chars[0]);
+        $this->_hasUnclosedBracketsSub($string, $num_angle_end, $chars[1]);
+
+        if ($num_angle_start < $num_angle_end) {
+            $this->error = 'Invalid address spec. Unmatched quote or bracket (' . $chars . ')';
+            return false;
+        } else {
+            return ($num_angle_start > $num_angle_end);
+        }
+    }
+
+    /**
+     * Sub function that is used only by hasUnclosedBrackets().
+     * 
+     * @access private
+     * @param string $string The string to check.
+     * @param integer &$num    The number of occurences.
+     * @param string $char   The character to count.
+     * @return integer The number of occurences of $char in $string, adjusted for backslashes.
+     */
+    function _hasUnclosedBracketsSub($string, &$num, $char)
+    {
+        $parts = explode($char, $string);
+        for ($i = 0; $i < count($parts); $i++){
+            if (substr($parts[$i], -1) == '\\' || $this->_hasUnclosedQuotes($parts[$i]))
+                $num--;
+            if (isset($parts[$i + 1]))
+                $parts[$i + 1] = $parts[$i] . $char . $parts[$i + 1];
+        }
+        
+        return $num;
+    }
+
+    /**
+     * Function to begin checking the address.
+     *
+     * @access private
+     * @param string $address The address to validate.
+     * @return mixed False on failure, or a structured array of address information on success.
+     */
+    function _validateAddress($address)
+    {
+        $is_group = false;
+
+        if ($address['group']) {
+            $is_group = true;
+
+            // Get the group part of the name
+            $parts     = explode(':', $address['address']);
+            $groupname = $this->_splitCheck($parts, ':');
+            $structure = array();
+
+            // And validate the group part of the name.
+            if (!$this->_validatePhrase($groupname)){
+                $this->error = 'Group name did not validate.';
+                return false;
+            } else {
+                // Don't include groups if we are not nesting
+                // them. This avoids returning invalid addresses.
+                if ($this->nestGroups) {
+                    $structure = new stdClass;
+                    $structure->groupname = $groupname;
+                }
+            }
+
+            $address['address'] = ltrim(substr($address['address'], strlen($groupname . ':')));
+        }
+
+        // If a group then split on comma and put into an array.
+        // Otherwise, Just put the whole address in an array.
+        if ($is_group) {
+            while (strlen($address['address']) > 0) {
+                $parts       = explode(',', $address['address']);
+                $addresses[] = $this->_splitCheck($parts, ',');
+                $address['address'] = trim(substr($address['address'], strlen(end($addresses) . ',')));
+            }
+        } else {
+            $addresses[] = $address['address'];
+        }
+
+        // Check that $addresses is set, if address like this:
+        // Groupname:;
+        // Then errors were appearing.
+        if (!isset($addresses)){
+            $this->error = 'Empty group.';
+            return false;
+        }
+
+        for ($i = 0; $i < count($addresses); $i++) {
+            $addresses[$i] = trim($addresses[$i]);
+        }
+
+        // Validate each mailbox.
+        // Format could be one of: name <geezer@domain.com>
+        //                         geezer@domain.com
+        //                         geezer
+        // ... or any other format valid by RFC 822.
+        array_walk($addresses, array($this, 'validateMailbox'));
+
+        // Nested format
+        if ($this->nestGroups) {
+            if ($is_group) {
+                $structure->addresses = $addresses;
+            } else {
+                $structure = $addresses[0];
+            }
+
+        // Flat format
+        } else {
+            if ($is_group) {
+                $structure = array_merge($structure, $addresses);
+            } else {
+                $structure = $addresses;
+            }
+        }
+
+        return $structure;
+    }
+
+    /**
+     * Function to validate a phrase.
+     *
+     * @access private
+     * @param string $phrase The phrase to check.
+     * @return boolean Success or failure.
+     */
+    function _validatePhrase($phrase)
+    {
+        // Splits on one or more Tab or space.
+        $parts = preg_split('/[ \\x09]+/', $phrase, -1, PREG_SPLIT_NO_EMPTY);
+
+        $phrase_parts = array();
+        while (count($parts) > 0){
+            $phrase_parts[] = $this->_splitCheck($parts, ' ');
+            for ($i = 0; $i < $this->index + 1; $i++)
+                array_shift($parts);
+        }
+
+        for ($i = 0; $i < count($phrase_parts); $i++) {
+            // If quoted string:
+            if (substr($phrase_parts[$i], 0, 1) == '"') {
+                if (!$this->_validateQuotedString($phrase_parts[$i]))
+                    return false;
+                continue;
+            }
+
+            // Otherwise it's an atom:
+            if (!$this->_validateAtom($phrase_parts[$i])) return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Function to validate an atom which from rfc822 is:
+     * atom = 1*<any CHAR except specials, SPACE and CTLs>
+     * 
+     * If validation ($this->validate) has been turned off, then
+     * validateAtom() doesn't actually check anything. This is so that you
+     * can split a list of addresses up before encoding personal names
+     * (umlauts, etc.), for example.
+     * 
+     * @access private
+     * @param string $atom The string to check.
+     * @return boolean Success or failure.
+     */
+    function _validateAtom($atom)
+    {
+        if (!$this->validate) {
+            // Validation has been turned off; assume the atom is okay.
+            return true;
+        }
+
+        // Check for any char from ASCII 0 - ASCII 127
+        if (!preg_match('/^[\\x00-\\x7E]+$/i', $atom, $matches)) {
+            return false;
+        }
+
+        // Check for specials:
+        if (preg_match('/[][()<>@,;\\:". ]/', $atom)) {
+            return false;
+        }
+
+        // Check for control characters (ASCII 0-31):
+        if (preg_match('/[\\x00-\\x1F]+/', $atom)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Function to validate quoted string, which is:
+     * quoted-string = <"> *(qtext/quoted-pair) <">
+     * 
+     * @access private
+     * @param string $qstring The string to check
+     * @return boolean Success or failure.
+     */
+    function _validateQuotedString($qstring)
+    {
+        // Leading and trailing "
+        $qstring = substr($qstring, 1, -1);
+
+        // Perform check.
+        return !(preg_match('/(.)[\x0D\\\\"]/', $qstring, $matches) && $matches[1] != '\\');
+    }
+
+    /**
+     * Function to validate a mailbox, which is:
+     * mailbox =   addr-spec         ; simple address
+     *           / phrase route-addr ; name and route-addr
+     * 
+     * @access public
+     * @param string &$mailbox The string to check.
+     * @return boolean Success or failure.
+     */
+    function validateMailbox(&$mailbox)
+    {
+        // A couple of defaults.
+        $phrase  = '';
+        $comment = '';
+
+        // Catch any RFC822 comments and store them separately
+        $_mailbox = $mailbox;
+        while (strlen(trim($_mailbox)) > 0) {
+            $parts = explode('(', $_mailbox);
+            $before_comment = $this->_splitCheck($parts, '(');
+            if ($before_comment != $_mailbox) {
+                // First char should be a (
+                $comment    = substr(str_replace($before_comment, '', $_mailbox), 1);
+                $parts      = explode(')', $comment);
+                $comment    = $this->_splitCheck($parts, ')');
+                $comments[] = $comment;
+
+                // +1 is for the trailing )
+                $_mailbox   = substr($_mailbox, strpos($_mailbox, $comment)+strlen($comment)+1);
+            } else {
+                break;
+            }
+        }
+
+        for($i=0; $i<count(@$comments); $i++){
+            $mailbox = str_replace('('.$comments[$i].')', '', $mailbox);
+        }
+        $mailbox = trim($mailbox);
+
+        // Check for name + route-addr
+        if (substr($mailbox, -1) == '>' && substr($mailbox, 0, 1) != '<') {
+            $parts  = explode('<', $mailbox);
+            $name   = $this->_splitCheck($parts, '<');
+
+            $phrase     = trim($name);
+            $route_addr = trim(substr($mailbox, strlen($name.'<'), -1));
+
+            if ($this->_validatePhrase($phrase) === false || ($route_addr = $this->_validateRouteAddr($route_addr)) === false)
+                return false;
+
+        // Only got addr-spec
+        } else {
+            // First snip angle brackets if present.
+            if (substr($mailbox,0,1) == '<' && substr($mailbox,-1) == '>')
+                $addr_spec = substr($mailbox,1,-1);
+            else
+                $addr_spec = $mailbox;
+
+            if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false)
+                return false;
+        }
+
+        // Construct the object that will be returned.
+        $mbox = new stdClass();
+
+        // Add the phrase (even if empty) and comments
+        $mbox->personal = $phrase;
+        $mbox->comment  = isset($comments) ? $comments : array();
+
+        if (isset($route_addr)) {
+            $mbox->mailbox = $route_addr['local_part'];
+            $mbox->host    = $route_addr['domain'];
+            $route_addr['adl'] !== '' ? $mbox->adl = $route_addr['adl'] : '';
+        } else {
+            $mbox->mailbox = $addr_spec['local_part'];
+            $mbox->host    = $addr_spec['domain'];
+        }
+
+        $mailbox = $mbox;
+        return true;
+    }
+
+    /**
+     * This function validates a route-addr which is:
+     * route-addr = "<" [route] addr-spec ">"
+     *
+     * Angle brackets have already been removed at the point of
+     * getting to this function.
+     * 
+     * @access private
+     * @param string $route_addr The string to check.
+     * @return mixed False on failure, or an array containing validated address/route information on success.
+     */
+    function _validateRouteAddr($route_addr)
+    {
+        // Check for colon.
+        if (strpos($route_addr, ':') !== false) {
+            $parts = explode(':', $route_addr);
+            $route = $this->_splitCheck($parts, ':');
+        } else {
+            $route = $route_addr;
+        }
+
+        // If $route is same as $route_addr then the colon was in
+        // quotes or brackets or, of course, non existent.
+        if ($route === $route_addr){
+            unset($route);
+            $addr_spec = $route_addr;
+            if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {
+                return false;
+            }
+        } else {
+            // Validate route part.
+            if (($route = $this->_validateRoute($route)) === false) {
+                return false;
+            }
+
+            $addr_spec = substr($route_addr, strlen($route . ':'));
+
+            // Validate addr-spec part.
+            if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {
+                return false;
+            }
+        }
+
+        if (isset($route)) {
+            $return['adl'] = $route;
+        } else {
+            $return['adl'] = '';
+        }
+
+        $return = array_merge($return, $addr_spec);
+        return $return;
+    }
+
+    /**
+     * Function to validate a route, which is:
+     * route = 1#("@" domain) ":"
+     * 
+     * @access private
+     * @param string $route The string to check.
+     * @return mixed False on failure, or the validated $route on success.
+     */
+    function _validateRoute($route)
+    {
+        // Split on comma.
+        $domains = explode(',', trim($route));
+
+        for ($i = 0; $i < count($domains); $i++) {
+            $domains[$i] = str_replace('@', '', trim($domains[$i]));
+            if (!$this->_validateDomain($domains[$i])) return false;
+        }
+
+        return $route;
+    }
+
+    /**
+     * Function to validate a domain, though this is not quite what
+     * you expect of a strict internet domain.
+     *
+     * domain = sub-domain *("." sub-domain)
+     * 
+     * @access private
+     * @param string $domain The string to check.
+     * @return mixed False on failure, or the validated domain on success.
+     */
+    function _validateDomain($domain)
+    {
+        // Note the different use of $subdomains and $sub_domains                        
+        $subdomains = explode('.', $domain);
+
+        while (count($subdomains) > 0) {
+            $sub_domains[] = $this->_splitCheck($subdomains, '.');
+            for ($i = 0; $i < $this->index + 1; $i++)
+                array_shift($subdomains);
+        }
+
+        for ($i = 0; $i < count($sub_domains); $i++) {
+            if (!$this->_validateSubdomain(trim($sub_domains[$i])))
+                return false;
+        }
+
+        // Managed to get here, so return input.
+        return $domain;
+    }
+
+    /**
+     * Function to validate a subdomain:
+     *   subdomain = domain-ref / domain-literal
+     * 
+     * @access private
+     * @param string $subdomain The string to check.
+     * @return boolean Success or failure.
+     */
+    function _validateSubdomain($subdomain)
+    {
+        if (preg_match('|^\[(.*)]$|', $subdomain, $arr)){
+            if (!$this->_validateDliteral($arr[1])) return false;
+        } else {
+            if (!$this->_validateAtom($subdomain)) return false;
+        }
+
+        // Got here, so return successful.
+        return true;
+    }
+
+    /**
+     * Function to validate a domain literal:
+     *   domain-literal =  "[" *(dtext / quoted-pair) "]"
+     * 
+     * @access private
+     * @param string $dliteral The string to check.
+     * @return boolean Success or failure.
+     */
+    function _validateDliteral($dliteral)
+    {
+        return !preg_match('/(.)[][\x0D\\\\]/', $dliteral, $matches) && $matches[1] != '\\';
+    }
+
+    /**
+     * Function to validate an addr-spec.
+     *
+     * addr-spec = local-part "@" domain
+     * 
+     * @access private
+     * @param string $addr_spec The string to check.
+     * @return mixed False on failure, or the validated addr-spec on success.
+     */
+    function _validateAddrSpec($addr_spec)
+    {
+        $addr_spec = trim($addr_spec);
+
+        // Split on @ sign if there is one.
+        if (strpos($addr_spec, '@') !== false) {
+            $parts      = explode('@', $addr_spec);
+            $local_part = $this->_splitCheck($parts, '@');
+            $domain     = substr($addr_spec, strlen($local_part . '@'));
+
+        // No @ sign so assume the default domain.
+        } else {
+            $local_part = $addr_spec;
+            $domain     = $this->default_domain;
+        }
+
+        if (($local_part = $this->_validateLocalPart($local_part)) === false) return false;
+        if (($domain     = $this->_validateDomain($domain)) === false) return false;
+        
+        // Got here so return successful.
+        return array('local_part' => $local_part, 'domain' => $domain);
+    }
+
+    /**
+     * Function to validate the local part of an address:
+     *   local-part = word *("." word)
+     * 
+     * @access private
+     * @param string $local_part
+     * @return mixed False on failure, or the validated local part on success.
+     */
+    function _validateLocalPart($local_part)
+    {
+        $parts = explode('.', $local_part);
+
+        // Split the local_part into words.
+        while (count($parts) > 0){
+            $words[] = $this->_splitCheck($parts, '.');
+            for ($i = 0; $i < $this->index + 1; $i++) {
+                array_shift($parts);
+            }
+        }
+
+        // Validate each word.
+        for ($i = 0; $i < count($words); $i++) {
+            if ($this->_validatePhrase(trim($words[$i])) === false) return false;
+        }
+
+        // Managed to get here, so return the input.
+        return $local_part;
+    }
+
+    /**
+    * Returns an approximate count of how many addresses are
+    * in the given string. This is APPROXIMATE as it only splits
+    * based on a comma which has no preceding backslash. Could be
+    * useful as large amounts of addresses will end up producing
+    * *large* structures when used with parseAddressList().
+    *
+    * @param  string $data Addresses to count
+    * @return int          Approximate count
+    */
+    function approximateCount($data)
+    {
+        return count(preg_split('/(?<!\\\\),/', $data));
+    }
+    
+    /**
+    * This is a email validating function seperate to the rest
+    * of the class. It simply validates whether an email is of
+    * the common internet form: <user>@<domain>. This can be
+    * sufficient for most people. Optional stricter mode can
+    * be utilised which restricts mailbox characters allowed
+    * to alphanumeric, full stop, hyphen and underscore.
+    *
+    * @param  string  $data   Address to check
+    * @param  boolean $strict Optional stricter mode
+    * @return mixed           False if it fails, an indexed array
+    *                         username/domain if it matches
+    */
+    function isValidInetAddress($data, $strict = false)
+    {
+        $regex = $strict ? '/^([.0-9a-z_-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';
+        if (preg_match($regex, trim($data), $matches)) {
+            return array($matches[1], $matches[2]);
+        } else {
+            return false;
+        }
+    }
+}
+
+?>
diff --git a/lib/mail/background.gif b/lib/mail/background.gif
new file mode 100644
index 0000000000000000000000000000000000000000..3dbe69a09a5c5bff487bc45b73db0a929b115c09
Binary files /dev/null and b/lib/mail/background.gif differ
diff --git a/lib/mail/klasse.php b/lib/mail/klasse.php
new file mode 100644
index 0000000000000000000000000000000000000000..d75b270498e3fb0cce5df462e75b6dac5fa2b61e
--- /dev/null
+++ b/lib/mail/klasse.php
@@ -0,0 +1,795 @@
+<?php
+/**
+* This file is part of the htmlMimeMail package (http://www.phpguru.org/)
+*
+* htmlMimeMail is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* htmlMimeMail is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with htmlMimeMail; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+* 
+* © Copyright 2004 Richard Heyes
+*/
+
+require_once(dirname(__FILE__) . '/mimePart.php');
+
+class htmlMimeMail
+{
+    /**
+    * The html part of the message
+    * @var string
+    */
+    var $html;
+
+    /**
+    * The text part of the message(only used in TEXT only messages)
+    * @var string
+    */
+    var $text;
+
+    /**
+    * The main body of the message after building
+    * @var string
+    */
+    var $output;
+
+    /**
+    * The alternative text to the HTML part (only used in HTML messages)
+    * @var string
+    */
+    var $html_text;
+
+    /**
+    * An array of embedded images/objects
+    * @var array
+    */
+    var $html_images;
+
+    /**
+    * An array of recognised image types for the findHtmlImages() method
+    * @var array
+    */
+    var $image_types;
+
+    /**
+    * Parameters that affect the build process
+    * @var array
+    */
+    var $build_params;
+
+    /**
+    * Array of attachments
+    * @var array
+    */
+    var $attachments;
+
+    /**
+    * The main message headers
+    * @var array
+    */
+    var $headers;
+
+    /**
+    * Whether the message has been built or not
+    * @var boolean
+    */
+    var $is_built;
+    
+    /**
+    * The return path address. If not set the From:
+    * address is used instead
+    * @var string
+    */
+    var $return_path;
+    
+    /**
+    * Array of information needed for smtp sending
+    * @var array
+    */
+    var $smtp_params;
+
+    /**
+    * Constructor function. Sets the headers
+    * if supplied.
+    */
+    function htmlMimeMail()
+    {
+        /**
+        * Initialise some variables.
+        */
+        $this->html_images = array();
+        $this->headers     = array();
+        $this->is_built    = false;
+
+        /**
+        * If you want the auto load functionality
+        * to find other image/file types, add the
+        * extension and content type here.
+        */
+        $this->image_types = array(
+                                    'gif'	=> 'image/gif',
+                                    'jpg'	=> 'image/jpeg',
+                                    'jpeg'	=> 'image/jpeg',
+                                    'jpe'	=> 'image/jpeg',
+                                    'bmp'	=> 'image/bmp',
+                                    'png'	=> 'image/png',
+                                    'tif'	=> 'image/tiff',
+                                    'tiff'	=> 'image/tiff',
+                                    'swf'	=> 'application/x-shockwave-flash'
+                                  );
+
+        /**
+        * Set these up
+        */
+        $this->build_params['html_encoding'] = 'quoted-printable';
+        $this->build_params['text_encoding'] = '7bit';
+        $this->build_params['html_charset']  = 'ISO-8859-1';
+        $this->build_params['text_charset']  = 'ISO-8859-1';
+        $this->build_params['head_charset']  = 'ISO-8859-1';
+        $this->build_params['text_wrap']     = 998;
+
+        /**
+        * Defaults for smtp sending
+        */
+        if (!empty($GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'])) {
+            $helo = $GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'];
+        } elseif (!empty($GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'])) {
+            $helo = $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'];
+        } else {
+            $helo = 'localhost';
+        }
+
+        $this->smtp_params['host'] = 'localhost';
+        $this->smtp_params['port'] = 25;
+        $this->smtp_params['helo'] = $helo;
+        $this->smtp_params['auth'] = false;
+        $this->smtp_params['user'] = '';
+        $this->smtp_params['pass'] = '';
+
+        /**
+        * Make sure the MIME version header is first.
+        */
+        $this->headers['MIME-Version'] = '1.0';
+    }
+
+    /**
+    * This function will read a file in
+    * from a supplied filename and return
+    * it. This can then be given as the first
+    * argument of the the functions
+    * add_html_image() or add_attachment().
+    */
+    function getFile($filename)
+    {
+        $return = '';
+        if ($fp = fopen($filename, 'rb')) {
+            while (!feof($fp)) {
+                $return .= fread($fp, 1024);
+            }
+            fclose($fp);
+            return $return;
+
+        } else {
+            return false;
+        }
+    }
+
+    /**
+    * Accessor to set the CRLF style
+    */
+    function setCrlf($crlf = "\n")
+    {
+        if (!defined('CRLF')) {
+            define('CRLF', $crlf, true);
+        }
+
+        if (!defined('MAIL_MIMEPART_CRLF')) {
+            define('MAIL_MIMEPART_CRLF', $crlf, true);
+        }
+    }
+
+    /**
+    * Accessor to set the SMTP parameters
+    */
+    function setSMTPParams($host = null, $port = null, $helo = null, $auth = null, $user = null, $pass = null)
+    {
+        if (!is_null($host)) $this->smtp_params['host'] = $host;
+        if (!is_null($port)) $this->smtp_params['port'] = $port;
+        if (!is_null($helo)) $this->smtp_params['helo'] = $helo;
+        if (!is_null($auth)) $this->smtp_params['auth'] = $auth;
+        if (!is_null($user)) $this->smtp_params['user'] = $user;
+        if (!is_null($pass)) $this->smtp_params['pass'] = $pass;
+    }
+
+    /**
+    * Accessor function to set the text encoding
+    */
+    function setTextEncoding($encoding = '7bit')
+    {
+        $this->build_params['text_encoding'] = $encoding;
+    }
+
+    /**
+    * Accessor function to set the HTML encoding
+    */
+    function setHtmlEncoding($encoding = 'quoted-printable')
+    {
+        $this->build_params['html_encoding'] = $encoding;
+    }
+
+    /**
+    * Accessor function to set the text charset
+    */
+    function setTextCharset($charset = 'ISO-8859-1')
+    {
+        $this->build_params['text_charset'] = $charset;
+    }
+
+    /**
+    * Accessor function to set the HTML charset
+    */
+    function setHtmlCharset($charset = 'ISO-8859-1')
+    {
+        $this->build_params['html_charset'] = $charset;
+    }
+
+    /**
+    * Accessor function to set the header encoding charset
+    */
+    function setHeadCharset($charset = 'ISO-8859-1')
+    {
+        $this->build_params['head_charset'] = $charset;
+    }
+
+    /**
+    * Accessor function to set the text wrap count
+    */
+    function setTextWrap($count = 998)
+    {
+        $this->build_params['text_wrap'] = $count;
+    }
+
+    /**
+    * Accessor to set a header
+    */
+    function setHeader($name, $value)
+    {
+        $this->headers[$name] = $value;
+    }
+
+    /**
+    * Accessor to add a Subject: header
+    */
+    function setSubject($subject)
+    {
+        $this->headers['Subject'] = $subject;
+    }
+
+    /**
+    * Accessor to add a From: header
+    */
+    function setFrom($from)
+    {
+        $this->headers['From'] = $from;
+    }
+
+    /**
+    * Accessor to set the return path
+    */
+    function setReturnPath($return_path)
+    {
+        $this->return_path = $return_path;
+    }
+
+    /**
+    * Accessor to add a Cc: header
+    */
+    function setCc($cc)
+    {
+        $this->headers['Cc'] = $cc;
+    }
+
+    /**
+    * Accessor to add a Bcc: header
+    */
+    function setBcc($bcc)
+    {
+        $this->headers['Bcc'] = $bcc;
+    }
+
+    /**
+    * Adds plain text. Use this function
+    * when NOT sending html email
+    */
+    function setText($text = '')
+    {
+        $this->text = $text;
+    }
+
+    /**
+    * Adds a html part to the mail.
+    * Also replaces image names with
+    * content-id's.
+    */
+    function setHtml($html, $text = null, $images_dir = null)
+    {
+        $this->html      = $html;
+        $this->html_text = $text;
+
+        if (isset($images_dir)) {
+            $this->_findHtmlImages($images_dir);
+        }
+    }
+
+    /**
+    * Function for extracting images from
+    * html source. This function will look
+    * through the html code supplied by add_html()
+    * and find any file that ends in one of the
+    * extensions defined in $obj->image_types.
+    * If the file exists it will read it in and
+    * embed it, (not an attachment).
+    *
+    * @author Dan Allen
+    */
+    function _findHtmlImages($images_dir)
+    {
+        // Build the list of image extensions
+        while (list($key,) = each($this->image_types)) {
+            $extensions[] = $key;
+        }
+
+        preg_match_all('/(?:"|\')([^"\']+\.('.implode('|', $extensions).'))(?:"|\')/Ui', $this->html, $images);
+
+        for ($i=0; $i<count($images[1]); $i++) {
+            if (file_exists($images_dir . $images[1][$i])) {
+                $html_images[] = $images[1][$i];
+                $this->html = str_replace($images[1][$i], basename($images[1][$i]), $this->html);
+            }
+        }
+
+        if (!empty($html_images)) {
+
+            // If duplicate images are embedded, they may show up as attachments, so remove them.
+            $html_images = array_unique($html_images);
+            sort($html_images);
+    
+            for ($i=0; $i<count($html_images); $i++) {
+                if ($image = $this->getFile($images_dir.$html_images[$i])) {
+                    $ext = substr($html_images[$i], strrpos($html_images[$i], '.') + 1);
+                    $content_type = $this->image_types[strtolower($ext)];
+                    $this->addHtmlImage($image, basename($html_images[$i]), $content_type);
+                }
+            }
+        }
+    }
+
+    /**
+    * Adds an image to the list of embedded
+    * images.
+    */
+    function addHtmlImage($file, $name = '', $c_type='application/octet-stream')
+    {
+        $this->html_images[] = array(
+                                        'body'   => $file,
+                                        'name'   => $name,
+                                        'c_type' => $c_type,
+                                        'cid'    => md5(uniqid(time()))
+                                    );
+    }
+
+
+    /**
+    * Adds a file to the list of attachments.
+    */
+    function addAttachment($file, $name = '', $c_type='application/octet-stream', $encoding = 'base64')
+    {
+        $this->attachments[] = array(
+                                    'body'		=> $file,
+                                    'name'		=> $name,
+                                    'c_type'	=> $c_type,
+                                    'encoding'	=> $encoding
+                                  );
+    }
+
+    /**
+    * Adds a text subpart to a mime_part object
+    */
+    function &_addTextPart(&$obj, $text)
+    {
+        $params['content_type'] = 'text/plain';
+        $params['encoding']     = $this->build_params['text_encoding'];
+        $params['charset']      = $this->build_params['text_charset'];
+        if (is_object($obj)) {
+            $return = $obj->addSubpart($text, $params);
+        } else {
+            $return = new Mail_mimePart($text, $params);
+        }
+        
+        return $return;
+    }
+
+    /**
+    * Adds a html subpart to a mime_part object
+    */
+    function &_addHtmlPart(&$obj)
+    {
+        $params['content_type'] = 'text/html';
+        $params['encoding']     = $this->build_params['html_encoding'];
+        $params['charset']      = $this->build_params['html_charset'];
+        if (is_object($obj)) {
+            $return = $obj->addSubpart($this->html, $params);
+        } else {
+            $return = new Mail_mimePart($this->html, $params);
+        }
+        
+        return $return;
+    }
+
+    /**
+    * Starts a message with a mixed part
+    */
+    function &_addMixedPart()
+    {
+        $params['content_type'] = 'multipart/mixed';
+        $return = new Mail_mimePart('', $params);
+        
+        return $return;
+    }
+
+    /**
+    * Adds an alternative part to a mime_part object
+    */
+    function &_addAlternativePart(&$obj)
+    {
+        $params['content_type'] = 'multipart/alternative';
+        if (is_object($obj)) {
+            $return = $obj->addSubpart('', $params);
+        } else {
+            $return = new Mail_mimePart('', $params);
+        }
+        
+        return $return;
+    }
+
+    /**
+    * Adds a html subpart to a mime_part object
+    */
+    function &_addRelatedPart(&$obj)
+    {
+        $params['content_type'] = 'multipart/related';
+        if (is_object($obj)) {
+            $return = $obj->addSubpart('', $params);
+        } else {
+            $return = new Mail_mimePart('', $params);
+        }
+        
+        return $return;
+    }
+
+    /**
+    * Adds an html image subpart to a mime_part object
+    */
+    function _addHtmlImagePart(&$obj, $value)
+    {
+        $params['content_type'] = $value['c_type'];
+        $params['encoding']     = 'base64';
+        $params['disposition']  = 'inline';
+        $params['dfilename']    = $value['name'];
+        $params['cid']          = $value['cid'];
+        $obj->addSubpart($value['body'], $params);
+    }
+
+    /**
+    * Adds an attachment subpart to a mime_part object
+    */
+    function _addAttachmentPart(&$obj, $value)
+    {
+        $params['content_type'] = $value['c_type'];
+        $params['encoding']     = $value['encoding'];
+        $params['disposition']  = 'attachment';
+        $params['dfilename']    = $value['name'];
+        $obj->addSubpart($value['body'], $params);
+    }
+
+    /**
+    * Builds the multipart message from the
+    * list ($this->_parts). $params is an
+    * array of parameters that shape the building
+    * of the message. Currently supported are:
+    *
+    * $params['html_encoding'] - The type of encoding to use on html. Valid options are
+    *                            "7bit", "quoted-printable" or "base64" (all without quotes).
+    *                            7bit is EXPRESSLY NOT RECOMMENDED. Default is quoted-printable
+    * $params['text_encoding'] - The type of encoding to use on plain text Valid options are
+    *                            "7bit", "quoted-printable" or "base64" (all without quotes).
+    *                            Default is 7bit
+    * $params['text_wrap']     - The character count at which to wrap 7bit encoded data.
+    *                            Default this is 998.
+    * $params['html_charset']  - The character set to use for a html section.
+    *                            Default is ISO-8859-1
+    * $params['text_charset']  - The character set to use for a text section.
+    *                          - Default is ISO-8859-1
+    * $params['head_charset']  - The character set to use for header encoding should it be needed.
+    *                          - Default is ISO-8859-1
+    */
+    function buildMessage($params = array())
+    {
+        if (!empty($params)) {
+            while (list($key, $value) = each($params)) {
+                $this->build_params[$key] = $value;
+            }
+        }
+
+        if (!empty($this->html_images)) {
+            foreach ($this->html_images as $value) {
+                $this->html = str_replace($value['name'], 'cid:'.$value['cid'], $this->html);
+            }
+        }
+
+        $null        = null;
+        $attachments = !empty($this->attachments) ? true : false;
+        $html_images = !empty($this->html_images) ? true : false;
+        $html        = !empty($this->html)        ? true : false;
+        $text        = isset($this->text)         ? true : false;
+
+        switch (true) {
+            case $text AND !$attachments:
+                $message = &$this->_addTextPart($null, $this->text);
+                break;
+
+            case !$text AND $attachments AND !$html:
+                $message = &$this->_addMixedPart();
+
+                for ($i=0; $i<count($this->attachments); $i++) {
+                    $this->_addAttachmentPart($message, $this->attachments[$i]);
+                }
+                break;
+
+            case $text AND $attachments:
+                $message = &$this->_addMixedPart();
+                $this->_addTextPart($message, $this->text);
+
+                for ($i=0; $i<count($this->attachments); $i++) {
+                    $this->_addAttachmentPart($message, $this->attachments[$i]);
+                }
+                break;
+
+            case $html AND !$attachments AND !$html_images:
+                if (!is_null($this->html_text)) {
+                    $message = &$this->_addAlternativePart($null);
+                    $this->_addTextPart($message, $this->html_text);
+                    $this->_addHtmlPart($message);
+                } else {
+                    $message = &$this->_addHtmlPart($null);
+                }
+                break;
+
+            case $html AND !$attachments AND $html_images:
+                if (!is_null($this->html_text)) {
+                    $message = &$this->_addAlternativePart($null);
+                    $this->_addTextPart($message, $this->html_text);
+                    $related = &$this->_addRelatedPart($message);
+                } else {
+                    $message = &$this->_addRelatedPart($null);
+                    $related = &$message;
+                }
+                $this->_addHtmlPart($related);
+                for ($i=0; $i<count($this->html_images); $i++) {
+                    $this->_addHtmlImagePart($related, $this->html_images[$i]);
+                }
+                break;
+
+            case $html AND $attachments AND !$html_images:
+                $message = &$this->_addMixedPart();
+                if (!is_null($this->html_text)) {
+                    $alt = &$this->_addAlternativePart($message);
+                    $this->_addTextPart($alt, $this->html_text);
+                    $this->_addHtmlPart($alt);
+                } else {
+                    $this->_addHtmlPart($message);
+                }
+                for ($i=0; $i<count($this->attachments); $i++) {
+                    $this->_addAttachmentPart($message, $this->attachments[$i]);
+                }
+                break;
+
+            case $html AND $attachments AND $html_images:
+                $message = &$this->_addMixedPart();
+                if (!is_null($this->html_text)) {
+                    $alt = &$this->_addAlternativePart($message);
+                    $this->_addTextPart($alt, $this->html_text);
+                    $rel = &$this->_addRelatedPart($alt);
+                } else {
+                    $rel = &$this->_addRelatedPart($message);
+                }
+                $this->_addHtmlPart($rel);
+                for ($i=0; $i<count($this->html_images); $i++) {
+                    $this->_addHtmlImagePart($rel, $this->html_images[$i]);
+                }
+                for ($i=0; $i<count($this->attachments); $i++) {
+                    $this->_addAttachmentPart($message, $this->attachments[$i]);
+                }
+                break;
+
+        }
+
+        if (isset($message)) {
+            $output = $message->encode();
+            $this->output   = $output['body'];
+            $this->headers  = array_merge($this->headers, $output['headers']);
+
+            // Add message ID header
+            srand((double)microtime()*10000000);
+            $message_id = sprintf('<%s.%s@%s>', base_convert(time(), 10, 36), base_convert(rand(), 10, 36), !empty($GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST']) ? $GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'] : $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']);
+            $this->headers['Message-ID'] = $message_id;
+
+            $this->is_built = true;
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+    * Function to encode a header if necessary
+    * according to RFC2047
+    */
+    function _encodeHeader($input, $charset = 'ISO-8859-1')
+    {
+        preg_match_all('/(\s?\w*[\x80-\xFF]+\w*\s?)/', $input, $matches);
+        foreach ($matches[1] as $value) {
+            $replacement = preg_replace('/([\x20\x80-\xFF])/e', '"=" . strtoupper(dechex(ord("\1")))', $value);
+            $input = str_replace($value, '=?' . $charset . '?Q?' . $replacement . '?=', $input);
+        }
+        
+        return $input;
+    }
+
+    /**
+    * Sends the mail.
+    *
+    * @param  array  $recipients
+    * @param  string $type OPTIONAL
+    * @return mixed
+    */
+    function send($recipients, $type = 'mail')
+    {
+        if (!defined('CRLF')) {
+            $this->setCrlf($type == 'mail' ? "\n" : "\r\n");
+        }
+
+        if (!$this->is_built) {
+            $this->buildMessage();
+        }
+
+        switch ($type) {
+            case 'mail':
+                $subject = '';
+                if (!empty($this->headers['Subject'])) {
+                    $subject = $this->_encodeHeader($this->headers['Subject'], $this->build_params['head_charset']);
+                    unset($this->headers['Subject']);
+                }
+
+                // Get flat representation of headers
+                foreach ($this->headers as $name => $value) {
+                    $headers[] = $name . ': ' . $this->_encodeHeader($value, $this->build_params['head_charset']);
+                }
+
+                $to = $this->_encodeHeader(implode(', ', $recipients), $this->build_params['head_charset']);
+
+                if (!empty($this->return_path)) {
+                    $result = mail($to, $subject, $this->output, implode(CRLF, $headers), '-f' . $this->return_path);
+                } else {
+                    $result = mail($to, $subject, $this->output, implode(CRLF, $headers));
+                }
+                
+                // Reset the subject in case mail is resent
+                if ($subject !== '') {
+                    $this->headers['Subject'] = $subject;
+                }
+                
+                // Return
+                return $result;
+                break;
+
+            case 'smtp':
+                require_once(dirname(__FILE__) . '/smtp.php');
+                require_once(dirname(__FILE__) . '/RFC822.php');
+                $smtp = &smtp::connect($this->smtp_params);
+                
+                // Parse recipients argument for internet addresses
+                foreach ($recipients as $recipient) {
+                    $addresses = Mail_RFC822::parseAddressList($recipient, $this->smtp_params['helo'], null, false);
+                    foreach ($addresses as $address) {
+                        $smtp_recipients[] = sprintf('%s@%s', $address->mailbox, $address->host);
+                    }
+                }
+                unset($addresses); // These are reused
+                unset($address);   // These are reused
+
+                // Get flat representation of headers, parsing
+                // Cc and Bcc as we go
+                foreach ($this->headers as $name => $value) {
+                    if ($name == 'Cc' OR $name == 'Bcc') {
+                        $addresses = Mail_RFC822::parseAddressList($value, $this->smtp_params['helo'], null, false);
+                        foreach ($addresses as $address) {
+                            $smtp_recipients[] = sprintf('%s@%s', $address->mailbox, $address->host);
+                        }
+                    }
+                    if ($name == 'Bcc') {
+                        continue;
+                    }
+                    $headers[] = $name . ': ' . $this->_encodeHeader($value, $this->build_params['head_charset']);
+                }
+                // Add To header based on $recipients argument
+                $headers[] = 'To: ' . $this->_encodeHeader(implode(', ', $recipients), $this->build_params['head_charset']);
+                
+                // Add headers to send_params
+                $send_params['headers']    = $headers;
+                $send_params['recipients'] = array_values(array_unique($smtp_recipients));
+                $send_params['body']       = $this->output;
+
+                // Setup return path
+                if (isset($this->return_path)) {
+                    $send_params['from'] = $this->return_path;
+                } elseif (!empty($this->headers['From'])) {
+                    $from = Mail_RFC822::parseAddressList($this->headers['From']);
+                    $send_params['from'] = sprintf('%s@%s', $from[0]->mailbox, $from[0]->host);
+                } else {
+                    $send_params['from'] = 'postmaster@' . $this->smtp_params['helo'];
+                }
+
+                // Send it
+                if (!$smtp->send($send_params)) {
+                    $this->errors = $smtp->errors;
+                    return false;
+                }
+                return true;
+                break;
+        }
+    }
+
+    /**
+    * Use this method to return the email
+    * in message/rfc822 format. Useful for
+    * adding an email to another email as
+    * an attachment. there's a commented
+    * out example in example.php.
+    */
+    function getRFC822($recipients)
+    {
+        // Make up the date header as according to RFC822
+        $this->setHeader('Date', date('D, d M y H:i:s O'));
+
+        if (!defined('CRLF')) {
+            $this->setCrlf($type == 'mail' ? "\n" : "\r\n");
+        }
+
+        if (!$this->is_built) {
+            $this->buildMessage();
+        }
+
+        // Return path ?
+        if (isset($this->return_path)) {
+            $headers[] = 'Return-Path: ' . $this->return_path;
+        }
+
+        // Get flat representation of headers
+        foreach ($this->headers as $name => $value) {
+            $headers[] = $name . ': ' . $value;
+        }
+        $headers[] = 'To: ' . implode(', ', $recipients);
+
+        return implode(CRLF, $headers) . CRLF . CRLF . $this->output;
+    }
+} // End of class.
+?>
diff --git a/lib/mail/mimePart.php b/lib/mail/mimePart.php
new file mode 100644
index 0000000000000000000000000000000000000000..f726bf4e9db8222ae0e1206f63c81eb6541928b6
--- /dev/null
+++ b/lib/mail/mimePart.php
@@ -0,0 +1,333 @@
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2002 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license,      |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available at through the world-wide-web at                           |
+// | http://www.php.net/license/2_02.txt.                                 |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: Richard Heyes <richard@phpguru.org>                         |
+// +----------------------------------------------------------------------+
+
+/**
+*
+*  Raw mime encoding class
+*
+* What is it?
+*   This class enables you to manipulate and build
+*   a mime email from the ground up.
+*
+* Why use this instead of mime.php?
+*   mime.php is a userfriendly api to this class for
+*   people who aren't interested in the internals of
+*   mime mail. This class however allows full control
+*   over the email.
+*
+* Eg.
+*
+* // Since multipart/mixed has no real body, (the body is
+* // the subpart), we set the body argument to blank.
+*
+* $params['content_type'] = 'multipart/mixed';
+* $email = new Mail_mimePart('', $params);
+*
+* // Here we add a text part to the multipart we have
+* // already. Assume $body contains plain text.
+*
+* $params['content_type'] = 'text/plain';
+* $params['encoding']     = '7bit';
+* $text = $email->addSubPart($body, $params);
+*
+* // Now add an attachment. Assume $attach is
+* the contents of the attachment
+*
+* $params['content_type'] = 'application/zip';
+* $params['encoding']     = 'base64';
+* $params['disposition']  = 'attachment';
+* $params['dfilename']    = 'example.zip';
+* $attach =& $email->addSubPart($body, $params);
+*
+* // Now build the email. Note that the encode
+* // function returns an associative array containing two
+* // elements, body and headers. You will need to add extra
+* // headers, (eg. Mime-Version) before sending.
+*
+* $email = $message->encode();
+* $email['headers'][] = 'Mime-Version: 1.0';
+*
+*
+* Further examples are available at http://www.phpguru.org
+*
+* TODO:
+*  - Set encode() to return the $obj->encoded if encode()
+*    has already been run. Unless a flag is passed to specifically
+*    re-build the message.
+*
+* @author  Richard Heyes <richard@phpguru.org>
+* @version $Revision: 1.3 $
+* @package Mail
+*/
+
+class Mail_mimePart {
+
+   /**
+    * The encoding type of this part
+    * @var string
+    */
+    var $_encoding;
+
+   /**
+    * An array of subparts
+    * @var array
+    */
+    var $_subparts;
+
+   /**
+    * The output of this part after being built
+    * @var string
+    */
+    var $_encoded;
+
+   /**
+    * Headers for this part
+    * @var array
+    */
+    var $_headers;
+
+   /**
+    * The body of this part (not encoded)
+    * @var string
+    */
+    var $_body;
+
+    /**
+     * Constructor.
+     *
+     * Sets up the object.
+     *
+     * @param $body   - The body of the mime part if any.
+     * @param $params - An associative array of parameters:
+     *                  content_type - The content type for this part eg multipart/mixed
+     *                  encoding     - The encoding to use, 7bit, 8bit, base64, or quoted-printable
+     *                  cid          - Content ID to apply
+     *                  disposition  - Content disposition, inline or attachment
+     *                  dfilename    - Optional filename parameter for content disposition
+     *                  description  - Content description
+     *                  charset      - Character set to use
+     * @access public
+     */
+    function Mail_mimePart($body = '', $params = array())
+    {
+        if (!defined('MAIL_MIMEPART_CRLF')) {
+            define('MAIL_MIMEPART_CRLF', defined('MAIL_MIME_CRLF') ? MAIL_MIME_CRLF : "\r\n", TRUE);
+        }
+
+        foreach ($params as $key => $value) {
+            switch ($key) {
+                case 'content_type':
+                    $headers['Content-Type'] = $value . (isset($charset) ? '; charset="' . $charset . '"' : '');
+                    break;
+
+                case 'encoding':
+                    $this->_encoding = $value;
+                    $headers['Content-Transfer-Encoding'] = $value;
+                    break;
+
+                case 'cid':
+                    $headers['Content-ID'] = '<' . $value . '>';
+                    break;
+
+                case 'disposition':
+                    $headers['Content-Disposition'] = $value . (isset($dfilename) ? '; filename="' . $dfilename . '"' : '');
+                    break;
+
+                case 'dfilename':
+                    if (isset($headers['Content-Disposition'])) {
+                        $headers['Content-Disposition'] .= '; filename="' . $value . '"';
+                    } else {
+                        $dfilename = $value;
+                    }
+                    break;
+
+                case 'description':
+                    $headers['Content-Description'] = $value;
+                    break;
+
+                case 'charset':
+                    if (isset($headers['Content-Type'])) {
+                        $headers['Content-Type'] .= '; charset="' . $value . '"';
+                    } else {
+                        $charset = $value;
+                    }
+                    break;
+            }
+        }
+
+        // Default content-type
+        if (!isset($headers['Content-Type'])) {
+            $headers['Content-Type'] = 'text/plain';
+        }
+
+        //Default encoding
+        if (!isset($this->_encoding)) {
+            $this->_encoding = '7bit';
+        }
+
+        // Assign stuff to member variables
+        $this->_encoded  = array();
+        $this->_headers  = $headers;
+        $this->_body     = $body;
+    }
+
+    /**
+     * encode()
+     *
+     * Encodes and returns the email. Also stores
+     * it in the encoded member variable
+     *
+     * @return An associative array containing two elements,
+     *         body and headers. The headers element is itself
+     *         an indexed array.
+     * @access public
+     */
+    function encode()
+    {
+        $encoded =& $this->_encoded;
+
+        if (!empty($this->_subparts)) {
+            srand((double)microtime()*1000000);
+            $boundary = '=_' . md5(uniqid(rand()) . microtime());
+            $this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"';
+
+            // Add body parts to $subparts
+            for ($i = 0; $i < count($this->_subparts); $i++) {
+                $headers = array();
+                $tmp = $this->_subparts[$i]->encode();
+                foreach ($tmp['headers'] as $key => $value) {
+                    $headers[] = $key . ': ' . $value;
+                }
+                $subparts[] = implode(MAIL_MIMEPART_CRLF, $headers) . MAIL_MIMEPART_CRLF . MAIL_MIMEPART_CRLF . $tmp['body'];
+            }
+
+            $encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF .
+                               implode('--' . $boundary . MAIL_MIMEPART_CRLF, $subparts) .
+                               '--' . $boundary.'--' . MAIL_MIMEPART_CRLF;
+
+        } else {
+            $encoded['body'] = $this->_getEncodedData($this->_body, $this->_encoding) . MAIL_MIMEPART_CRLF;
+        }
+
+        // Add headers to $encoded
+        $encoded['headers'] =& $this->_headers;
+
+        return $encoded;
+    }
+
+    /**
+     * &addSubPart()
+     *
+     * Adds a subpart to current mime part and returns
+     * a reference to it
+     *
+     * @param $body   The body of the subpart, if any.
+     * @param $params The parameters for the subpart, same
+     *                as the $params argument for constructor.
+     * @return A reference to the part you just added. It is
+     *         crucial if using multipart/* in your subparts that
+     *         you use =& in your script when calling this function,
+     *         otherwise you will not be able to add further subparts.
+     * @access public
+     */
+    function &addSubPart($body, $params)
+    {
+        $this->_subparts[] = new Mail_mimePart($body, $params);
+        return $this->_subparts[count($this->_subparts) - 1];
+    }
+
+    /**
+     * _getEncodedData()
+     *
+     * Returns encoded data based upon encoding passed to it
+     *
+     * @param $data     The data to encode.
+     * @param $encoding The encoding type to use, 7bit, base64,
+     *                  or quoted-printable.
+     * @access private
+     */
+    function _getEncodedData($data, $encoding)
+    {
+        switch ($encoding) {
+            case '8bit':
+            case '7bit':
+                return $data;
+                break;
+
+            case 'quoted-printable':
+                return $this->_quotedPrintableEncode($data);
+                break;
+
+            case 'base64':
+                return rtrim(chunk_split(base64_encode($data), 76, MAIL_MIMEPART_CRLF));
+                break;
+
+            default:
+                return $data;
+        }
+    }
+
+    /**
+     * quoteadPrintableEncode()
+     *
+     * Encodes data to quoted-printable standard.
+     *
+     * @param $input    The data to encode
+     * @param $line_max Optional max line length. Should
+     *                  not be more than 76 chars
+     *
+     * @access private
+     */
+    function _quotedPrintableEncode($input , $line_max = 76)
+    {
+        $lines  = preg_split("/\r?\n/", $input);
+        $eol    = MAIL_MIMEPART_CRLF;
+        $escape = '=';
+        $output = '';
+
+        while(list(, $line) = each($lines)){
+
+            $linlen     = strlen($line);
+            $newline = '';
+
+            for ($i = 0; $i < $linlen; $i++) {
+                $char = substr($line, $i, 1);
+                $dec  = ord($char);
+
+                if (($dec == 32) AND ($i == ($linlen - 1))){    // convert space at eol only
+                    $char = '=20';
+
+                } elseif($dec == 9) {
+                    ; // Do nothing if a tab.
+                } elseif(($dec == 61) OR ($dec < 32 ) OR ($dec > 126)) {
+                    $char = $escape . strtoupper(sprintf('%02s', dechex($dec)));
+                }
+
+                if ((strlen($newline) + strlen($char)) >= $line_max) {        // MAIL_MIMEPART_CRLF is not counted
+                    $output  .= $newline . $escape . $eol;                    // soft line break; " =\r\n" is okay
+                    $newline  = '';
+                }
+                $newline .= $char;
+            } // end of for
+            $output .= $newline . $eol;
+        }
+        $output = substr($output, 0, -1 * strlen($eol)); // Don't want last crlf
+        return $output;
+    }
+} // End of class
+?>
diff --git a/lib/mail/smtp.php b/lib/mail/smtp.php
new file mode 100644
index 0000000000000000000000000000000000000000..903ec75eb2617fa4cef8b201bd3dd7c9c1bf7ef7
--- /dev/null
+++ b/lib/mail/smtp.php
@@ -0,0 +1,359 @@
+<?php
+/**
+* Filename.......: class.smtp.inc
+* Project........: SMTP Class
+* Version........: 1.0.5
+* Last Modified..: 21 December 2001
+*/
+
+	define('SMTP_STATUS_NOT_CONNECTED', 1, TRUE);
+	define('SMTP_STATUS_CONNECTED', 2, TRUE);
+
+	class smtp{
+
+		var $authenticated;
+		var $connection;
+		var $recipients;
+		var $headers;
+		var $timeout;
+		var $errors;
+		var $status;
+		var $body;
+		var $from;
+		var $host;
+		var $port;
+		var $helo;
+		var $auth;
+		var $user;
+		var $pass;
+
+		/**
+        * Constructor function. Arguments:
+		* $params - An assoc array of parameters:
+		*
+		*   host    - The hostname of the smtp server		Default: localhost
+		*   port    - The port the smtp server runs on		Default: 25
+		*   helo    - What to send as the HELO command		Default: localhost
+		*             (typically the hostname of the
+		*             machine this script runs on)
+		*   auth    - Whether to use basic authentication	Default: FALSE
+		*   user    - Username for authentication			Default: <blank>
+		*   pass    - Password for authentication			Default: <blank>
+		*   timeout - The timeout in seconds for the call	Default: 5
+		*             to fsockopen()
+        */
+
+		function smtp($params = array()){
+
+			if(!defined('CRLF'))
+				define('CRLF', "\r\n", TRUE);
+
+			$this->authenticated	= FALSE;			
+			$this->timeout			= 5;
+			$this->status			= SMTP_STATUS_NOT_CONNECTED;
+			$this->host				= 'localhost';
+			$this->port				= 25;
+			$this->helo				= 'localhost';
+			$this->auth				= FALSE;
+			$this->user				= '';
+			$this->pass				= '';
+			$this->errors   		= array();
+
+			foreach($params as $key => $value){
+				$this->$key = $value;
+			}
+		}
+
+		/**
+        * Connect function. This will, when called
+		* statically, create a new smtp object, 
+		* call the connect function (ie this function)
+		* and return it. When not called statically,
+		* it will connect to the server and send
+		* the HELO command.
+        */
+
+		function &connect($params = array()){
+
+			if(!isset($this->status)){
+				$obj = new smtp($params);
+				if($obj->connect()){
+					$obj->status = SMTP_STATUS_CONNECTED;
+				}
+
+				return $obj;
+
+			}else{
+				$this->connection = fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
+				if(function_exists('socket_set_timeout')){
+					@socket_set_timeout($this->connection, 5, 0);
+				}
+
+				$greeting = $this->get_data();
+				if(is_resource($this->connection)){
+					return $this->auth ? $this->ehlo() : $this->helo();
+				}else{
+					$this->errors[] = 'Failed to connect to server: '.$errstr;
+					return FALSE;
+				}
+			}
+		}
+
+		/**
+        * Function which handles sending the mail.
+		* Arguments:
+		* $params	- Optional assoc array of parameters.
+		*            Can contain:
+		*              recipients - Indexed array of recipients
+		*              from       - The from address. (used in MAIL FROM:),
+		*                           this will be the return path
+		*              headers    - Indexed array of headers, one header per array entry
+		*              body       - The body of the email
+		*            It can also contain any of the parameters from the connect()
+		*            function
+        */
+
+		function send($params = array()){
+
+			foreach($params as $key => $value){
+				$this->set($key, $value);
+			}
+
+			if($this->is_connected()){
+
+				// Do we auth or not? Note the distinction between the auth variable and auth() function
+				if($this->auth AND !$this->authenticated){
+					if(!$this->auth())
+						return FALSE;
+				}
+
+				$this->mail($this->from);
+				if(is_array($this->recipients))
+					foreach($this->recipients as $value)
+						$this->rcpt($value);
+				else
+					$this->rcpt($this->recipients);
+
+				if(!$this->data())
+					return FALSE;
+
+				// Transparency
+				$headers = str_replace(CRLF.'.', CRLF.'..', trim(implode(CRLF, $this->headers)));
+				$body    = str_replace(CRLF.'.', CRLF.'..', $this->body);
+				$body    = $body[0] == '.' ? '.'.$body : $body;
+
+				$this->send_data($headers);
+				$this->send_data('');
+				$this->send_data($body);
+				$this->send_data('.');
+
+				$result = (substr(trim($this->get_data()), 0, 3) === '250');
+				//$this->rset();
+				return $result;
+			}else{
+				$this->errors[] = 'Not connected!';
+				return FALSE;
+			}
+		}
+		
+		/**
+        * Function to implement HELO cmd
+        */
+
+		function helo(){
+			if(is_resource($this->connection)
+					AND $this->send_data('HELO '.$this->helo)
+					AND substr(trim($error = $this->get_data()), 0, 3) === '250' ){
+
+				return TRUE;
+
+			}else{
+				$this->errors[] = 'HELO command failed, output: ' . trim(substr(trim($error),3));
+				return FALSE;
+			}
+		}
+		
+		/**
+        * Function to implement EHLO cmd
+        */
+
+		function ehlo(){
+			if(is_resource($this->connection)
+					AND $this->send_data('EHLO '.$this->helo)
+					AND substr(trim($error = $this->get_data()), 0, 3) === '250' ){
+
+				return TRUE;
+
+			}else{
+				$this->errors[] = 'EHLO command failed, output: ' . trim(substr(trim($error),3));
+				return FALSE;
+			}
+		}
+		
+		/**
+        * Function to implement RSET cmd
+        */
+
+		function rset(){
+			if(is_resource($this->connection)
+					AND $this->send_data('RSET')
+					AND substr(trim($error = $this->get_data()), 0, 3) === '250' ){
+
+				return TRUE;
+
+			}else{
+				$this->errors[] = 'RSET command failed, output: ' . trim(substr(trim($error),3));
+				return FALSE;
+			}
+		}
+		
+		/**
+        * Function to implement QUIT cmd
+        */
+
+		function quit(){
+			if(is_resource($this->connection)
+					AND $this->send_data('QUIT')
+					AND substr(trim($error = $this->get_data()), 0, 3) === '221' ){
+
+				fclose($this->connection);
+				$this->status = SMTP_STATUS_NOT_CONNECTED;
+				return TRUE;
+
+			}else{
+				$this->errors[] = 'QUIT command failed, output: ' . trim(substr(trim($error),3));
+				return FALSE;
+			}
+		}
+		
+		/**
+        * Function to implement AUTH cmd
+        */
+
+		function auth(){
+			if(is_resource($this->connection)
+					AND $this->send_data('AUTH LOGIN')
+					AND substr(trim($error = $this->get_data()), 0, 3) === '334'
+					AND $this->send_data(base64_encode($this->user))			// Send username
+					AND substr(trim($error = $this->get_data()),0,3) === '334'
+					AND $this->send_data(base64_encode($this->pass))			// Send password
+					AND substr(trim($error = $this->get_data()),0,3) === '235' ){
+
+				$this->authenticated = TRUE;
+				return TRUE;
+
+			}else{
+				$this->errors[] = 'AUTH command failed: ' . trim(substr(trim($error),3));
+				return FALSE;
+			}
+		}
+
+		/**
+        * Function that handles the MAIL FROM: cmd
+        */
+		
+		function mail($from){
+
+			if($this->is_connected()
+				AND $this->send_data('MAIL FROM:<'.$from.'>')
+				AND substr(trim($this->get_data()), 0, 2) === '250' ){
+
+				return TRUE;
+
+			}else
+				return FALSE;
+		}
+
+		/**
+        * Function that handles the RCPT TO: cmd
+        */
+		
+		function rcpt($to){
+
+			if($this->is_connected()
+				AND $this->send_data('RCPT TO:<'.$to.'>')
+				AND substr(trim($error = $this->get_data()), 0, 2) === '25' ){
+
+				return TRUE;
+
+			}else{
+				$this->errors[] = trim(substr(trim($error), 3));
+				return FALSE;
+			}
+		}
+
+		/**
+        * Function that sends the DATA cmd
+        */
+
+		function data(){
+
+			if($this->is_connected()
+				AND $this->send_data('DATA')
+				AND substr(trim($error = $this->get_data()), 0, 3) === '354' ){
+ 
+				return TRUE;
+
+			}else{
+				$this->errors[] = trim(substr(trim($error), 3));
+				return FALSE;
+			}
+		}
+
+		/**
+        * Function to determine if this object
+		* is connected to the server or not.
+        */
+
+		function is_connected(){
+
+			return (is_resource($this->connection) AND ($this->status === SMTP_STATUS_CONNECTED));
+		}
+
+		/**
+        * Function to send a bit of data
+        */
+
+		function send_data($data){
+
+			if(is_resource($this->connection)){
+				return fwrite($this->connection, $data.CRLF, strlen($data)+2);
+				
+			}else
+				return FALSE;
+		}
+
+		/**
+        * Function to get data.
+        */
+
+		function &get_data(){
+
+			$return = '';
+			$line   = '';
+			$loops  = 0;
+
+			if(is_resource($this->connection)){
+				while((strpos($return, CRLF) === FALSE OR substr($line,3,1) !== ' ') AND $loops < 100){
+					$line    = fgets($this->connection, 512);
+					$return .= $line;
+					$loops++;
+				}
+				return $return;
+
+			}else
+				return FALSE;
+		}
+
+		/**
+        * Sets a variable
+        */
+		
+		function set($var, $value){
+
+			$this->$var = $value;
+			return TRUE;
+		}
+
+	} // End of class
+?>
\ No newline at end of file
diff --git a/lib/menue_links.php b/lib/menue_links.php
new file mode 100644
index 0000000000000000000000000000000000000000..1fefe1afcd6ef48388058300a9b705fb1d69f0c9
--- /dev/null
+++ b/lib/menue_links.php
@@ -0,0 +1,73 @@
+<?menuehead("Navigation");
+if ($_SESSION['login'] == 'true') {?>
+
+     <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/konto/uebersicht">Kontoübersicht</a><br />
+     <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/konto/einzahlen">Einzahlen</a><br />
+     <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/konto/auszahlen">Auszahlen</a><br />
+     <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/konto/buchungen">Buchungen</a><br />
+     <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/konto/refuebersicht">Refübersicht</a><br />
+     <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/konto/userprofil">Userprofil</a><br />
+     <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/intern/startseite&amp;logout=true"><i>Logout</i></a>
+<?} else {?>
+<form action="" method="post">
+<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
+<tr>
+    <td align="center">
+    <b>Nickname:</b><br>
+    <input type="Text" name="nickname" value="<?=$_POST['nickname'];?>" style="width=110px;"><br>
+    <b>Passwort:</b><br>
+    <input type="Password" name="passwort" value="" style="width=110px;"><br>
+    <select name="autologin" size="1" style="width=110px;">
+        <option value="true" SELECTED>Mit Autologin&nbsp;</option>
+        <option value="false">Ohne Autologin&nbsp;</option>
+    </select><br>
+    <br>
+    <input type="Submit" name="checkid" value="Login" style="width=110px;"><br><br>
+</td>
+</tr>
+<tr>
+    <td height="15" align="left">
+    <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/intern/daten">Daten vergessen?</a>
+    </td>
+</tr>
+<tr>
+    <td height="15" align="left">
+    <img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/intern/anmelden">Registrieren</a>
+    </td>
+</tr>
+</table>
+</form>
+<?}?>
+<?menuefoot();?>
+
+<? if ($_SESSION['login'] == 'true') {?>
+
+
+
+<?menuehead("Verdienen");?>
+<img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/verdienen/klick4">Klick4Lose</a><br />
+<img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/verdienen/betteln4">Betteln4Lose</a><br />
+<img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/verdienen/paidmails">Paidmails</a>
+<?menuefoot();?>
+
+<?menuehead("Unsere Rallys");?>
+<img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/ralleys/aktiv">Aktivrally</a><br />
+<img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/ralleys/klick">Klickrally</a><br />
+<img src="images/pfeil.gif" border="0" alt="">&nbsp;<a href="?content=/ralleys/ref">Refrally</a>
+<?menuefoot();?>
+
+
+<?
+$filename = 'lib/texte/box2.txt';
+$fp = fopen ($filename, "r");
+$inhalt = fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+if ($inhalt != ''){
+menuehead("Unsere Sponsoren");
+echo nl2br($inhalt);
+menuefoot();
+}
+?>
+
+<? } ?>
diff --git a/lib/menue_rechts.php b/lib/menue_rechts.php
new file mode 100644
index 0000000000000000000000000000000000000000..223e8fe6dbf14e5dab57c2a4d82bb32a9c1793a8
--- /dev/null
+++ b/lib/menue_rechts.php
@@ -0,0 +1,31 @@
+<? if ($_SESSION['login'] == 'true') {?>
+
+<?menuehead("Games");?>
+Link<br>
+Link<br>
+<?menuefoot();
+
+menuehead("Wer ist online");
+include ("lib/weristonline.php");
+menuefoot(); 
+}
+
+$filename = 'lib/texte/box1.txt';
+$fp = fopen ($filename, "r");
+$inhalt = fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+
+if ($inhalt != ''){
+menuehead("Unsere Sponsoren");
+echo nl2br($inhalt);
+menuefoot();
+}
+?>
+<!-- Diese Seite basiert auf dem VMS1.2 von Designerscripte.net das entfernen dieses Copyrighthinweises ohne Erlaubnis zieht
+rechtliche Schritte mit sich
+-->
+<div align="center"><font size="1">&copy; by <a href="http://www.designerscripte.net">Designerscripte.net</a></font></div>
+<!-- Diese Seite basiert auf dem VMS1.2 von Designerscripte.net das entfernen dieses Copyrighthinweises ohne Erlaubnis zieht
+rechtliche Schritte mit sich
+-->
\ No newline at end of file
diff --git a/lib/module.lib.php b/lib/module.lib.php
new file mode 100644
index 0000000000000000000000000000000000000000..2da03026e05a9a74ccb06dede3aa8c8b9f9f8d85
--- /dev/null
+++ b/lib/module.lib.php
@@ -0,0 +1,54 @@
+<?
+// Gibt den aktuellen Modulnamen aus
+function modul_name () {
+global $_GET;
+	return $_GET['mod'];
+}
+
+// Gibt das aktuelle Modulverzeichnis aus
+function modul_dir () {
+global $dir, $_GET;
+	return ($dir.$_GET['mod'].'/');
+}
+
+// Erzeugt modulinterne Links
+function modul_link ($vars='') {
+global $_GET, $linkstyle;
+	$link = $linkstyle.$_GET['mod'];	
+	if (!empty ($vars)) $link .= $vars;
+	return $link;
+}
+
+// Sicherheitsfunktion um unerlaubte Ausrufe zu verhindern
+function modul_access () {
+	if (!defined ('MODULSYSTEM_LOADED')) die ('Unberechtigter Zugriff!');
+}
+
+// Sicherheitsfunktion fuer Administration um unerlaubte Ausrufe zu verhindern
+function moduladmin_access () {
+	if (!defined ('MODULADMIN_LOADED')) die ('Unberechtigter Zugriff!');
+}
+
+// MySQL-Query-Funktion
+function modul_query ($query) {
+	return db_query ($query);
+}
+
+function modul_easytime ($time, $trenner=FALSE) {
+	$diff = ( time () - $time );
+
+	$days = floor ( $diff / 86400 );
+	if ($days > 0) $diff = ( $diff % 86400 );
+
+	$hours = floor ( $diff / 3600 );
+	if ($hours > 0) $diff = ( $diff % 3600 );
+
+	$mins = floor ( $diff / 60 );
+
+	$trenner = ($trenner == FALSE) ? ', ' : '<br />';
+	$dayend = ($days > 1) ? 'Tage' : 'Tag';
+
+	if ($days > 0) return ($days.' '.$dayend.$trenner.$hours.' Std.');
+	else return ($hours.' Std.'.$trenner.$mins.' Min.');
+}
+?>
\ No newline at end of file
diff --git a/lib/schnittstellen/ebesucher.php b/lib/schnittstellen/ebesucher.php
new file mode 100644
index 0000000000000000000000000000000000000000..729bbce1785d5d19ac14a3980af8d5f6474290e2
--- /dev/null
+++ b/lib/schnittstellen/ebesucher.php
@@ -0,0 +1,125 @@
+<?
+// eBesucher ST Fehlercodes
+$trans_error[1001]        = "Alles OK";
+$trans_error[1011]        = "Falsche Punkteart";
+$trans_error[1012]        = "Falsche Punkteanzahl (z.B. keine ganze Zahl oder negativ)";
+$trans_error[1013]        = "Betreff zu lang oder nicht angegeben";
+$trans_error[1021]        = "Falsche Schnittstellen-ID";
+$trans_error[1022]        = "Falsches Schnittstellen-Passwort";
+$trans_error[1023]        = "Zu wenig Punkte auf diesem Schnittstellenaccount";
+$trans_error[1024]      = "Falsche KennungsID";
+$trans_error[1025]      = "Keine Abfragen mehr auf dem Schnittstellenaccount";
+$trans_error[1031]      = "Keine oder falsche UserID bzw. Usernamen angegeben";
+$trans_error[1032]      = "UserID UND Username angegeben, benötigt wird nur eins!";
+$trans_error[1033]      = "Kein oder falsches User-Passwort angegeben";
+$trans_error[1034]      = "Dieser User ist gesperrt";
+$trans_error[1035]      = "Das Guthaben des Users reicht nicht aus";
+$trans_error[1036]      = "Neuer User (aus Sicherheitsgründen dürfen neue User in den ersten 7 Tagen ihrer Mitgliedschaft die Schnittstelle nicht benutzen)";
+$trans_error[1098]      = "Schnittstelle z.Z. nicht verfügbar (DB-Arbeiten o.ä.)";
+$trans_error[1099]      = "Unbekannter Fehler";
+$trans_error[9998]      = "Fehlerhafter Aufruf (falsche Reihenfolge o.ä.)";
+$trans_error[9999]      = "Timeout (Schnittstelle nicht erreichbar)";
+
+// ST->User
+function auszahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code) {
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$trans_betreff = urlencode($trans_betreff);
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+$trans_menge = urlencode($trans_menge);
+// SecVMS change end
+
+$returned='';
+$ret=@file("http://st.ebesucher.de/send.php?stid=".$betreiber_id."&stpw=".$betreiber_pw."&uid=".$kunden_id."&upw=".$kunden_pw."&k=".$betreiber_kennung."&a=1&p=".$trans_menge."&b=".$trans_betreff."","r");
+for($i=0;$i<count($ret);$i++) {
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,6);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+// User->ST
+function einzahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code){
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$trans_betreff = urlencode($trans_betreff);
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+$trans_menge = urlencode($trans_menge);
+// SecVMS change end
+
+$returned='';
+$ret=file("http://st.ebesucher.de/get.php?stid=".$betreiber_id."&stpw=".$betreiber_pw."&uid=".$kunden_id."&upw=".$kunden_pw."&k=".$betreiber_kennung."&a=1&p=".$trans_menge."&b=".$trans_betreff."","r");
+for($i=0;$i<count($ret);$i++) {
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,6);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+// ebesucher-Kontostand
+function usercheck ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw){
+global $error,$trans_ausgabe,$trans_error,$user_saldo;
+
+// SecVMS change begin
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+// SecVMS change end
+
+$returned='';
+$ret=file("http://st.ebesucher.de/info.php?stid=".$betreiber_id."&stpw=".$betreiber_pw."&uid=".$kunden_id."&upw=".$kunden_pw."","r");
+for($i=0;$i<count($ret);$i++){
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+if ($error != "true") $user_saldo = $trans_check[1];
+return $error;
+return $trans_ausgabe;
+return $user_saldo;
+}
+
+// Usercheck
+function uservalidate ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw){
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+// SecVMS change end
+
+$returned='';
+$ret=file("http://st.ebesucher.de/info.php?stid=".$betreiber_id."&stpw=".$betreiber_pw."&uid=".$kunden_id."&upw=".$kunden_pw."","r");
+for($i=0;$i<count($ret);$i++){
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+
+return $error;
+return $trans_ausgabe;
+}
+?>
\ No newline at end of file
diff --git a/lib/schnittstellen/funcoins.php b/lib/schnittstellen/funcoins.php
new file mode 100644
index 0000000000000000000000000000000000000000..93fc2d3cc4b1e91e929785392025a78233f0f7fc
--- /dev/null
+++ b/lib/schnittstellen/funcoins.php
@@ -0,0 +1,114 @@
+<?
+/*
+Transaktionsschnittstelle für Projekt Seth
+Betreibersystem Funcoins FuCoEx²
+Copyright bei Detlef Tiegel
+http://www.projekt-seth.de
+*/
+
+// Funcoins FuCoEx² Fehlercodes
+
+// FuCoEx² -> Funcoins
+function auszahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code) {
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$trans_betreff = urlencode($trans_betreff);
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+$trans_menge = urlencode($trans_menge);
+// SecVMS change end
+
+$returned='';
+$ret=@file("http://www.funcoinbank.de/engine/fucoex.php?typ=send&k1_nr=".$betreiber_id."&k1_pw=".$betreiber_pw."&k2_nr=".$kunden_id."&k2_pw=".$kunden_pw."&n=".$trans_menge."&s=".$trans_betreff."&transid=".$trans_code."","r");
+for($i=0;$i<count($ret);$i++) {
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_check[0];
+if ($trans_ausgabe == "") $trans_ausgabe = 'FuCoEx²-Server nicht erreichbar!';
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+// Funcoins -> FuCoEx²
+function einzahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code){
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$trans_betreff = urlencode($trans_betreff);
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+$trans_menge = urlencode($trans_menge);
+// SecVMS change end
+
+$returned='';
+$ret=@file("http://www.funcoinbank.de/engine/fucoex.php?typ=get&k1_nr=".$betreiber_id."&k1_pw=".$betreiber_pw."&k2_nr=".$kunden_id."&k2_pw=".$kunden_pw."&n=".$trans_menge."&s=".$trans_betreff."&transid=".$trans_code."","r");
+for($i=0;$i<count($ret);$i++) {
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_check[0];
+if ($trans_ausgabe == "") $trans_ausgabe = 'FuCoEx²-Server nicht erreichbar!';
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+// Funcoins-Kontostand
+function usercheck ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw){
+global $error,$trans_ausgabe,$trans_error,$user_saldo;
+
+// SecVMS change begin
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+// SecVMS change end
+
+$returned='';
+$ret=@file("http://www.funcoinbank.de/engine/fucoex.php?typ=saldo&k1_nr=".$betreiber_id."&k1_pw=".$betreiber_pw."&k2_nr=".$kunden_id."&k2_pw=".$kunden_pw."","r");
+for($i=0;$i<count($ret);$i++){
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_check[0];
+if ($trans_ausgabe == "") $trans_ausgabe = 'FuCoEx²-Server nicht erreichbar!';
+$error = "true";
+}
+if ($error != "true") $user_saldo = $trans_check[1];
+return $error;
+return $trans_ausgabe;
+return $user_saldo;
+}
+
+// Usercheck
+function uservalidate ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw){
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+// SecVMS change end
+
+$returned='';
+$ret=@file("http://www.funcoinbank.de/engine/fucoex.php?typ=validate&k1_nr=".$betreiber_id."&k1_pw=".$betreiber_pw."&k2_nr=".$kunden_id."&k2_pw=".$kunden_pw."","r");
+for($i=0;$i<count($ret);$i++){
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_check[0];
+if ($trans_ausgabe == "") $trans_ausgabe = 'FuCoEx²-Server nicht erreichbar!';
+$error = "true";
+}
+if ($trans_check[2] == 1) {$trans_ausgabe = 'Du stehst auf der FuCo-Blacklist!'; $error = "true";}
+if ($trans_check[5] == 'ja') {$trans_ausgabe = 'Betreiberkonten dürfen sich nicht anmelden!'; $error = "true";}
+return $error;
+return $trans_ausgabe;
+}
+?>
\ No newline at end of file
diff --git a/lib/schnittstellen/klamm.php b/lib/schnittstellen/klamm.php
new file mode 100644
index 0000000000000000000000000000000000000000..667845f3eea818906988081f89f77538f1680292
--- /dev/null
+++ b/lib/schnittstellen/klamm.php
@@ -0,0 +1,138 @@
+<?
+/*
+Transaktionsschnittstelle für Projekt Seth
+Betreibersystem Klamm ExportForce²
+Copyright bei Detlef Tiegel
+http://www.projekt-seth.de
+*/
+
+// Klamm ExportForce² Fehlercodes
+$trans_error[1001]		= "Alles OK";
+$trans_error[1002]		= "EF Account existiert nicht";
+$trans_error[1003]		= "EF Passwort falsch";
+$trans_error[1004]		= "Nicht genug freie EF Anfragen";
+$trans_error[1005]		= "EF Kennung existiert nicht";
+$trans_error[1006]		= "klammUser existiert nicht";
+$trans_error[1007]		= "klammUser ist gesperrt";
+$trans_error[1008]		= "klammUser hat zu wenig Lose";
+$trans_error[1009]		= "Lose Passwort falsch";
+$trans_error[1010]		= "Zu wenig Lose auf EF Account";
+$trans_error[1011]		= "Anzahl nicht zulässig";
+$trans_error[1012]		= "Betreff nicht zulässig";
+$trans_error[1013]		= "Inout Parameter nicht zulässig";
+$trans_error[1014]		= "Limit Parameter nicht zulässig";
+$trans_error[1015]		= "ab_tid Parameter nicht zulässig";
+$trans_error[1016]		= "ab_time Parameter nicht zulässig";
+$trans_error[1017]		= "type Parameter nicht zulässig";
+$trans_error[1018]		= "Statistik Passwort falsch";
+$trans_error[1019]		= "Tresor Parameter nicht zulässig";
+$trans_error[1020]		= "Empfänger EF existiert nicht";
+$trans_error[1021]		= "Empfänger EF noch nicht akiviert";
+$trans_error[1022]		= "Überweisung an eigenen EF nicht möglich";
+$trans_error[1023]		= "target Parameter nicht zulässig";
+$trans_error[1098]		= "EF Account ist gesperrt";
+$trans_error[1099]		= "Unbekannter Fehler";
+
+// ExportForce² -> Klamm.de
+function auszahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code) {
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$trans_betreff = urlencode($trans_betreff);
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+$trans_menge = urlencode($trans_menge);
+// SecVMS change end
+
+$returned='';
+$ret=@file("http://www.klamm.de/engine/lose/send.php?ef_id=".$betreiber_id."&ef_pw=".$betreiber_pw."&k_id=".$kunden_id."&s=".$trans_betreff."&n=".$trans_menge."&k=".$betreiber_kennung."&l_pw=".$kunden_pw."&code=".$trans_code."","r");
+for($i=0;$i<count($ret);$i++) {
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+// Klamm.de -> ExportForce²
+function einzahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code){
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$trans_betreff = urlencode($trans_betreff);
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+$trans_menge = urlencode($trans_menge);
+// SecVMS change end
+
+$returned='';
+$ret=file("http://www.klamm.de/engine/lose/get.php?ef_id=".$betreiber_id."&ef_pw=".$betreiber_pw."&k_id=".$kunden_id."&s=".$trans_betreff."&n=".$trans_menge."&k=".$betreiber_kennung."&l_pw=".$kunden_pw."&code=".$trans_code."","r");
+for($i=0;$i<count($ret);$i++) {
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+// Klammlose-Kontostand
+function usercheck ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw){
+global $error,$trans_ausgabe,$trans_error,$user_saldo;
+
+// SecVMS change begin
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+// SecVMS change end
+
+$returned='';
+$ret=file("http://www.klamm.de/engine/lose/saldo.php?ef_id=".$betreiber_id."&ef_pw=".$betreiber_pw."&k_id=".$kunden_id."&l_pw=".$kunden_pw."","r");
+for($i=0;$i<count($ret);$i++){
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+if ($error != "true") $user_saldo = $trans_check[1];
+return $error;
+return $trans_ausgabe;
+return $user_saldo;
+}
+
+// Usercheck
+function uservalidate ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw){
+global $error,$trans_ausgabe,$trans_error;
+
+// SecVMS change begin
+$kunden_id = urlencode($kunden_id);
+$kunden_pw = urlencode($kunden_pw);
+// SecVMS change end
+
+$returned='';
+$ret=file("http://www.klamm.de/engine/lose/validate.php?ef_id=".$betreiber_id."&ef_pw=".$betreiber_pw."&k_id=".$kunden_id."&l_pw=".$kunden_pw."","r");
+for($i=0;$i<count($ret);$i++){
+  $returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1001") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+
+return $error;
+return $trans_ausgabe;
+}
+?>
\ No newline at end of file
diff --git a/lib/schnittstellen/nickey.php b/lib/schnittstellen/nickey.php
new file mode 100644
index 0000000000000000000000000000000000000000..d833fa16a9d2eb8c530dc2c5687a0271c75847dd
--- /dev/null
+++ b/lib/schnittstellen/nickey.php
@@ -0,0 +1,95 @@
+<?
+/*
+Transaktionsschnittstelle für Projekt Seth / VMS
+Betreibersystem Nickeyforce
+Copyright 2005 Michael Rosenberger
+http://www.nickeyforce.de info@nickeyforce.de
+*/
+// Nickeyforce Kennung
+// Bitte beim Validate die Kennung eintragen !!!!
+
+// Nickeyforce Fehlercodes
+$trans_error[1000] = "Alles OK";
+$trans_error[1001] = "ForceID / Passwortkombination stimmen nicht";
+$trans_error[1002] = "Kennung existiert nicht";
+$trans_error[1003] = "User existiert nicht";
+$trans_error[1004] = "nickeyPasswort falsch";
+$trans_error[1005] = "User gesperrt";
+$trans_error[1006] = "Forcekonto gesperrt";
+$trans_error[1007] = "nicht genügend nickeys auf dem Userkonto";
+$trans_error[1008] = "nicht genügend nickeys auf dem Forcekonto";
+$trans_error[1020] = "Parameter fehlt";
+$trans_error[1021] = "Falsche Anzahl (mindestens 10 nickeys je Transaktion)";
+$trans_error[1022] = "Forcekonto noch nicht aktiviert";
+$trans_error[1030] = "Keine freien Zugriffe (500/Tag) bzw. gekaufte Zugriffe uebrig";
+$trans_error[1031] = "Es sind nur 100000 Zugriffe/Tag erlaubt";
+$trans_error[1040] = "Keine gesperrten User im System";
+$trans_error[1051] = "SMS System nicht aktiviert für den Betreiber";
+$trans_error[1052] = "SMS Guthaben leer/aufgebraucht. Bitte aufladen";
+$trans_error[1053] = "Empfängernummer falsches Format";
+$trans_error[1054] = "SMS konnte nicht gesendet werden";
+$trans_error[1055] = "SMS Text länger als 160 Zeichen, bitte begrenzen";
+$trans_error[1080] = "Keine SMS im Ticker vorhanden";
+
+
+
+//Buchung nickeyFORCE -> nickeyBANK
+function auszahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code) {
+global $error,$trans_ausgabe,$trans_error;
+$trans_betreff = ereg_replace(" ", "%20", $trans_betreff);
+$returned='';
+$ret=@file("http://www.nickeyforce.de/api/send2.php?api_id=".$betreiber_id."&api_passwort=".$betreiber_pw."&user=".$kunden_id."&betreff=".$trans_betreff."&anzahl=".$trans_menge."&api_kennung=".$betreiber_kennung."&code=".$trans_code."","r");
+for($i=0;$i<count($ret);$i++) {
+$returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1000") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+//Buchung nickeyBANK -> nickeyFORCE
+function einzahlen ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw,$betreiber_kennung,$trans_menge,$trans_betreff,$trans_code){
+global $error,$trans_ausgabe,$trans_error;
+$trans_betreff = ereg_replace(" ", "%20", $trans_betreff);
+$returned='';
+$ret=file("http://www.nickeyforce.de/api/get2.php?api_id=".$betreiber_id."&api_passwort=".$betreiber_pw."&betreff=".$trans_betreff."&api_kennung=".$betreiber_kennung."&user=".$kunden_id."&user_passwort=".$kunden_pw."&anzahl=".$trans_menge."&code=".$trans_code."","r");
+for($i=0;$i<count($ret);$i++) {
+$returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1000") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+return $error;
+return $trans_ausgabe;
+}
+
+
+
+// Usercheck nickeyFORCE -> nickeyBANK
+// Bitte hier Kennung eintragen !!!!
+function uservalidate ($betreiber_id,$betreiber_pw,$kunden_id,$kunden_pw){
+global $error,$trans_ausgabe,$trans_error;
+$returned='';
+$ret=file("http://www.nickeyforce.de/api/validate.php?api_id=".$betreiber_id."&api_passwort=".$betreiber_pw."&user=".$kunden_id."&user_passwort=".$kunden_pw."&api_kennung=XXXXX","r");
+for($i=0;$i<count($ret);$i++){
+$returned.=$ret[$i];
+}
+$trans_check = split("[|]",$returned,7);
+if ($trans_check[0] != "1000") {
+$trans_ausgabe = $trans_error[$trans_check[0]];
+if ($trans_ausgabe == "") $trans_ausgabe = $trans_error[1099];
+$error = "true";
+}
+
+return $error;
+return $trans_ausgabe;
+}
+?>
\ No newline at end of file
diff --git a/lib/session.lib.php b/lib/session.lib.php
new file mode 100644
index 0000000000000000000000000000000000000000..00f6028f8fd17466aa51942bd9985cc3c79be555
--- /dev/null
+++ b/lib/session.lib.php
@@ -0,0 +1,121 @@
+<?
+/*
+Datei : session.lib.php
+Änderungen in dieser Datei nur dann vornehmen wenn Sie wissen was Sie tun!
+*/
+@session_start();
+
+// Variabeln definieren
+if (!isset($_SESSION['login']))		$_SESSION['login']		= "";
+if (!isset($_SESSION['werber']))	$_SESSION['werber']		= "0";
+if (!isset($_SESSION['uid']))		$_SESSION['uid']		= "0";
+if (!isset($_POST['nickname']))		$_POST['nickname']		= "";
+if (!isset($_POST['passwort']))		$_POST['passwort']		= "";
+if (!isset($_POST['checkid']))		$_POST['checkid']		= "";
+if (!isset($_POST['autologin']))	$_POST['autologin']		= "";
+if (!isset($_GET['logout']))		$_GET['logout']			= "";
+if (!isset($_GET['ref']))			$_GET['ref']			= "0";
+
+if ($_SESSION['werber'] == "0") $_SESSION['werber'] = (int)$_GET['ref'];
+
+// Seiteneinstellungen laden...
+$pageconfig = mysql_fetch_array(db_query("SELECT * FROM ".$db_prefix."_seitenkonfig LIMIT 1"));
+
+if ($pageconfig['wartung'] == 1 && $_SESSION['uid'] != $admin_id) {
+	setCookie('uid','',time()-86400*30);
+	setCookie('passwort','',time()-86400*30);
+	setCookie('autologin','',time()-86400*30);
+	$_SESSION['uid']		= "";
+	$_SESSION['passwort']	= "";
+	$_SESSION['login']		= "";
+	header ("location: ".$domain."/wartung.php");
+	die();
+}
+
+
+// Login
+if ($_POST['checkid'] == 'Login' && $_POST['nickname'] && $_POST['passwort']) {
+
+	$_POST['nickname'] = addslashes($_POST['nickname']);
+
+	$login_check = db_query("SELECT k.uid,k.passwort,k.status,k.hinweis FROM 
+                                        ".$db_prefix."_userdaten u
+                                        LEFT JOIN ".$db_prefix."_kontodaten k ON k.uid=u.uid
+WHERE u.nickname='".$_POST['nickname']."' AND k.passwort='".md5($_POST['passwort'])."' LIMIT 1");
+
+	if (mysql_num_rows($login_check)) {
+	$login_check = mysql_fetch_array($login_check);
+		
+                // Wenn User noch nicht freigeschaltet!
+		if ($login_check['status'] == 0) {
+		$_SESSION['uid']		= "";
+		$_SESSION['passwort']	        = "";
+		$_SESSION['login']		= "";
+		$_GET['content'] = '/error/kein_zutritt';
+		}
+		
+		// Wenn beim User alles O.K. ist!
+		if ($login_check['status'] == 1) {
+			db_query("UPDATE ".$db_prefix."_kontodaten SET login_ip='".$ip."' , loginzeit='".time()."' WHERE uid=".$login_check['uid']." and passwort='".md5($_POST['passwort'])."' LIMIT 1");
+			if ($_POST['autologin'] == 'true') {
+			setCookie('uid',$login_check['uid'],time()+86400*30);
+			setCookie('passwort',$login_check['passwort'],time()+86400*30);
+			setCookie('autologin','true',time()+86400*30);
+			}
+			$_SESSION['uid']		= $login_check['uid'];
+			$_SESSION['passwort']	        = $login_check['passwort'];
+			$_SESSION['login']		= "true";
+			header ("location: ".$domain);
+			die();
+		}
+		
+                // Wenn User gesperrt wurde!
+		if ($login_check['status'] == 2) {
+		   $_SESSION['uid']		= "";
+		   $_SESSION['passwort']	= "";
+		   $_SESSION['login']		= "";
+		   $_GET['content'] = '/error/user_gesperrt';
+		}
+
+	// Wenn es den User garnicht giebt	
+	} else {
+	$_GET['content'] = '/error/kein_zutritt';
+	}
+
+} else {
+if ($_POST['checkid'] == 'Login') $_GET['content'] = '/error/kein_zutritt';
+}
+
+// Autologin
+if ($_SESSION['login'] != 'true' && isset($_COOKIE['autologin']) && isset($_COOKIE['uid']) && isset($_COOKIE['passwort'])) {
+
+	$_COOKIE['uid'] = (int)$_COOKIE['uid'];
+	$_COOKIE['passwort'] = addslashes ($_COOKIE['passwort']);
+
+	$login_check = db_query("SELECT `uid`,`passwort`,`status`,`hinweis` FROM ".$db_prefix."_kontodaten WHERE uid=".$_COOKIE['uid']." and passwort='".$_COOKIE['passwort']."' LIMIT 1");
+	if (mysql_num_rows($login_check)) {
+	$login_check = mysql_fetch_array($login_check);
+		if ($login_check['status'] == 1) {
+		db_query("UPDATE ".$db_prefix."_kontodaten SET login_ip='".$ip."' , loginzeit='".time()."' WHERE uid=".$_COOKIE['uid']." and passwort='".$_COOKIE['passwort']."' LIMIT 1");
+		$_SESSION['uid']		= $login_check['uid'];
+		$_SESSION['passwort']	= $login_check['passwort'];
+		$_SESSION['login']		= "true";
+		}
+	}
+}
+
+// Logout
+if ($_GET['logout'] == 'true') {
+	setCookie('uid','',time()-86400*30);
+	setCookie('passwort','',time()-86400*30);
+	setCookie('autologin','',time()-86400*30);
+	$_SESSION['uid']		= "";
+	$_SESSION['passwort']	        = "";
+	$_SESSION['login']		= "";
+	header ("location: ".$domain);
+	die();
+}
+if (isset ($_SESSION['uid']) && isset ($_SESSION['passwort']) && !empty ($_SESSION['uid']) && !empty ($_SESSION['passwort'])){
+db_query ("UPDATE ".$db_prefix."_kontodaten SET last_active = ".time()." WHERE uid = ".$_SESSION['uid']." AND passwort = '".$_SESSION['passwort']."' LIMIT 1");
+}
+?>
\ No newline at end of file
diff --git a/lib/texte/agb.txt b/lib/texte/agb.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b19bd3246eb90e52a5345ae67958c430bd31a97e
--- /dev/null
+++ b/lib/texte/agb.txt
@@ -0,0 +1 @@
+agb
\ No newline at end of file
diff --git a/lib/texte/aktivralley.txt b/lib/texte/aktivralley.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b91361afa8c5fdfd2e53f70ea426e4d11dd9e24b
--- /dev/null
+++ b/lib/texte/aktivralley.txt
@@ -0,0 +1,7 @@
+Aktivralley
+
+Pro Funcoin 1 Aktivpunkt bei Klick4Funcoins
+
+Jokerslot pro Spiel 100AP
+Atomic2 pro Spiel 100 AP
+Atomic1 pro Spiel 10 AP
\ No newline at end of file
diff --git a/lib/texte/alt_bettelseitenpopup.txt b/lib/texte/alt_bettelseitenpopup.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e440e5c842586965a7fb77deda2eca68612b1f53
--- /dev/null
+++ b/lib/texte/alt_bettelseitenpopup.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file
diff --git a/lib/texte/alt_headerbanner.txt b/lib/texte/alt_headerbanner.txt
new file mode 100644
index 0000000000000000000000000000000000000000..56a6051ca2b02b04ef92d5150c9ef600403cb1de
--- /dev/null
+++ b/lib/texte/alt_headerbanner.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file
diff --git a/lib/texte/alt_startseitenpopup.txt b/lib/texte/alt_startseitenpopup.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ab9d6faa0f6cd6c5b0068d3d3a24902857142a66
--- /dev/null
+++ b/lib/texte/alt_startseitenpopup.txt
@@ -0,0 +1 @@
+<!-- Nothing -->
\ No newline at end of file
diff --git a/lib/texte/bettelwerbung.txt b/lib/texte/bettelwerbung.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e440e5c842586965a7fb77deda2eca68612b1f53
--- /dev/null
+++ b/lib/texte/bettelwerbung.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file
diff --git a/lib/texte/box1.txt b/lib/texte/box1.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8853508e8a0708bfbaf3c09e7fd70b963374b2fc
--- /dev/null
+++ b/lib/texte/box1.txt
@@ -0,0 +1 @@
+555
\ No newline at end of file
diff --git a/lib/texte/box2.txt b/lib/texte/box2.txt
new file mode 100644
index 0000000000000000000000000000000000000000..bf0d87ab1b2b0ec1a11a3973d2845b42413d9767
--- /dev/null
+++ b/lib/texte/box2.txt
@@ -0,0 +1 @@
+4
\ No newline at end of file
diff --git a/lib/texte/faq.txt b/lib/texte/faq.txt
new file mode 100644
index 0000000000000000000000000000000000000000..32914fe4ef7eca195e47ad05f6d703e5bfe8e36e
--- /dev/null
+++ b/lib/texte/faq.txt
@@ -0,0 +1 @@
+FAQ
\ No newline at end of file
diff --git a/lib/texte/klickralley.txt b/lib/texte/klickralley.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/lib/texte/refralley.txt b/lib/texte/refralley.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3c1e1bc1aad094ce5da2824b7d31f75e2a0fba4e
--- /dev/null
+++ b/lib/texte/refralley.txt
@@ -0,0 +1 @@
+Refralley
\ No newline at end of file
diff --git a/lib/texte/startwerbung.txt b/lib/texte/startwerbung.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a579d79f2994827ec98c36c0c1344887b3727362
--- /dev/null
+++ b/lib/texte/startwerbung.txt
@@ -0,0 +1,4 @@
+<script src="http://www.fuco-ads.de/lose/zbanner.php?id=54&aid=89&size=468x60&only="></script>
+
+<IFRAME SRC="http://www.promotion4banner.de/cgi/p4b.cgi?dimplex" MARGINWIDTH="0" MARGINHEIGHT="0" HSPACE="0" SCROLLING="no" VSPACE="0" FRAMEBORDER="0" WIDTH="468" HEIGHT="60"></IFRAME>
+<!-- ENDE - (c) Promotion4Banner.de - HTML-Code -->
\ No newline at end of file
diff --git a/lib/texte/wartung.txt b/lib/texte/wartung.txt
new file mode 100644
index 0000000000000000000000000000000000000000..dae4f3a2a2980325f74f51d8fb5818fee2e15136
--- /dev/null
+++ b/lib/texte/wartung.txt
@@ -0,0 +1 @@
+MFG
\ No newline at end of file
diff --git a/lib/weristonline.php b/lib/weristonline.php
new file mode 100644
index 0000000000000000000000000000000000000000..04cefc3df836f1b47fe86a8e584526c8da9b663c
--- /dev/null
+++ b/lib/weristonline.php
@@ -0,0 +1,21 @@
+<?
+$zeit = (5 * 60);                                   // Sekunden seit der letzten Aktivität
+$np   = $domain.'/?content=/nickpage&amp;nick=';         // Nickpagelink
+
+// verhindern, dass die Datei direkt aufgerufen wird
+if (!function_exists ("db_query")) die ("Kein Direktaufruf");
+
+$sql = db_query ('SELECT k.uid, u.nickname FROM '.$db_prefix.'_kontodaten k LEFT JOIN '.$db_prefix.'_userdaten u ON u.uid = k.uid WHERE k.last_active >= '.(time()-$zeit));
+                            
+if (mysql_num_rows ($sql) == 0) echo '<span style="font-style: italic;">keiner</span>';
+else {
+	$nr = 1;
+	while ($user = mysql_fetch_assoc ($sql)){
+		if ($user['uid'] == $admin_id) echo '<a style="font-weight: bold;" href="'.$np.$user['nickname'].'">'.$user['nickname'].'</a>';
+		else echo '<a href="'.$np.$user['nickname'].'">'.$user['nickname'].'</a>';
+            
+		if ($nr < mysql_num_rows ($sql)) echo ', ';
+            $nr++;
+	}
+}
+?>
\ No newline at end of file
diff --git a/module/testmodul/admin.php b/module/testmodul/admin.php
new file mode 100644
index 0000000000000000000000000000000000000000..d4b7ee76bcd73c89ab68cee6a192d54a4e422062
--- /dev/null
+++ b/module/testmodul/admin.php
@@ -0,0 +1,16 @@
+<? // Sicherheits-Check
+moduladmin_access (); ?>
+
+<? head ('Administration Testmodul'); ?>
+Dies hier ist eine Testseite vom 1. Modul des Modulsystems.<br />
+<br />
+Alle Autoreninformationen stehen in einer .inf-Datei (<i>pref.inf</i>) und werden auf einer speziellen Seite angezeigt.<br />
+Auf die Seite kommt man durch einen Klick auf den im Footer stehenden Link <i>"Addoninformationen"</i>.<br />
+<br />
+Der Aufruf vom Modul erfolgt wie folgt:<br />
+<?=$domain;?>/index.php?content=/module&mod=<?=$_GET['mod'];?><br />
+<br />
+<br />
+<br />
+MfG, SebbyPHM
+<? foot (); ?>
\ No newline at end of file
diff --git a/module/testmodul/files/mysql.sql b/module/testmodul/files/mysql.sql
new file mode 100644
index 0000000000000000000000000000000000000000..2070b65571e40c7cf77f3f68613038b16ea44772
--- /dev/null
+++ b/module/testmodul/files/mysql.sql
@@ -0,0 +1 @@
+// Test
\ No newline at end of file
diff --git a/module/testmodul/icon.png b/module/testmodul/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..cb9be2ef4d2fe5b661a459089da1f1e6c0a0a535
Binary files /dev/null and b/module/testmodul/icon.png differ
diff --git a/module/testmodul/module.php b/module/testmodul/module.php
new file mode 100644
index 0000000000000000000000000000000000000000..c5803d39003a7bf97d300242a851f895a0f6a7c9
--- /dev/null
+++ b/module/testmodul/module.php
@@ -0,0 +1,19 @@
+<? // Sicherheits-Check
+modul_access (); ?>
+
+<? head ('Testseite'); ?>
+Dies hier ist eine Testseite vom 1. Modul des Modulsystems.<br />
+<br />
+Alle Autoreninformationen stehen in einer .inf-Datei (<i>pref.inf</i>) und werden auf einer speziellen Seite angezeigt.<br />
+Auf die Seite kommt man durch einen Klick auf den im Footer stehenden Link <i>"Addoninformationen"</i>.<br />
+<br />
+Der Aufruf vom Modul erfolgt wie folgt:<br />
+http://www.DeineSeite.de/index.php?content=/module&mod=[Modulname]<br />
+<br />
+<b>Optionale Parameter:</b><br />
+open: Greift auf eine andere Datei als auf die module.php zu (./module/[Modulname]/[open].php);<i></i><br />
+<br />
+<br />
+<br />
+MfG, SebbyPHM
+<? foot (); ?>
\ No newline at end of file
diff --git a/module/testmodul/pref.ini b/module/testmodul/pref.ini
new file mode 100644
index 0000000000000000000000000000000000000000..84273570398b54b924277d9064644bcb19091cef
--- /dev/null
+++ b/module/testmodul/pref.ini
@@ -0,0 +1,20 @@
+[modul]
+name = Testmodul
+version = 1.0
+datum = 05.08.2007
+update =
+verkauft =
+
+[autor]
+name = Sebastian Hoinkes
+strasse = Am Thie 1
+ort = Hessisch Oldendorf
+plz = 31840
+
+[kontakt]
+webseite = http://www.totaltoll.de
+email = web@totaltoll.de
+icq = 270528839
+msn =
+telefon =
+telefax =
\ No newline at end of file
diff --git a/pcheck.php b/pcheck.php
new file mode 100644
index 0000000000000000000000000000000000000000..472916cde203a41be76c52537030d308073152c4
--- /dev/null
+++ b/pcheck.php
@@ -0,0 +1,71 @@
+<?
+@require_once ('lib/functions.lib.php');
+@db_connect();
+if (!isset($headmsg))		       $headmsg			= "";
+if (!isset($wait))		       $wait			= "";
+if (!isset($_GET['auszahlen']))	       $_GET['auszahlen']	= "false";
+
+$_GET['uid'] = (int)$_GET['uid'];
+$_GET['tan'] = addslashes ($_GET['tan']);
+
+$user_mail = db_query("SELECT e.start,e.aufendhalt,e.status,e.uid,v.verdienst FROM
+                          ".$db_prefix."_paidmails_empfaenger e
+                          LEFT JOIN ".$db_prefix."_paidmails_versendet v ON v.tan = e.tan
+                          WHERE e.tan='".$_GET['tan']."' AND e.uid=".$_GET['uid']." LIMIT 1");
+                          
+$mail = mysql_fetch_assoc($user_mail);  
+
+if ($_GET['auszahlen']!='true') {
+	if (mysql_num_rows($user_mail)) {
+		if ($mail['status'] != 0) {
+		if ($mail['status'] == 1) $headmsg = 'Mail schon bestädigt!';
+		if ($mail['status'] == 2) $headmsg = 'Fakeversuch!';
+		} else {
+		$headmsg = 'Bitte warte '.$mail['aufendhalt'].' Sek.!';
+		$wait = '<meta http-equiv="refresh" content="'.$mail['aufendhalt'].';url=pcheck.php?tan='.$_GET['tan'].'&auszahlen=true&uid='.$_GET['uid'].'">';
+		db_query("UPDATE ".$db_prefix."_paidmails_empfaenger SET start=".time()." WHERE tan='".$_GET['tan']."' and uid=".$_GET['uid']."");
+		}
+	} else {
+	$headmsg = 'Diese Mail ist nicht für Dich!';
+	}
+}else{
+     
+
+
+
+	if (($mail['start']+$mail['aufendhalt']-1) <= time() AND $mail['status'] == 0) {
+
+	kontobuchung ('+',$mail['verdienst'],$mail['uid']);
+	buchungsliste (create_code(14),$mail['verdienst'],'Paidmailverdienst',$mail['uid']);
+	refumsatz ($mail['verdienst'],$mail['uid']);
+	aktivralley ($mail['verdienst'],$mail['uid']);
+        bilanz(0,$forced['verdienst']);
+	
+	db_query("UPDATE ".$db_prefix."_paidmails_empfaenger SET status=1 WHERE tan='".$_GET['tan']."' and uid=".$_GET['uid']." LIMIT 1");
+	db_query("UPDATE ".$db_prefix."_paidmails_versendet SET bestaedigt=bestaedigt+1 WHERE tan='".$_GET['tan']."'  LIMIT 1");
+	$headmsg = $mail['verdienst'].' '.$waehrung.' gutgeschrieben!';
+	} else {
+	  $headmsg = 'Wartezeit umgangen! Paidmail ungültig!';
+	  db_query("UPDATE ".$db_prefix."_paidmails_empfaenger SET status=2 WHERE tan='".$_GET['tan']."' and uid=".$_GET['uid']." LIMIT 1");
+	}
+
+}
+
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<?if ($wait) echo $wait;?>
+<link rel="stylesheet" href="/css/bframe.css" type="text/css">
+</head>
+<body bgcolor="#c0c0c0" topmargin="0" leftmargin="0">
+<table width="100%" cellpadding="0" cellspacing="0" border="0" align="left">
+<tr>
+<td align="left" width="50%"><b><?=$seitenname;?> ist für den Inhalt nicht verantwortlich.</b></td>
+<td align="right" width="50%"><b><?=$headmsg;?></b>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+</tr>
+</table>
+</body>
+</html>
+<?db_close();?>
\ No newline at end of file
diff --git a/pclick.php b/pclick.php
new file mode 100644
index 0000000000000000000000000000000000000000..e888caee729f7274a6eacc06cb789afdaccd8a7b
--- /dev/null
+++ b/pclick.php
@@ -0,0 +1,24 @@
+<?
+@require_once ('lib/functions.lib.php');
+@db_connect();
+
+$_GET['uid'] = (int)$_GET['uid'];
+$_GET['tan'] = addslashes ($_GET['tan']);
+
+$mail = mysql_fetch_array(db_query("SELECT `ziel` FROM ".$db_prefix."_paidmails_versendet WHERE tan='".$_GET['tan']."' LIMIT 1"));
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+	<title>Forcedklick by <?=$seitenname;?></title>
+</head>
+
+<frameset rows="15,*" border="0">
+<frame name="abuse" src="pcheck.php?tan=<?=$_GET['tan'];?>&uid=<?=$_GET['uid'];?>" scrolling="no" frameborder="0">
+<frame name="werbung" src="<?=$mail['ziel'];?>" scrolling="auto" frameborder="0">
+</frameset>
+<body>
+</body>
+</html>
+<?db_close();?>
+
diff --git a/topframe_forced.php b/topframe_forced.php
new file mode 100644
index 0000000000000000000000000000000000000000..da080cf76b084c0d8f45b06c0a449058bfdcf6ed
--- /dev/null
+++ b/topframe_forced.php
@@ -0,0 +1,87 @@
+<?
+@require_once ('lib/functions.lib.php');
+@require_once ('lib/session.lib.php');
+
+// Variabeln definieren
+if (!isset($headmsg))			$headmsg			= "";
+if (!isset($puk))			$puk				= "";
+if (!isset($force_error))		$force_error			= "";
+if (!isset($wartezeit))			$wartezeit			= "";
+if (!isset($_GET['art']))		$_GET['art']			= "";
+if (!isset($_GET['puk']))		$_GET['puk']			= "";
+if (!isset($_GET['auszahlen']))		$_GET['auszahlen']		= "false";
+if (!isset($_SESSION['uid']))		$_SESSION['uid']		= "";
+if (!isset($forced['ziel']))		$forced['ziel']			= "";
+if (!isset($forced['aufendhalt']))	$forced['aufendhalt']	        = "";
+if (!isset($forced['tan']))		$forced['tan']			= "";
+$_GET['tan'] = addslashes ($_GET['tan']);
+
+// Nur weiter wenn eingeloggt
+if ($_SESSION['login'] != 'true' || $_SESSION['uid'] <= 0){
+die('Bitte einloggen!');
+}
+@db_connect();
+
+// Werbedaten auslesen!
+$kamp = db_query ("SELECT t1.* 
+          FROM ".$db_prefix."_gebuchte_werbung t1 
+          LEFT JOIN ".$db_prefix."_reloads t2 
+          ON (t1.tan=t2.tan AND (t2.uid=".$_SESSION['uid']." or t2.ip='".$ip."')) 
+          WHERE t1.tan = '".$_GET['tan']."' AND t2.tan IS NULL AND t1.werbeart = 'forcedbanner' AND t1.menge >=1 AND t1.status = 1 AND t1.sponsor != ".$_SESSION['uid']." LIMIT 1");
+                           
+
+// Reloadprüfen
+if (mysql_num_rows($kamp)) {
+        $forced = mysql_fetch_assoc($kamp);
+	$wartezeit = $forced['aufendhalt'];
+	$headmsg = 'Vergütung in '.$forced['aufendhalt'].' Sek.!';
+	$puk = md5($_SESSION['uid'].$forced['aufendhalt'].date("d.m.Y",time()).$percode);
+} else {
+	$headmsg = 'Banner noch im Reload!';
+	$force_error = 'true';
+}
+
+
+// User bezahlen und Reload schreiben
+if ($_GET['auszahlen'] == 'true' && $force_error != 'true' && $_GET['puk'] == md5($_SESSION['uid'].$forced['aufendhalt'].date("d.m.Y",time()).$percode)){
+
+   // Um einen mysql_query zu sparen wurde hier auf kontobuchung() verzichtet...  
+   db_query("UPDATE ".$db_prefix."_kontodaten  SET klicks = klicks + 1, kv = kv + ".$forced['verdienst'].", kontostand = kontostand + ".$forced['verdienst']." WHERE uid = ".$_SESSION['uid']."");
+
+   refumsatz ($forced['verdienst'],$_SESSION['uid']);
+   aktivralley ($forced['verdienst'],$_SESSION['uid']);
+   klickralley ();
+   bilanz($forced['preis'],$forced['verdienst']);
+
+   $new_reload = time()+$forced['reload'];
+   db_query("INSERT INTO ".$db_prefix."_reloads (ip,uid,tan,bis) VALUES ('".$ip."',".$_SESSION['uid'].",'".$forced['tan']."',".$new_reload.")");
+   db_query("UPDATE ".$db_prefix."_gebuchte_werbung SET menge = menge - 1 WHERE tan='".$_GET['tan']."'");
+   $headmsg = $forced['verdienst'].' '.$waehrung.' erhalten!';
+
+} else {
+  if ($_GET['auszahlen'] == 'true' && $force_error != 'true') $headmsg = 'Pin abgelaufen!';
+}
+@db_close();
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<link rel="stylesheet" href="/css/bframe.css" type="text/css">
+<?
+if ($wartezeit>=0 && $_GET['auszahlen'] != 'true') {
+echo '
+<meta http-equiv="refresh" content="'.$wartezeit.';url=topframe_forced.php?art='.$_GET['art'].'&auszahlen=true&tan='.$forced['tan'].'&puk='.$puk.'">
+';
+}
+?>
+</head>
+<body bgcolor="#c0c0c0" topmargin="0" leftmargin="0">
+<table width="100%" cellpadding="0" cellspacing="0" border="0" align="left">
+<tr>
+<td align="left" width="50%"><b><?=$seitenname;?> ist für den Inhalt nicht verantwortlich.</b></td>
+<td align="right" width="50%"><b><?=$headmsg;?></b>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/vms.sql b/vms.sql
new file mode 100644
index 0000000000000000000000000000000000000000..8d28691e6dcd9f8ac825f697b320b21c3121c47f
--- /dev/null
+++ b/vms.sql
@@ -0,0 +1,271 @@
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+
+
+CREATE TABLE IF NOT EXISTS `vms_aktivierungen` (
+  `uid` int(7) NOT NULL default '0',
+  `ak` varchar(32) NOT NULL default '',
+  KEY `aktivierungs_code` (`ak`)
+) ENGINE=MyISAM;
+
+
+
+CREATE TABLE IF NOT EXISTS `vms_aktivralley` (
+  `uid` int(7) NOT NULL default '0',
+  `punkte` double(100,2) NOT NULL default '0.00',
+  `ausgezahlt` int(11) NOT NULL default '0',
+  PRIMARY KEY  (`uid`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_bilanz` (
+  `date` int(10) NOT NULL,
+  `ein` double(15,2) NOT NULL,
+  `aus` double(15,2) NOT NULL,
+  PRIMARY KEY  (`date`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_buchungen` (
+  `uid` int(7) NOT NULL default '0',
+  `buchungszeit` int(10) NOT NULL default '0',
+  `buchungs_id` varchar(14) NOT NULL default '',
+  `buchungsmenge` double(10,2) NOT NULL default '0.00',
+  `verwendungszweck` varchar(40) NOT NULL default '',
+  KEY `user` (`uid`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_crons` (
+  `id` int(11) NOT NULL,
+  `cron` varchar(50) NOT NULL default '',
+  `laufzeit` int(11) NOT NULL default '0',
+  `datei` varchar(250) NOT NULL default '',
+  `bezeichnung` varchar(250) NOT NULL default '',
+  PRIMARY KEY  (`id`)
+) ENGINE=MyISAM;
+
+
+INSERT INTO `vms_crons` (`id`, `cron`, `laufzeit`, `datei`, `bezeichnung`) VALUES 
+(1, 'int_forcedbanner', 1184066684, 'crons/fuco-ads.int.php', 'Forcedbanner FuCo-Ads'),
+(2, 'int_forcedbanner', 1187204732, 'crons/webmasterlose.int.php', 'Forcedbanner Webmasterlose'),
+(3, 'int_forcedbanner', 1183938260, 'crons/hp-lose.int.php', 'Forcedbanner HP-Lose'),
+(4, 'int_forcedbanner', 1106400662, 'crons/lose-ads.int.php', 'Forcedbanner Lose-Ads'),
+(5, 'int_forcedbanner', 1106400676, 'crons/losebox.int.php', 'Forcedbanner Losebox'),
+(6, 'ext_cron', 1105221240, 'crons/refzahlungen.knt.php', 'Ext. Refzahlungen');
+
+
+CREATE TABLE IF NOT EXISTS `vms_emaildaten` (
+  `uid` int(7) NOT NULL default '0',
+  `emailadresse` varchar(100) NOT NULL default '',
+  `freigabe_fuer` tinyint(1) NOT NULL default '0',
+  PRIMARY KEY  (`uid`),
+  KEY `freigabe_fuer` (`freigabe_fuer`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_gebuchte_werbung` (
+  `uid` int(7) NOT NULL default '0',
+  `tan` varchar(32) NOT NULL default '',
+  `kid` int(11) NOT NULL default '0',
+  `ziel` varchar(250) NOT NULL default '',
+  `banner` varchar(250) NOT NULL default '',
+  `verdienst` double(10,2) NOT NULL default '0.00',
+  `preis` double(10,2) NOT NULL default '0.00',
+  `aufendhalt` int(11) NOT NULL default '0',
+  `menge` int(11) NOT NULL default '0',
+  `reload` int(11) NOT NULL default '0',
+  `sponsor` varchar(25) NOT NULL default '',
+  `werbeart` varchar(50) NOT NULL default '',
+  `status` tinyint(1) NOT NULL default '1',
+  KEY `klick4` (`werbeart`,`menge`,`status`,`verdienst`,`sponsor`),
+  KEY `crons` (`sponsor`,`werbeart`,`status`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_interface` (
+  `interface` varchar(50) NOT NULL default '',
+  `betreiber` int(7) NOT NULL default '0',
+  `seite` int(7) NOT NULL default '0',
+  `pass` varchar(50) NOT NULL default '',
+  `eigenverdienst` int(2) NOT NULL default '0',
+  `mindestverguetung` double(8,6) NOT NULL default '0.000000',
+  `restklicks` int(4) NOT NULL default '0',
+  `umrechnung` double(10,4) NOT NULL default '0.0000',
+  `aufendhalt` int(3) NOT NULL default '0',
+  `surfview` double(10,2) NOT NULL default '0.00',
+  `surfklick` double(10,2) NOT NULL default '0.00',
+  KEY `interface` (`interface`)
+) ENGINE=MyISAM;
+
+INSERT INTO `vms_interface` (`interface`, `betreiber`, `seite`, `pass`, `eigenverdienst`, `mindestverguetung`, `restklicks`, `umrechnung`, `aufendhalt`, `surfview`, `surfklick`) VALUES 
+('fuco-ads', 0, 0, '0', 0, 0.000000, 0, 0.0000, 0, 0.00, 0.00),
+('webmasterlose', 0, 0, '0', 0, 0.000000, 50, 0.0000, 0, 0.00, 0.00),
+('lose-ads', 0, 0, '0', 0, 0.000000, 0, 0.0000, 0, 0.00, 0.00),
+('losebox', 0, 0, '0', 0, 0.000000, 0, 0.0000, 0, 0.00, 0.00),
+('hp-lose', 0, 0, '0', 0, 0.000000, 0, 0.0000, 0, 0.00, 0.00);
+
+
+CREATE TABLE IF NOT EXISTS `vms_klickralley` (
+  `uid` int(7) NOT NULL default '0',
+  `klicks` int(11) NOT NULL default '0',
+  `ausgezahlt` int(11) NOT NULL default '0',
+  PRIMARY KEY  (`uid`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_kontodaten` (
+  `uid` int(7) NOT NULL default '0',
+  `passwort` varchar(32) NOT NULL default '',
+  `status` tinyint(1) NOT NULL default '0',
+  `hinweis` longtext NOT NULL,
+  `kontostand` double(100,2) NOT NULL default '0.00',
+  `login_ip` varchar(15) NOT NULL default '',
+  `loginzeit` int(11) NOT NULL default '0',
+  `last_active` int(11) NOT NULL default '0',
+  `klicks` bigint(20) NOT NULL default '0',
+  `kv` double(100,2) NOT NULL default '0.00',
+  `angebettelt` bigint(20) NOT NULL default '0',
+  `bv` double(100,2) NOT NULL default '0.00',
+  PRIMARY KEY  (`uid`)
+) ENGINE=MyISAM;
+
+CREATE TABLE IF NOT EXISTS `vms_news` (
+  `id` int(11) NOT NULL,
+  `zeit` int(11) NOT NULL default '0',
+  `titel` varchar(60) NOT NULL default '',
+  `news` longtext NOT NULL,
+  PRIMARY KEY  (`id`)
+) ENGINE=MyISAM;
+
+CREATE TABLE IF NOT EXISTS `vms_paidmails_empfaenger` (
+  `uid` int(7) NOT NULL default '0',
+  `gueltig` int(11) NOT NULL default '0',
+  `tan` varchar(14) NOT NULL default '',
+  `status` int(11) NOT NULL default '0',
+  `aufendhalt` int(11) NOT NULL default '0',
+  `start` int(11) NOT NULL default '0',
+  UNIQUE KEY `primary_ersatz` (`uid`,`tan`)
+) ENGINE=MyISAM;
+
+CREATE TABLE IF NOT EXISTS `vms_paidmails_versendet` (
+  `tan` varchar(14) NOT NULL default '',
+  `menge` int(11) NOT NULL default '0',
+  `bestaedigt` int(11) NOT NULL default '0',
+  `verdienst` double(10,2) NOT NULL default '0.00',
+  `ziel` varchar(250) NOT NULL default '',
+  `beschreibung` varchar(50) NOT NULL default '',
+  `mailtext` longtext NOT NULL,
+  `aufendhalt` int(11) NOT NULL default '0',
+  `gesendet` int(11) NOT NULL default '0',
+  `gueltig` int(11) NOT NULL default '0',
+  UNIQUE KEY `primary_ersatz` (`tan`)
+) ENGINE=MyISAM;
+
+CREATE TABLE IF NOT EXISTS `vms_ralleydaten` (
+  `ralley` varchar(50) NOT NULL default '',
+  `start` int(11) NOT NULL default '0',
+  `ende` int(11) NOT NULL default '0',
+  `art` varchar(50) NOT NULL default '',
+  `pro` double(10,2) NOT NULL default '0.00',
+  `jackpot` double(10,2) NOT NULL default '0.00',
+  `plaetze` int(2) NOT NULL default '0',
+  `p1` double(10,2) NOT NULL default '0.00',
+  `p2` double(10,2) NOT NULL default '0.00',
+  `p3` double(10,2) NOT NULL default '0.00',
+  `p4` double(10,2) NOT NULL default '0.00',
+  `p5` double(10,2) NOT NULL default '0.00',
+  `p6` double(10,2) NOT NULL default '0.00',
+  `p7` double(10,2) NOT NULL default '0.00',
+  `p8` double(10,2) NOT NULL default '0.00',
+  `p9` double(10,2) NOT NULL default '0.00',
+  `p10` double(10,2) NOT NULL default '0.00',
+  PRIMARY KEY  (`ralley`)
+) ENGINE=MyISAM;
+
+INSERT INTO `vms_ralleydaten` (`ralley`, `start`, `ende`, `art`, `pro`, `jackpot`, `plaetze`, `p1`, `p2`, `p3`, `p4`, `p5`, `p6`, `p7`, `p8`, `p9`, `p10`) VALUES 
+('refralley', 1135689000, 1293455400, 'statisch', 0.00, 0.00, 3, 150.00, 500.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00),
+('aktivralley', 1112047200, 1112292000, 'statisch', 6.00, 0.00, 5, 1000.00, 750.00, 500.00, 250.00, 100.00, 0.00, 0.00, 0.00, 0.00, 0.00),
+('klickralley', 1104534000, 1230764400, 'dynamisch', 3.00, 0.00, 2, 1000000.00, 500.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00);
+
+
+CREATE TABLE IF NOT EXISTS `vms_reloads` (
+  `ip` varchar(15) NOT NULL default '',
+  `uid` int(7) NOT NULL default '0',
+  `tan` varchar(32) NOT NULL default '',
+  `bis` int(10) NOT NULL default '0',
+  KEY `klick4` (`tan`,`uid`,`ip`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_schnittstelle` (
+  `betreiber_id` int(8) NOT NULL default '0',
+  `betreiber_passwort` varchar(50) NOT NULL default '',
+  `betreiber_kennung` int(8) NOT NULL default '0',
+  `schnittstelle` varchar(20) NOT NULL default '',
+  `einzahltext` varchar(40) NOT NULL default '',
+  `auszahltext` varchar(40) NOT NULL default '',
+  `einzahlsumme` int(11) NOT NULL default '0',
+  `auszahlsumme` int(11) NOT NULL default '0',
+  `anfragen_tag` int(11) NOT NULL default '0',
+  `anfragen_user` int(11) NOT NULL default '0',
+  PRIMARY KEY  (`schnittstelle`)
+) ENGINE=MyISAM;
+
+INSERT INTO `vms_schnittstelle` (`betreiber_id`, `betreiber_passwort`, `betreiber_kennung`, `schnittstelle`, `einzahltext`, `auszahltext`, `einzahlsumme`, `auszahlsumme`, `anfragen_tag`, `anfragen_user`) VALUES 
+(0, '0', 0, 'klamm', 'Einzahlung', 'Auszahlung', 0, 0, 0, 0);
+
+CREATE TABLE IF NOT EXISTS `vms_schnittstelle_anfragen` (
+  `zeit` int(11) NOT NULL default '0',
+  `uid` int(7) NOT NULL default '0',
+  KEY `uid` (`uid`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_seitenkonfig` (
+  `wartung` int(1) 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',
+  `re3` double(10,2) NOT NULL default '0.00',
+  `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',
+  `denied_domains` text NOT NULL,
+  `admin_name` VARCHAR( 255 ) NOT NULL,
+  `admin_pass` VARCHAR( 255 ) NOT NULL
+) ENGINE=MyISAM;
+
+INSERT INTO `vms_seitenkonfig` (`wartung`, `einzahlgrenze`, `re1`, `re2`, `re3`, `min_betteln`, `max_betteln`, `reload_betteln`, `denied_domains`) VALUES 
+(0, 100000, 8.00, 3.00, 1.00, 50.00, 250.00, 0, '@sofort-mail.de;@trash-mail.de;@mailinator.com;@spamgourmet.com;@spammotel.com;@centermail.com;@discardmail.com;@sneakemail.com;@netzidiot.de;@myTrashMail.com;@wegwerfadresse.de;@nervmich.net;@nervtmich.net;@mailinator.net;@klassmaster.com;@mailin8r.com;@sogetthis.com;@mailinator2.com');
+
+CREATE TABLE IF NOT EXISTS `vms_userblacklist` (
+  `uid` int(7) NOT NULL default '0',
+  `zeit` bigint(11) NOT NULL default '0',
+  PRIMARY KEY  (`uid`)
+) ENGINE=MyISAM;
+
+CREATE TABLE IF NOT EXISTS `vms_userdaten` (
+  `uid` int(7) NOT NULL default '0',
+  `nickname` varchar(255) NOT NULL default '',
+  `vorname` varchar(50) NOT NULL default '',
+  `nachname` varchar(50) NOT NULL default '',
+  `angemeldet_seit` int(10) NOT NULL default '0',
+  `max_forced` int(11) NOT NULL default '5',
+  `notizen` text NOT NULL,
+  PRIMARY KEY  (`uid`)
+) ENGINE=MyISAM;
+
+
+CREATE TABLE IF NOT EXISTS `vms_werberdaten` (
+  `uid` int(7) NOT NULL default '0',
+  `werber` int(7) NOT NULL default '0',
+  `umsatz` double(10,2) NOT NULL default '0.00',
+  `zuordnungszeit` int(10) NOT NULL default '0',
+  `reset` double(10,2) NOT NULL default '0.00',
+  `resetzeit` int(11) NOT NULL default '0',
+  `gesamt` double(10,2) NOT NULL default '0.00',
+  `refback` int(3) NOT NULL default '0',
+  `aktivzeit` int(11) NOT NULL default '0',
+  PRIMARY KEY  (`uid`)
+) ENGINE=MyISAM;
+
diff --git a/wartung.php b/wartung.php
new file mode 100644
index 0000000000000000000000000000000000000000..17f1184726e9607eb1b6284c55149b5e2d23ed03
--- /dev/null
+++ b/wartung.php
@@ -0,0 +1,42 @@
+<?
+@require_once ('lib/layout.lib.php');
+?>
+<html>
+<head>
+<title>..:: Wartungsmodus::..</title>
+<meta name="Author" content="">
+<meta name="Publisher" content="">
+<meta name="Copyright" content="">
+<meta name="Keywords" content="">
+<meta name="Description" content="">
+<meta name="Page-topic" content="">
+<meta name="Audience" content="">
+<meta name="Content-language" content="DE">
+<meta name="Page-type" content="Nicht Gewinnorientiert">
+<meta name="Robots" content="INDEX,FOLLOW">
+<link rel="stylesheet" href="/css/main.css" type="text/css">
+</head>
+<body topmargin="0" leftmargin="0">
+
+
+<?
+// Variabeln
+$filename = 'lib/texte/wartung.txt';
+
+// Datei auslesen
+$fp = fopen ($filename, "r");
+$inhalt = fread ($fp, filesize ($filename));
+fclose ($fp);
+$inhalt = str_replace('\\', '', $inhalt);
+?>
+<table width="500" align="center" height="100%">
+<tr>
+<td height="100%" align="center" valign="middle">
+<?
+head("Diese Seite ist im Wartungsmodus");
+echo nl2br($inhalt);
+foot();
+?>
+</td>
+</tr>
+</table>
\ No newline at end of file