Commit 470c25c8 authored by Eric Laufer's avatar Eric Laufer

Version 0.0.6

- Paid4 Bereich Update
- Administration Update
- Login
- Mneüanzeige (kein Adminbereich)
- Install update
- Chat bearbeitet
- und vieles kleines mehr
- Bug #10
parent 1da3236b
# Was alles passiert
##[0.0.7]
##geändert
- weitere classen dazu gekommen
- userliste überarbeitet
- kleine Bugs beseitigt
##[0.0.6]
##geändert
- classen kommen dazu
- neue mysql verbindung
- auflösung der functions.lib.php begonnen
## [0.0.6]
## hinzugefügt
##gelöscht
##geupdatet
- Paid4 Bereich Update
- Administration Update
- Login
- Mneüanzeige (kein Adminbereich)
- Install update
- Chat bearbeitet
- und vieles kleines mehr
- Bug #10
## [0.0.5]
## hinzugefügt
- AGB,Impressum,FAQ können aus dem Admin heraus berarbeitet werden
......@@ -47,4 +50,3 @@
### Upload
Die BETA Version von VMS-SUEE 2 wurde veröffentlicht.
Dies ist nicht die entgültige Version.
......@@ -8,9 +8,6 @@
if (strpos ($_GET['content'], '../') !== false) die ('Zugriffsverletzung !');
if ($_GET['content'] {0} != '/') $_GET['content'] = '/' . $_GET['content'];
}
if (!ini_get('display_errors')) {
ini_set('display_errors', '1');
}
if (!isset($_GET['content']) || empty ($_GET['content'])) $_GET['content'] = '/startseite';
......@@ -22,18 +19,17 @@ if (!ini_get('display_errors')) {
require_once('lib/var.php');
require_once('../lib/functions.lib.php');
session_start();
$grundconfig = $datenbank->get_row("SELECT * FROM ". PREFIX . CONFIG ." ",true);
require_once('lib/layout.lib.php');
require_once( '../lib/extras.lib.php' );
//require ('../lib/extra/mail.php');
require_once('lib/run.inc.php');
$shows = 0;
if (!isset($_GET['content'])) $_GET['content'] = '/startseite';
if (!file_exists('content'.$_GET['content'].'.php')) $_GET['content'] = '/error/keine_seite';
if (!isset($_GET['page'])) $_GET['page'] = '/startseite';
if (!file_exists('page'.$_GET['page'].'.php')) $_GET['page'] = '/error/keine_seite';
if(isset($_POST['check'])){
if($_POST['check'] == "Login") {
require_once ('../lib/functions.lib.php');
echo pw_erstellen($_POST['passwort']);
$page = $datenbank->get_row("SELECT admin_name, admin_pass FROM ". PREFIX . CONFIG ." LIMIT 1",true);
if(base64_encode($_POST['loginname']) == $page->admin_name AND pw_erstellen($_POST['passwort']) == $page->admin_pass) {
$_SESSION['admin'] = 1;
......@@ -62,7 +58,7 @@ if (!ini_get('display_errors')) {
<meta name="Description" content="Verdien was Du willst">
<meta name="Robots" content="INDEX,FOLLOW">
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="css/dachboard.css" rel="stylesheet">
<link href="../css/dachboard.css" rel="stylesheet">
<link href="../js/multibox.css" rel="stylesheet" type="text/css" />
<script src="//cdn.ckeditor.com/4.4.7/full/ckeditor.js"></script>
<script type="text/javascript" src="../js/mootools.js"></script>
......@@ -76,40 +72,28 @@ if (!ini_get('display_errors')) {
<body>
<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>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="true" aria-controls="navbar">
<span class="sr-only">Navigation ein-/ausblenden</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?php echo $domain.'/adminforce';?>">..:: Adminforce ::..</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<?php if(isset($_SESSION['admin']) && $_SESSION['admin'] == 1){?>
<ul class="nav navbar-nav navbar-right">
<li><a href="?content=/startseite">Startseite</a></li>
<li><a href="?content=/bilanzsystem">Bilanz</a></li>
<li><a href="?content=/usersystem/liste">Userliste</a></li>
<li><a href="?content=/logout/">Logout</a></li>
</ul>
<form class="navbar-form navbar-right">
<input type="text" class="form-control" placeholder="Suchen...">
</form>
<?php } ?>
</div>
</div>
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="<?php echo $domain.'/adminforce';?>">..:: Adminforce ::..</a>
<?php if(isset($_SESSION['admin']) && $_SESSION['admin'] == 1){?>
<a class="nav-link" href="?page=/startseite">Startseite</a>
<a class="nav-link" href="?page=/bilanzsystem">Bilanz</a>
<a class="nav-link" href="?page=/usersystem/liste">Userliste</a>
<?php } ?>
<input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap">
<a class="nav-link" href="?content=/logout/">Logout</a>
</li>
</ul>
</nav>
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<?php if($_SESSION['admin'] == 1) require_once('lib/menue_links.php');?>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<?php if($_SESSION['admin'] == 1) require_once('lib/menue_links.php');?>
</div>
</nav>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="jumbotron">
<?php
if(!empty($meldung)){
......@@ -151,7 +135,7 @@ if (!ini_get('display_errors')) {
if(file_exists('../install')){
echo '<div class="alert alert-danger text-center">Du musst den Ordner install noch l&ouml;schen</div>';
}
require_once('content'.$_GET['content'].'.php');
require_once('page'.$_GET['page'].'.php');
}else{
echo '
<form method="post">
......@@ -162,9 +146,8 @@ if (!ini_get('display_errors')) {
';
}?>
</div>
</div>
</main>
</div>
</div>
</body>
</html>
<? db_close (); ?>
<?php
class crons{
private $db;
private $config;
function __construct(){
global $datenbank,$grundconfig;
$this->db = $datenbank;
$this->config = $grundconfig;
}
public function liste(){
$aus = '<table class="table table-striped">
<tr>
<th>Cron</th>
<th>Laufzeit</th>
<th>URL</th>
</tr>';
$result = $this->db->get_results("SELECT * FROM ". PREFIX . CRONS ." ");
foreach($result AS $res){
$aus .= '
<tr>
<td><b>' . $res->bezeichnung . '</b><br>
<small><i>ID: ' . $res->id . '</i></small>
</td>
<td class="text-center">
<font color="#000080">' . date("d.m.Y - H:i:s", $res->laufzeit) . '</font>
</td>
<td class="text-center">
<a href="../cron.php?id=' . $res->id . '&amp;pw=' . $this->config->cron_pw . '" target="_blank"><img src="images/gruen.gif" width="15" height="15" border="0" alt="Ausführen"></a>
</td>
</tr>
';
}
$aus .= '</table>';
return $aus;
}
}
\ No newline at end of file
<?php
class GRUNDSETTING{
private $db;
private $post = array();
private $error = 0;
private $meldung = '';
function __construct(){
global $datenbank;
$this->db = $datenbank;
}
public function Save($post){
$this->make_array($post);
if($this->db->update(PREFIX . CONFIG , $this->post) == true){
$this->meldung = PAGECONFIG_SAVE_TRUE;
}else{
$this->error = 1;
$this->meldung = PAGECONFIG_SAVE_FALSE;
}
meldung($this->error,$this->meldung);
}
private function make_array($post){
foreach($post AS $key => $value){
if($key != '' && $key != 'updaten'){
if($key == 'wartung'){if($key == 'on'){$value = 1;}else{$value = 0;}}
if($key == 'anzeige_chat'){if($key == 'on'){ $value = 1;}else{ $value = 0;}}
if($key == 'anzeige_text'){if($key == 'on'){ $value = 1;}else{ $value = 0;}}
$this->post[$key] = $this->db->escape(htmlspecialchars($value));
}
}
}
}
\ No newline at end of file
......@@ -65,7 +65,7 @@ class USERLISTE{
<td>$dat->vorname</td>
<td>$dat->nachname</td>
<td>". date("d.m.Y H:i",$dat->angemeldet_seit) ."</td>
<td><a href='?content=/usersystem/details&uid=". $dat->uid ."' class='btn btn-default'>Details</a></td>
<td><a href='?page=/usersystem/details&uid=". $dat->uid ."' class='btn btn-default'>Details</a></td>
</tr>";
}
$aus .= '</table>';
......@@ -120,7 +120,7 @@ class USERLISTE{
public function userinfo(){
$daten = $this->db->get_row("
SELECT
u.*,k.*,b.*,e.*
u.*,k.*,b.*,e.*,w.*
FROM
". PREFIX . KONTO ." AS k
LEFT JOIN
......@@ -135,6 +135,10 @@ class USERLISTE{
". PREFIX . BUCH ." AS b
ON
b.uid = k.uid
LEFT JOIN
". PREFIX . WERBER ." AS w
ON
w.uid = k.uid
WHERE k.uid = '$this->uid'
",true);
return $daten;
......
<?php
class WERBUNG{
private $db;
private $post = array();
private $error = 0;
private $meldung = '';
private $menge = 0;
private $mail;
private $gconf;
function __construct(){
global $datenbank,$grundconfig;
require_once('../lib/extra/mail.php');
$this->mail = new send_smtp_mail;
$this->db = $datenbank;
$this->gconf = $grundconfig;
}
private function make_array($post){
foreach($post AS $key => $value){
if($key != '' && $value != 'Jetzt Buchen'){
if($key == 'PaidmailMenge'){
$this->menge = $this->db->escape($value);
}else{
$this->post[$key] = $this->db->escape($value);
}
}
}
}
private function pruefen(){
if(!is_numeric($this->post['menge'])){$this->error = 1; $this->meldung .= FB_MENGE_FALSE;}
if(!$this->post['banner'] or !$this->post['menge'] or !$this->post['ziel'] or !$this->post['reload']){ $this->error = 1; $this->meldung .= FB_FELDER_FALSE;}
if($this->post['reload'] < 1 or $this->post['reload'] > 24 or !is_numeric($this->post['reload'])){ $this->error = 1; $this->meldung .= FB_RELOAD_FALSE;}
if($this->post['aufendhalt'] < 0 or $this->post['aufendhalt'] > 30 or !is_numeric($this->post['aufendhalt'])){ $this->error = 1; $this->meldung .= FB_AUFENTHALT_FALSE;}
if($this->post['aufendhalt'] > 30 or $this->post['aufendhalt'] < 0 or !is_numeric($this->post['aufendhalt'])){$this->error = 1; $this->meldung .= FB_AUFENTHALT_NUMERIC;}
}
private function insert(){
if($this->error == 0){
$insert = $this->db->insert(PREFIX . WERBUNG, $this->post);
if($insert == true){
$this->meldung = FB_INSERT_TRUE;
}else{
$this->error = 1;
$this->meldung = FB_INSERT_FALSE;
}
}
}
private function MailEintragen(){
$this->db->insert(PREFIX . PAIDMAILSEND, $this->post);
$lastid = $this->db->lastid();
$this->db->update(PREFIX . PAIDMAILSEND, array("menge" => $this->menge),array("id" => $lastid));
}
private function MailSenden(){
$betreff = 'Neue ' . $this->gconf->seitenname . ' Paidmail';
$this->MailEintragen();
$query = "SELECT e.uid,e.emailadresse FROM
" . PREFIX . EMAIL . " e
LEFT JOIN " . PREFIX . KONTO . " k ON k.uid=e.uid
WHERE (e.freigabe_fuer = '3' or e.freigabe_fuer = '2') AND k.status=1 ORDER BY RAND() LIMIT " . $this->menge . "";
$results = $this->db->get_results($query);
foreach($results AS $res){
$ArrayUser = array(
"uid" => $res->uid,
"gueltig" => $this->post['gueltig'],
"tan" => $this->post['tan'],
"status" => 0,
"aufendhalt" => $this->post['aufendhalt']
);
$this->db->insert(PREFIX . PAIDMAILEMPF, $ArrayUser);
$message = 'Hallo,
dieses ist eine neue ' . $this->gconf->seitenname . ' Paidmail, für dessen Bestätigung
Du ' . $this->post['verdienst'] . ' ' . $this->gconf->waehrung . ' für ' . $this->post['aufendhalt'] . ' Sek. aufenthalt erhälst!
Diese Paidmail ist gültig bis ' . date("d.m.Y - H:i:s", $this->gconf->gueltig) . '
' . $this->post['beschreibung'] . '
' . $this->post['mailtext'] . '
--------------------------------------------------------------------
Die Betreiber von ' . $this->gconf->seitenname . ' distanzieren sich vom Inhalt dieser Mail!
Diese Mail ist kein Spam da der Empfänger als Mitglied von
' . $this->gconf->seitenname . ' dem Empfang zugestimmt hat.
Bestätigungslink:
' . $this->gconf->domain . '/pclick.php?tan=' . $this->post['tan'] . '&uid=' . $res->uid . '
Mit freundlichen Grüßen
Das ' . $this->gconf->seitenname . ' Team';
$this->mail->senden($res->emailadresse,$betreff,$message);
}
}
public function FBEintragen($post){
$this->make_array($post);
$this->pruefen();
$this->insert();
meldung($this->error,$this->meldung);
}
public function PaidMailSenden($post){
$this->make_array($post);
$this->post['gueltig'] = time() + (86400 * $this->post['gueltig']);
$this->MailSenden();
}
public function PaidMailHist(){
$aus = '';
$query = "SELECT * FROM " . PREFIX . PAIDMAILSEND . " ORDER BY gesendet DESC";
if($this->db->num_rows($query) > 0){
$result = $this->db->get_results($query);
foreach($result AS $res){
$aus .= '
<div class="card">
<div class="card-header">
Paidmail: ' . $res->beschreibung .'
</div>
<div class="card-body">
<div class="row">
<div class="col">
<b>Tan:</b> ' . $res->tan . '<br>
<b>Menge:</b> ' . $res->menge . '<br>
<b>Bestätigt:</b> ' . $res->bestaedigt . ' (' . @round($res->bestaedigt / $res->menge * 100, 2) . ' %)
</div>
<div class="col">
<b>Userverdienst:</b> ' . $res->verdienst . '<br>
<b>Gültig bis:</b> ' . date("d.m.Y - H:i", $res->gueltig) . '<br>
<b>Gesendet am:</b> ' . date("d.m.Y - H:i", $res->gesendet) . '
</div>
<div class="col">
<b>Aufenthalt:</b> ' . $res->aufendhalt . ' Sek.<br>
<textarea class="form-control">' . $res->mailtext . '</textarea>
</div>
</div>';
if ($res->gueltig <= time() or $res->menge == $res->bestaedigt) {
$aus .= '<br><br><a href="?content=/werbesystem/paidmail_hist&amp;tan=' . $res->tan . '&amp;loeschen=true"><b>Löschen!</b></a>';
}
$aus .= '</div></div>';
}
}else{
$aus = 'Momentan sind keine Paidmails verf&uuml;gbar.';
}
return $aus;
}
public function BannerHist(){
$aus = '';
$query = "SELECT * FROM " . PREFIX . WERBUNG . " WHERE sponsor='administrator' and werbeart = 'forcedbanner' and status = '1' ORDER BY kid ASC";
if($this->db->num_rows($query) > 0){
$result = $this->db->get_results($query);
foreach($result AS $res){
$aus .= '
<div class="card" style="width: 468px;">
<img class="card-img-top" src="'. $res->banner .'" alt="Card image cap">
<div class="card-body">
<span class="card-title">Tan: '. $res->tan .'</span>
<br>
<p class="card-text">
<table class="table table-striped">
<tr>
<td>Verg&uuml;tung</td>
<td>' . number_format($res->verdienst, 2, ",", ".") . '</td>
</tr>
<tr>
<td>Ziel</td>
<td><a href="https://' . $res->ziel . '" target="_new">' . $res->ziel . '</a></td>
</tr>
<tr>
<td>Banner</td>
<td><a href="' . $res->banner . '" target="_new">' . $res->banner . '</a></td>
</tr>
<tr>
<td>Reload</td>
<td>' . number_format($res->reload / 3600,5,',','.') . 'h </td>
</tr>
<tr>
<td>Rest</td>
<td>' . number_format($res->menge, 0, ",", ".") . ' Klicks</td>
</tr>
<tr>
<td>
<form method="post" action="">
<input type="hidden" name="id" value="'. $res->tan .'">
<input type="submit" name="FBDelete" value="L&ouml;schen" class="btn btn-danger btn-block">
</form>
</td>
</tr>
</table>
</p>
</div>
</div>
';
}
}else{
$aus = '<div class="alert alert-info">Momentan sind keine Adminbanner vorhanden.</div>';
}
return $aus;
}
public function FBDelete($post){
$tan = $this->db->escape($post['id']);
$delete = $this->db->delete(PREFIX . WERBUNG, array("tan" => $tan), 1);
if($delete == true){
meldung(0,DELETE_BANNER_TRUE);
}else{
meldung(1,DELETE_BANNER_FALSE);
}
}
}
<?php
$meldung['error'] = 0;
if($_POST['wartung'] == 'on'){$wartung = 1;}else{$wartung = 0;}
if($_POST['anzeige_chat'] == 'on'){ $anzeige_chat = 1;}else{ $anzeige_chat = 0;}
if($_POST['anzeige_text'] == 'on'){ $anzeige_text = 1;}else{ $anzeige_text = 0;}
if($meldung['error'] == 0){
$_POST['re1'] = str_replace(",",".",$_POST['re1']);
$_POST['re2'] = str_replace(",",".",$_POST['re2']);
$_POST['re3'] = str_replace(",",".",$_POST['re3']);
$_POST['verdienst_start'] = str_replace(",",".",$_POST['verdienst_start']);
$_POST['min_betteln'] = str_replace(",",".",$_POST['min_betteln']);
$_POST['max_betteln'] = str_replace(",",".",$_POST['max_betteln']);
$update = db_query("UPDATE ".$db_prefix."_seitenkonfig SET
denied_domains='".$_POST['denied_domains']."',
wartung='".$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']."',
anzeige_chat = '". $anzeige_chat ."',
anzeige_text = '". $anzeige_text ."',
geb_addon = '".$_POST['geb_addon']."',
news_komment = '". $_POST['news_komment'] ."',
domain = '". $_POST['domain'] ."',
seitenname = '". $_POST['seitenname'] ."',
waehrung = '". $_POST['waehrung'] ."',
betreibermail = '". $_POST['betreibermail'] ."',
cron_pw = '". $_POST['cron_pw'] ."',
buchungen_loeschen = '". $_POST['buchungen_loeschen'] ."',
buchungen_loeschen_tage = '". $_POST['buchungen_loeschen_tage'] ."',
auszahlung_sperre = '". $_POST['auszahlung_sperre'] ."',
verdienst_start = '". $_POST['verdienst_start'] ."',
ip_erlaubt = '". $_POST['ip_erlaubt'] ."'
");
if($update == true){
$meldung = meldung(0,'Daten erfolgreich gespeichert.');
}else{
$meldung = meldung(1,'Fehler beim Speichern der Daten.<br>'.mysqli_error($sql_open));
}
}
require_once('lib/class/grundeinstellung.class.php');
$grund = new GRUNDSETTING;
$grund->Save($_POST);
?>
\ No newline at end of file
<?php
require_once('lib/class/werbung.class.php');
$Werbung = new WERBUNG;
$Werbung->FBDelete($_POST);
<?php
require_once('lib/class/werbung.class.php');
$Werbung = new WERBUNG;
$Werbung->FBEintragen($_POST);
<?php
require_once('lib/class/werbung.class.php');
$Werbung = new WERBUNG;
$Werbung->PaidMailSenden($_POST);