Version 2
This commit is contained in:
77
temporary/pagecontent/account.php
Normal file
77
temporary/pagecontent/account.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%' AND `type` = 'voc'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
$statVOC = mysql_num_rows($result_articles);
|
||||
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%' AND `type` = 'list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
$statLIST = mysql_num_rows($result_articles);
|
||||
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%' AND `type` = 'lang'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
$statLANG = mysql_num_rows($result_articles);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<h2>Mein Konto</h2>
|
||||
<button onclick="getContent('action:logout')">Abmelden <i class="fas fa-sign-out-alt"></i></button>
|
||||
</div>
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="folder-divider">
|
||||
<span>Statistiken</span>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<div class="left">
|
||||
<p>Anzahl Vokabeln</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<?php echo $statVOC; ?>/1000
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<div class="left">
|
||||
<p>Anzahl Listen</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<?php echo $statLIST; ?>/500
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<div class="left">
|
||||
<p>Anzahl Sprachen</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<?php echo $statLANG; ?>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<h6>Haben Sie die maximale Anzahl Vokabeln erreicht, werden Sie keine Vokabeln mehr hinzufügen können. Gleiches gilt für Listen.<br>Sollte sich Ihr Konto als echt erweisen, kann nach einer Kontaktaufnahme via tim@timvandenboom.de mehr Speicher zugewiesen werden.</h6>
|
||||
<div class="folder-divider">
|
||||
<span>Datenschutz</span>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button onclick="getContent('takeout','','fade')" class="default-button">Takeout anfordern</button>
|
||||
</div>
|
||||
<p>Ein Takeout (Datenauskunft) beinhaltet alle gespeicherten Daten, die mit diesem Konto in Verbindung gebracht werden (gemäß DSGVO). Die Auskunft erfolgt sofort.</p>
|
||||
<br>
|
||||
<h6>Nicht enthalten sind Passwörter und automatisch generierte IDs, welche jedoch keinen Bezug auf Ihre Person haben.</h6>
|
||||
<div class="folder-divider">
|
||||
<span>Kontosicherheit</span>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button onclick="getContent('verify-identity','change-email','scrollRight')" class="default-button">E-Mail ändern</button>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button onclick="getContent('verify-identity','change-password','scrollRight')" class="default-button">Passwort ändern</button>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button onclick="getContent('verify-identity','delete-account','scrollRight')" class="default-button">Konto löschen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
25
temporary/pagecontent/action-appearanceChange.php
Normal file
25
temporary/pagecontent/action-appearanceChange.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
if($meta != '1' && $meta != '2' && $meta != '3') {
|
||||
die();
|
||||
}
|
||||
|
||||
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$settings = json_decode($articleDb->settings, true);
|
||||
}
|
||||
|
||||
$settings[0]['appearance'] = $meta;
|
||||
|
||||
$settings_new = json_encode($settings);
|
||||
|
||||
setcookie('vocspace-appearance', $meta, time() + (86400 * 30 * 365), "/");
|
||||
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `settings` = '$settings_new' WHERE `userid` = '$userid'");
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
101
temporary/pagecontent/action-change-email-verify.php
Normal file
101
temporary/pagecontent/action-change-email-verify.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
// Code der neuen E-Mail wird geholt
|
||||
$code = htmlentities(substr($_POST["code"], 0, 30));
|
||||
|
||||
// Und als Nuutzereingabe-Session gespeichert
|
||||
$_SESSION["email-change-code-user"] = $code;
|
||||
|
||||
// Neue E-Mail wird aus der Session gelesen
|
||||
$email = $_SESSION["email-change-email"];
|
||||
|
||||
// Nutzercode wird mit dem tatsächlichen Code abgeglichen
|
||||
if($code != $_SESSION["email-change-code"]) {
|
||||
$_SESSION["email-change-codeFails"] = $_SESSION["email-change-codeFails"] + 1;
|
||||
|
||||
if($_SESSION["email-change-codeFails"] >= 3) {
|
||||
echo "codeFailsLimit";
|
||||
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
$_SESSION["email-change-code"] = $code;
|
||||
|
||||
$_SESSION["email-change-codeFails"] = 0;
|
||||
|
||||
$betreff = "Willkommen bei VokSpace!";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätige dein Konto</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Dein neuer Code: ' . $code . '</h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
$email = $_SESSION["Email"];
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
echo "wrongCode";
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
// Erneut testen, ob E-Mai bereits vorhanden
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `email` = '$email'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Ganz zu anfang eingegbenes Passwort erneut auswerten
|
||||
$verify_password_user = $_SESSION["verify-password-user"];
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `userid` = '$userid' AND `password` = '$verify_password_user'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Im letzen Schritt werden alle Nutzer-Sessions noch einmal mit den tatsächlichen Sessions abgeglichen um das Überpringen von Schritten zu verhindern.
|
||||
if(empty($email) || ($_SESSION["verify-code"] != $_SESSION["verify-code-user"]) || ($_SESSION["email-change-code"] != $_SESSION["email-change-code-user"])) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Neue E-Mail wird gepeichert
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `email` = '$email' WHERE `userid` = '$userid'");
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
74
temporary/pagecontent/action-change-email.php
Normal file
74
temporary/pagecontent/action-change-email.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
// Neue E-Mail wird geholts
|
||||
$email = substr($_POST["email"], 0, 256);
|
||||
|
||||
// Testen, ob ausgefüllt
|
||||
if(empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL) ) {
|
||||
print("incompleteUserdata");
|
||||
die();
|
||||
}
|
||||
|
||||
// Schauen, ob E-Mail schon bekannt ist
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `email` = '$email'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
print("emailRegistered");
|
||||
die();
|
||||
}
|
||||
|
||||
// Neue E-Mail als Session hinterlegen
|
||||
$_SESSION["email-change-email"] = $email;
|
||||
|
||||
// Neuen Code generieren
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
// Neuer Code wird als Session gesetzt
|
||||
$_SESSION["email-change-code"] = $code;
|
||||
// Anzahl d. Fehlversuche wird zurückgesetzt
|
||||
$_SESSION["email-change-codeFails"] = 0;
|
||||
|
||||
$betreff = "Neue E-Mail bestätigen";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätige deine neue E-Mail-Adresse</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Ihr Code: ' . $code . '</h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
41
temporary/pagecontent/action-change-password.php
Normal file
41
temporary/pagecontent/action-change-password.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
// Passwörter werden geholt
|
||||
$password = htmlentities(substr($_POST["password"], 0, 256));
|
||||
$password_repeat = htmlentities(substr($_POST["password_repeat"], 0, 256));
|
||||
|
||||
if(empty($password) || empty($password_repeat) ) {
|
||||
print("false");
|
||||
die();
|
||||
}
|
||||
|
||||
if($password != $password_repeat) {
|
||||
print("noAgreement");
|
||||
die();
|
||||
}
|
||||
|
||||
$password = hash('sha512',$password);
|
||||
|
||||
|
||||
// Ganz zu anfang eingegbenes Passwort erneut auswerten
|
||||
$verify_password_user = $_SESSION["verify-password-user"];
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `userid` = '$userid' AND `password` = '$verify_password_user'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Im letzen Schritt werden alle Nutzer-Sessions noch einmal mit den tatsächlichen Sessions abgeglichen um das Überpringen von Schritten zu verhindern.
|
||||
if(empty($password) || ($_SESSION["verify-code"] != $_SESSION["verify-code-user"])) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Neue E-Mail wird gepeichert
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `password` = '$password' WHERE `userid` = '$userid'");
|
||||
|
||||
$_SESSION["Passwort"] = $Passwort;
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
18
temporary/pagecontent/action-checkForTooltip.php
Normal file
18
temporary/pagecontent/action-checkForTooltip.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$settings = json_decode($articleDb->settings, true);
|
||||
}
|
||||
|
||||
if (strpos($settings[1]['closed-tooltips'], $meta)) {
|
||||
die();
|
||||
}
|
||||
|
||||
else {
|
||||
print("true");
|
||||
}
|
||||
|
||||
?>
|
||||
31
temporary/pagecontent/action-closeTooltip.php
Normal file
31
temporary/pagecontent/action-closeTooltip.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
if(empty($meta) || ( $meta != 'voc:add' && $meta != 'voc:select'&& $meta != 'index'&& $meta != 'lang') ) {
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$settings = json_decode($articleDb->settings, true);
|
||||
}
|
||||
|
||||
if (strpos($settings[1]['closed-tooltips'], $meta)) {
|
||||
die();
|
||||
}
|
||||
|
||||
$settings[1]['closed-tooltips'] = $settings[1]['closed-tooltips'] . "," . $meta;
|
||||
|
||||
$settings_new = json_encode($settings);
|
||||
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `settings` = '$settings_new' WHERE `userid` = '$userid'");
|
||||
|
||||
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
23
temporary/pagecontent/action-delete-account.php
Normal file
23
temporary/pagecontent/action-delete-account.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// Ganz zu anfang eingegbenes Passwort erneut auswerten
|
||||
$verify_password_user = $_SESSION["verify-password-user"];
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `userid` = '$userid' AND `password` = '$verify_password_user'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Im letzen Schritt werden alle Nutzer-Sessions noch einmal mit den tatsächlichen Sessions abgeglichen um das Überpringen von Schritten zu verhindern.
|
||||
if(($_SESSION["verify-code"] != $_SESSION["verify-code-user"])) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Konto löschen
|
||||
mysql_query("DELETE FROM `VokabelBox2Users` WHERE `userid` = '$userid'");
|
||||
mysql_query("DELETE FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%'");
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// Passwörter werden geholt
|
||||
$password = htmlentities(substr($_POST["password"], 0, 256));
|
||||
$password_repeat = htmlentities(substr($_POST["password_repeat"], 0, 256));
|
||||
|
||||
if(empty($password) || empty($password_repeat) ) {
|
||||
print("false");
|
||||
die();
|
||||
}
|
||||
|
||||
if($password != $password_repeat) {
|
||||
print("noAgreement");
|
||||
die();
|
||||
}
|
||||
|
||||
$password = hash('sha512',$password);
|
||||
|
||||
|
||||
// Ganz zu anfang eingegbene E-Mail erneut auswerten
|
||||
$change_password_email_user = $_SESSION["forgot-password-email"];
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `email` = '$change_password_email_user'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Im letzen Schritt werden alle Nutzer-Sessions noch einmal mit den tatsächlichen Sessions abgeglichen um das Überpringen von Schritten zu verhindern.
|
||||
if(empty($password) || ($_SESSION["forgot-password-code"] != $_SESSION["forgot-password-code-user"])) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Neue E-Mail wird gepeichert
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `password` = '$password',`loginfails` = '0' WHERE `email` = '$change_password_email_user'");
|
||||
|
||||
$_SESSION["Passwort"] = $Passwort;
|
||||
$_SESSION["Benutzername"] = $change_password_email_user;
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
// Code der E-Mail wird geholt
|
||||
$code = htmlentities(substr($_POST["code"], 0, 30));
|
||||
|
||||
// Und als Nuutzereingabe-Session gespeichert
|
||||
$_SESSION["forgot-password-code-user"] = $code;
|
||||
|
||||
// E-Mail wird aus der Session gelesen
|
||||
$email = $_SESSION["forgot-password-email"];
|
||||
|
||||
// Nutzercode wird mit dem tatsächlichen Code abgeglichen
|
||||
if($code != $_SESSION["forgot-password-code"]) {
|
||||
$_SESSION["forgot-password-codeFails"] = $_SESSION["forgot-password-codeFails"] + 1;
|
||||
|
||||
if($_SESSION["forgot-pasword-codeFails"] >= 3) {
|
||||
echo "codeFailsLimit";
|
||||
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
$_SESSION["forgot-password-code"] = $code;
|
||||
|
||||
$_SESSION["forgot-password-codeFails"] = 0;
|
||||
|
||||
$betreff = "Willkommen bei VokSpace!";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätige dein Konto</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Dein neuer Code: ' . $code . '</h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
$email = $_SESSION["Email"];
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
echo "wrongCode";
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
// Erneut testen, ob E-Mai vorhanden
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `email` = '$email'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
74
temporary/pagecontent/action-forgot-password-email.php
Normal file
74
temporary/pagecontent/action-forgot-password-email.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
// Neue E-Mail wird geholts
|
||||
$email = substr($_POST["email"], 0, 256);
|
||||
|
||||
// Testen, ob ausgefüllt
|
||||
if(empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL) ) {
|
||||
print("incompleteUserdata");
|
||||
die();
|
||||
}
|
||||
|
||||
// Schauen, ob E-Mail registriert ist
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `email` = '$email'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
print("emailUnknown");
|
||||
die();
|
||||
}
|
||||
|
||||
// Eingegebene E-Mail als Session hinterlegen
|
||||
$_SESSION["forgot-password-email"] = $email;
|
||||
|
||||
// Neuen Code generieren
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
// Neuer Code wird als Session gesetzt
|
||||
$_SESSION["forgot-password-code"] = $code;
|
||||
// Anzahl d. Fehlversuche wird zurückgesetzt
|
||||
$_SESSION["forgot-password-codeFails"] = 0;
|
||||
|
||||
$betreff = "Passwort zurücksetzen";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätige deine neue E-Mail-Adresse</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Ihr Code: ' . $code . '</h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
7
temporary/pagecontent/action-getSelectedItems.php
Normal file
7
temporary/pagecontent/action-getSelectedItems.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$_SESSION["selected-items"] = $meta;
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
30
temporary/pagecontent/action-intro-p1.php
Normal file
30
temporary/pagecontent/action-intro-p1.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
$nickname = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["meta"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
|
||||
if(empty($nickname)) {
|
||||
print("nicknameEmpty");
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$settings = json_decode($articleDb->settings, true);
|
||||
}
|
||||
|
||||
$settings[0]['nickname'] = $nickname;
|
||||
|
||||
$settings_new = json_encode($settings);
|
||||
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `settings` = '$settings_new' WHERE `userid` = '$userid'");
|
||||
|
||||
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
59
temporary/pagecontent/action-langAdd.php
Normal file
59
temporary/pagecontent/action-langAdd.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
// Sprache holen
|
||||
$language = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["language"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
|
||||
// Testen, ob Sprach-ID bei dem Benutzer schon vorhanden ist (Sprach_IDs fürfen natürlich mehrmals vorkommen, aber nur ein Mal pro Nutzer)
|
||||
$sql = "SELECT * FROM `VokabelBox2Content` WHERE `type` = 'lang' AND `id` = '$language' AND `path` = '$userid/'";
|
||||
|
||||
// Wenn ja, abbrechen + testen, ob ID valide ist
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles) || ($language != 'deu' &&
|
||||
$language != 'eng' &&
|
||||
$language != 'spa' &&
|
||||
$language != 'nie' &&
|
||||
$language != 'fra' &&
|
||||
$language != 'tue' &&
|
||||
$language != 'rus' &&
|
||||
$language != 'chi' &&
|
||||
$language != 'pol'))
|
||||
{
|
||||
//Ansonsten: Abbrechen
|
||||
die();
|
||||
}
|
||||
|
||||
// Dreistellige ID wird durch einen Namen ersetzt. Dieser wird dem Nutzer später angezeigt. Er enthält auch Umlaute.
|
||||
if($language == 'deu') {
|
||||
$value = "Deutsch";
|
||||
}
|
||||
if($language == 'eng') {
|
||||
$value = "Englisch";
|
||||
}
|
||||
if($language == 'spa') {
|
||||
$value = "Spanisch";
|
||||
}
|
||||
if($language == 'nie') {
|
||||
$value = "Niederländisch";
|
||||
}
|
||||
if($language == 'fra') {
|
||||
$value = "Französisch";
|
||||
}
|
||||
if($language == 'tue') {
|
||||
$value = "Türkisch";
|
||||
}
|
||||
if($language == 'rus') {
|
||||
$value = "Russisch";
|
||||
}
|
||||
if($language == 'chi') {
|
||||
$value = "Chinesisch";
|
||||
}
|
||||
if($language == 'pol') {
|
||||
$value = "Polnisch";
|
||||
}
|
||||
|
||||
// Neue Sprache wird hinzugefügt
|
||||
mysql_query("INSERT INTO `VokabelBox2Content`(`id`, `path`, `value`, `type`) VALUES ('$language','$userid/','$value','lang')");
|
||||
|
||||
echo "true";
|
||||
|
||||
?>
|
||||
123
temporary/pagecontent/action-learn-preset.php
Normal file
123
temporary/pagecontent/action-learn-preset.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
|
||||
$number_pending = 0;
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$id = $articleDb->id;
|
||||
|
||||
if($voc[0]['activeLearn'] == 'true') {
|
||||
$number_pending++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$n = '"activeLearn":"true"';
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `value` LIKE '%$n%' ORDER BY RAND() LIMIT 1";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$_SESSION["active-voc"] = $articleDb->id;
|
||||
|
||||
$question = $voc[0]['1'];
|
||||
$answer = $voc[0]['2'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($_SESSION["difficulty"] == '1') {
|
||||
|
||||
?>
|
||||
<div class="fixed-title">
|
||||
<div class="left">
|
||||
<h2 id="learn-progress">1/<?php echo $number_pending; ?></h2>
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<div style="width: 0%"></div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<h2 id="learn-correct-incorrect"><span>0</span> <span>0</span></h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<img class="learn-feedback-ghost" src="" />
|
||||
<h2 id="learn-voc-question"><?php echo $question; ?></h2>
|
||||
<h5 id="learn-voc-correct" style="display: none;"><?php echo $answer; ?></h5>
|
||||
<br>
|
||||
<div class="form" id="learn-form">
|
||||
<button onclick="showHint()" class="default-button">Lösung zeigen</button>
|
||||
</div>
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="learn-card-choicebox" style="display: none;">
|
||||
<div onclick="getContent('action:learn','false')">
|
||||
<img src="files/red-x.svg" />
|
||||
<h2>Falsch</h2>
|
||||
</div>
|
||||
<div onclick="getContent('action:learn','true')">
|
||||
<img src="files/green-checkmark.svg" />
|
||||
<h2>Richtig</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<div class="left">
|
||||
<h2 id="learn-progress">1/<?php echo $number_pending; ?></h2>
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<div style="width: 0%"></div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<h2 id="learn-correct-incorrect"><span>0</span> <span>0</span></h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<img class="learn-feedback-ghost" src="" />
|
||||
<h2 id="learn-voc-question"><?php echo $question; ?></h2>
|
||||
<h5 id="learn-voc-correct"></h5>
|
||||
<form id="learn-form" class="form" autocomplete="off" onsubmit="return getContent('action:learn','','');">
|
||||
<div class="input-wrapper">
|
||||
<input required autocomplete="off" type="text" id="learn-suggestion" oninput="checkIfFilled('learn-suggestion')" />
|
||||
<span>Übersetzung</span>
|
||||
</div>
|
||||
<p align="center">Bestätigen Sie mit "Enter"</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
384
temporary/pagecontent/action-learn.php
Normal file
384
temporary/pagecontent/action-learn.php
Normal file
@@ -0,0 +1,384 @@
|
||||
<?php
|
||||
|
||||
if($meta == 'start') {
|
||||
|
||||
$difficulty = $_POST["difficulty"];
|
||||
|
||||
if($difficulty != '1' && $difficulty != '2' && $difficulty != '3') {
|
||||
die();
|
||||
}
|
||||
$_SESSION["difficulty"] = $difficulty;
|
||||
|
||||
|
||||
$selection = $_POST["selection"];
|
||||
|
||||
|
||||
$path = $userid . "/lang/" . $list . "/";
|
||||
|
||||
$selection_new = explode(",",$selection);
|
||||
|
||||
$query_contains = 0; // Variable überprüft ob Auswahl Vokabeln enthält.
|
||||
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$id = $articleDb->id;
|
||||
|
||||
if($selection_new[0] == 'true' && $voc[0]['progress'] == '5') {
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'pending';
|
||||
$query_contains = 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['activeLearn'] = '0';
|
||||
$value_new[0]['learnStatus'] = '0';
|
||||
|
||||
if($selection_new[1] == 'true' && ($voc[0]['progress'] == '4' || $voc[0]['progress'] == '3')) {
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'pending';
|
||||
$query_contains = 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['activeLearn'] = '0';
|
||||
$value_new[0]['learnStatus'] = '0';
|
||||
|
||||
if($selection_new[2] == 'true' && ($voc[0]['progress'] == '2' || $voc[0]['progress'] == '1' || $voc[0]['progress'] == '0')) {
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'pending';
|
||||
$query_contains = 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['activeLearn'] = '0';
|
||||
$value_new[0]['learnStatus'] = '0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$value_new[0]['1'] = $voc[0]['1'];
|
||||
$value_new[0]['2'] = $voc[0]['2'];
|
||||
$value_new[0]['progress'] = $voc[0]['progress'];
|
||||
|
||||
|
||||
|
||||
$value_new_new = json_encode($value_new);
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content`SET `value` = '$value_new_new' WHERE `path` = '$userid/lang/$list/' AND `id` = '$id'");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
if($query_contains != 1) {
|
||||
print("noSelection");
|
||||
die();
|
||||
}
|
||||
|
||||
print("true");
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
|
||||
if($_SESSION["difficulty"] == '1') {
|
||||
|
||||
$active_voc = $_SESSION["active-voc"];
|
||||
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `id` = '$active_voc'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
|
||||
if($meta == 'true') {
|
||||
|
||||
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'true';
|
||||
|
||||
$value_new[0]['1'] = $voc[0]['1'];
|
||||
$value_new[0]['2'] = $voc[0]['2'];
|
||||
|
||||
if($voc[0]['progress'] <= 4) {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'] + 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'];
|
||||
}
|
||||
|
||||
print("true,");
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'false';
|
||||
|
||||
$value_new[0]['1'] = $voc[0]['1'];
|
||||
$value_new[0]['2'] = $voc[0]['2'];
|
||||
|
||||
if($voc[0]['progress'] >= 1) {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'] - 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'];
|
||||
}
|
||||
|
||||
print("false,");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$value_new_new = json_encode($value_new);
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content` SET `value` = '$value_new_new' WHERE `path` = '$userid/lang/$list/' AND `id` = '$active_voc'");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$false = 0;
|
||||
$true = 0;
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$id = $articleDb->id;
|
||||
|
||||
if($voc[0]['activeLearn'] == 'true') {
|
||||
$number_main++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'true' || $voc[0]['learnStatus'] == 'false') {
|
||||
$number_completed++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'true') {
|
||||
$true++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'false') {
|
||||
$false++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$n = '"learnStatus":"pending"';
|
||||
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `value` LIKE '%$n%' ORDER BY RAND() LIMIT 1";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$_SESSION["active-voc"] = $articleDb->id;
|
||||
|
||||
$question = $voc[0]['1'];
|
||||
$right_answer = $voc[0]['2'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$width = ($number_completed / $number_main) * 100;
|
||||
$difficulty = $_SESSION["difficulty"];
|
||||
|
||||
$number_completed++;
|
||||
|
||||
$question = str_replace(",", ",", $question);
|
||||
$right_answer = str_replace(",", ",", $right_answer);
|
||||
|
||||
if($number_main - $number_completed == -1) {
|
||||
print("$number_completed/$number_main,<span>$false</span> - <span>$true</span>,$question,true,$right_answer,$width,$difficulty");
|
||||
}
|
||||
else {
|
||||
print("$number_completed/$number_main,<span>$false</span> - <span>$true</span>,$question,false,$right_answer,$width,$difficulty");
|
||||
}
|
||||
|
||||
}
|
||||
else { // Wenn Difficulty 2 oder 3
|
||||
|
||||
$active_voc = $_SESSION["active-voc"];
|
||||
|
||||
$suggestion = htmlentities(substr($_POST["suggestion"], 0, 30), ENT_QUOTES, 'UTF-8');
|
||||
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `id` = '$active_voc'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
|
||||
similar_text($voc[0]['2'], $suggestion, $return);
|
||||
|
||||
$difficulty = $_SESSION["difficulty"];
|
||||
|
||||
if(($voc[0]['2'] == $suggestion && $_SESSION["difficulty"] == '3') ||($return >= 85 && $_SESSION["difficulty"] == '2')) {
|
||||
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'true';
|
||||
|
||||
$value_new[0]['1'] = $voc[0]['1'];
|
||||
$value_new[0]['2'] = $voc[0]['2'];
|
||||
|
||||
if($voc[0]['progress'] <= 4) {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'] + 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'];
|
||||
}
|
||||
|
||||
print("true,");
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'false';
|
||||
|
||||
$value_new[0]['1'] = $voc[0]['1'];
|
||||
$value_new[0]['2'] = $voc[0]['2'];
|
||||
|
||||
if($voc[0]['progress'] >= 1) {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'] - 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['progress'] = $voc[0]['progress'];
|
||||
}
|
||||
|
||||
print("false,");
|
||||
|
||||
}
|
||||
|
||||
$right_answer = $voc[0]['2'];
|
||||
|
||||
$value_new_new = json_encode($value_new);
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content` SET `value` = '$value_new_new' WHERE `path` = '$userid/lang/$list/' AND `id` = '$active_voc'");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$false = 0;
|
||||
$true = 0;
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$id = $articleDb->id;
|
||||
|
||||
if($voc[0]['activeLearn'] == 'true') {
|
||||
$number_main++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'true' || $voc[0]['learnStatus'] == 'false') {
|
||||
$number_completed++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'true') {
|
||||
$true++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'false') {
|
||||
$false++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$n = '"learnStatus":"pending"';
|
||||
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `value` LIKE '%$n%' ORDER BY RAND() LIMIT 1";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$_SESSION["active-voc"] = $articleDb->id;
|
||||
|
||||
$question = $voc[0]['1'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$width = ($number_completed / $number_main) * 100;
|
||||
$difficulty = $_SESSION["difficulty"];
|
||||
|
||||
$number_completed++;
|
||||
|
||||
$question = str_replace(",", ",", $question);
|
||||
$right_answer = str_replace(",", ",", $right_answer);
|
||||
|
||||
if($number_main - $number_completed == -1) {
|
||||
print("$number_completed/$number_main,<span>$false</span> - <span>$true</span>,$question,true,$right_answer,$width,$difficulty");
|
||||
}
|
||||
else {
|
||||
print("$number_completed/$number_main,<span>$false</span> - <span>$true</span>,$question,false,$right_answer,$width,$difficulty");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
17
temporary/pagecontent/action-list-delete.php
Normal file
17
temporary/pagecontent/action-list-delete.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'list' AND `path` = '$userid/$lang/' AND `id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
mysql_query("DELETE FROM `VokabelBox2Content` WHERE `path` = '$userid/lang/$list/' AND `type` = 'voc'");
|
||||
mysql_query("DELETE FROM `VokabelBox2Content` WHERE `id` = '$list' AND `path` = '$userid/$lang/' AND `type` = 'list'");
|
||||
}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
47
temporary/pagecontent/action-listAdd.php
Normal file
47
temporary/pagecontent/action-listAdd.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
// Nutzereingabe wird geholt
|
||||
$listname = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["listname"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
|
||||
// Testen, ob leer
|
||||
if($listname == '' )
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// ID wird generiert
|
||||
$id = '';
|
||||
$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVW0123456789";
|
||||
for ($i = 1; $i <= 8; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 62);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$id = $id . $zufallszahl;
|
||||
}
|
||||
|
||||
// Testen ob die ID schon vorhanden ist.
|
||||
// WICHTIG: Die ID einer Liste darf ***insgesamt*** nur ein Mal vorhanden sein! Sie ist nicht auf die Benutzer-ID bezogen!
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `id` = '$id' AND `type` = 'list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Pfad wird gesetzt
|
||||
$path = "$userid/" . $lang . "/";
|
||||
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%' AND `type` = 'list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
$statLIST = mysql_num_rows($result_articles);
|
||||
if($statLIST > '500') {
|
||||
die();
|
||||
}
|
||||
|
||||
//Neue Liste wird in die Datenbank geladen
|
||||
mysql_query("INSERT INTO `VokabelBox2Content`(`id`, `path`, `value`, `type`) VALUES ('$id','$path','$listname','list')");
|
||||
|
||||
// JS darf fortfahren
|
||||
echo "true";
|
||||
|
||||
?>
|
||||
18
temporary/pagecontent/action-listRename.php
Normal file
18
temporary/pagecontent/action-listRename.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
$listname = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["listname"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
|
||||
if($listname == '' || $lang == '')
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
$path = "$userid/" . $lang . "/";
|
||||
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content` SET `value` = '$listname' WHERE `path` = '$path' AND `id` = '$list'");
|
||||
|
||||
echo "true";
|
||||
|
||||
?>
|
||||
36
temporary/pagecontent/action-login.php
Normal file
36
temporary/pagecontent/action-login.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
$Benutzername = $_POST["username"];
|
||||
$Passwort = $_POST["password"];
|
||||
|
||||
$Passwort = hash('sha512',$Passwort);
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE (`username` = '$Benutzername' AND `password` = '$Passwort') OR (`email` = '$Benutzername' AND `password` = '$Passwort') AND `loginfails` <= '5'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `loginfails`= '0' WHERE `username` = '$Benutzername' OR `email` = '$Benutzername'");
|
||||
|
||||
setcookie('everloggedin', 'true', time() + (86400 * 30 * 365), "/");
|
||||
|
||||
$_SESSION["Benutzername"] = $Benutzername;
|
||||
$_SESSION["Passwort"] = $Passwort;
|
||||
|
||||
echo "true";
|
||||
|
||||
}
|
||||
else {
|
||||
mysql_query("UPDATE `VokabelBox2Users` SET `loginfails`= `loginfails` + 1 WHERE `username` = '$Benutzername' OR `email` = '$Benutzername'");
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE (`username` = '$Benutzername' OR `email` = '$username') AND `loginfails` > '5'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
echo "loginfails";
|
||||
die();
|
||||
}
|
||||
echo "false";
|
||||
}
|
||||
|
||||
?>
|
||||
8
temporary/pagecontent/action-logout.php
Normal file
8
temporary/pagecontent/action-logout.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
session_unset();
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
11
temporary/pagecontent/action-orderBy.php
Normal file
11
temporary/pagecontent/action-orderBy.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
if($meta != 'name' && $meta != 'lastAccess' && $meta != 'lastCreated') {
|
||||
die();
|
||||
}
|
||||
|
||||
$_SESSION["orderBy"] = $meta;
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
110
temporary/pagecontent/action-register-code.php
Normal file
110
temporary/pagecontent/action-register-code.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
$code = htmlentities(substr($_POST["code"], 0, 30));
|
||||
|
||||
if($code != $_SESSION["code"]) {
|
||||
$_SESSION["codeFails"] = $_SESSION["codeFails"] + 1;
|
||||
|
||||
if($_SESSION["codeFails"] >= 3) {
|
||||
echo "codeFailsLimit";
|
||||
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
$_SESSION["code"] = $code;
|
||||
|
||||
$_SESSION["codeFails"] = 0;
|
||||
|
||||
$betreff = "Willkommen bei VokSpace!";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätigen Sie Ihr Konto</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Ihr neuer Code: ' . $code . '</h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
$email = $_SESSION["Email"];
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
echo "wrongCode";
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
$username = $_SESSION["Benutzername"];
|
||||
$password = $_SESSION["Passwort"];
|
||||
$email = $_SESSION["Email"];
|
||||
|
||||
if(empty($email) || empty($username) || empty($password) ) {
|
||||
print("incompleteUserdata");
|
||||
die();
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `username` = '$username'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
print("usernameRegistered");
|
||||
die();
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `email` = '$email'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
print("emailRegistered");
|
||||
die();
|
||||
}
|
||||
|
||||
$id = '';
|
||||
$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVW0123456789";
|
||||
for ($i = 1; $i <= 32; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 62);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$id = $id . $zufallszahl;
|
||||
}
|
||||
|
||||
$_SESSION["Benutzername"] = $username;
|
||||
$_SESSION["Passwort"] = $password;
|
||||
|
||||
$settings ='[{"nickname":"","formal-term":"false","appearance":"2"}]';
|
||||
|
||||
mysql_query("INSERT INTO `VokabelBox2Users`(`username`, `email`, `password`, `userid`, `settings`) VALUES ('$username','$email','$password','$id','$settings')");
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
105
temporary/pagecontent/action-register.php
Normal file
105
temporary/pagecontent/action-register.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
$email = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["email"], 0, 256), ENT_QUOTES, 'UTF-8')));
|
||||
$username = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["username"], 0, 64), ENT_QUOTES, 'UTF-8')));
|
||||
$password = htmlentities(substr($_POST["password"], 0, 256));
|
||||
$password_repeat = htmlentities(substr($_POST["password_repeat"], 0, 256));
|
||||
|
||||
|
||||
if(empty($email) || empty($username) || empty($password) || empty($password_repeat) || !filter_var($email, FILTER_VALIDATE_EMAIL) ) {
|
||||
print("incompleteUserdata");
|
||||
die();
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `username` = '$username'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
print("usernameRegistered");
|
||||
die();
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `email` = '$email'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
print("emailRegistered");
|
||||
die();
|
||||
}
|
||||
|
||||
if($password != $password_repeat) {
|
||||
print("noAgreement");
|
||||
die();
|
||||
}
|
||||
|
||||
$captcha = $_POST["captcha"];
|
||||
$secret = "6LdfJZkaAAAAABL6KR5GQll8xxkPRJZGYknBYKeQ";
|
||||
$response = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret."&response=".$captcha."&remoteip=".$_SERVER["REMOTE_ADDR"]), true);
|
||||
|
||||
if ($response["success"] != false) {
|
||||
|
||||
}
|
||||
else {
|
||||
print("noCaptcha");
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$password = hash('sha512',$password);
|
||||
|
||||
|
||||
$_SESSION["Benutzername"] = $username;
|
||||
$_SESSION["Passwort"] = $password;
|
||||
$_SESSION["Email"] = $email;
|
||||
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
$_SESSION["code"] = $code;
|
||||
$_SESSION["codeFails"] = 0;
|
||||
|
||||
$betreff = "Willkommen bei VokSpace!";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätigen Sie Ihr Konto</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Ihr Code: ' . $code . '</h2>
|
||||
<h5 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:15px">Ihr Benutzerkonto wird erst bei der erfolgreichen Eingabe dieses Code aktiviert. Momentan besteht noch kein Anspruch auf Email-Adresse und Benutzername.<br>Wenn Sie das Fenster versehentlich geschlossen haben, können Sie einfach ein neues Konto erstellen.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
|
||||
|
||||
print("true");
|
||||
|
||||
|
||||
?>
|
||||
66
temporary/pagecontent/action-train.php
Normal file
66
temporary/pagecontent/action-train.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
if($meta == 'start') {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$query_contains = 0; // Variable überprüft ob Auswahl Vokabeln enthält.
|
||||
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$id = $articleDb->id;
|
||||
|
||||
|
||||
if($voc[0]['learnStatus'] == 'false') {
|
||||
$value_new[0]['activeLearn'] = 'true';
|
||||
$value_new[0]['learnStatus'] = 'pending';
|
||||
$query_contains = 1;
|
||||
}
|
||||
else {
|
||||
$value_new[0]['activeLearn'] = '0';
|
||||
$value_new[0]['learnStatus'] = '0';
|
||||
}
|
||||
|
||||
|
||||
$value_new[0]['1'] = $voc[0]['1'];
|
||||
$value_new[0]['2'] = $voc[0]['2'];
|
||||
$value_new[0]['progress'] = $voc[0]['progress'];
|
||||
|
||||
|
||||
|
||||
$value_new_new = json_encode($value_new);
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content`SET `value` = '$value_new_new' WHERE `path` = '$userid/lang/$list/' AND `id` = '$id'");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
if($query_contains != 1) {
|
||||
print("noSelection");
|
||||
die();
|
||||
}
|
||||
|
||||
print("true");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
106
temporary/pagecontent/action-verify-identity.php
Normal file
106
temporary/pagecontent/action-verify-identity.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
// Zuvor einegebenes Passwort und Code werden geholt
|
||||
$code = htmlentities(substr($_POST["code"], 0, 30));
|
||||
$password = htmlentities(substr($_POST["password"], 0, 256));
|
||||
|
||||
// Passwort wird gehasht
|
||||
$password = hash('sha512',$password);
|
||||
|
||||
// Seite mit der fortgefahren werden soll wird geholt
|
||||
$verify_identity = $_SESSION["verify-identity"];
|
||||
|
||||
// E-Mail wird geholt
|
||||
$sql = "SELECT
|
||||
*
|
||||
FROM
|
||||
`VokabelBox2Users`
|
||||
WHERE
|
||||
`userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$email = $articleDb->email;
|
||||
}
|
||||
|
||||
// Code (der Seite "verify") wird überprüft
|
||||
if($code != $_SESSION["verify-code"]) {
|
||||
$_SESSION["verify-codeFails"] = $_SESSION["verify-codeFails"] + 1;
|
||||
|
||||
// Wenn öfter als drei Mal falsch eingegeben
|
||||
if($_SESSION["verify-codeFails"] >= 3) {
|
||||
echo "codeFailsLimit";
|
||||
|
||||
// Neuer Code, usw...
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
// Neuer Code wird als Session gesetzt
|
||||
$_SESSION["verify-code"] = $code;
|
||||
// Anzahl d. Fehlversuche wird zurückgesetzt
|
||||
$_SESSION["verify-codeFails"] = 0;
|
||||
|
||||
$betreff = "Kontosicherheit Ihrer VokSpace";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätigen Sie Ihr Konto</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Ihr neuer Code: ' . $code . '</h2>
|
||||
<h5 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:15px">Die Bestätigung Ihrer Identität ist erforderlich, um sicherheitsrelevante Informationen Ihrer Kontos zu ändern.<br>Wenn Ihnen diese Aktivität nicht bekannt vorkommt, ändern Sie bitte SOFORT Ihr Passwort, um Ihr Konto zu schützen.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
echo "wrongCode";
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
// Überprüfung des Passworts
|
||||
$sql = "SELECT * FROM `VokabelBox2Users` WHERE `userid` = '$userid' AND `password` = '$password'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
print("wrongPassword");
|
||||
die();
|
||||
}
|
||||
|
||||
// Nutzereingaben werden ebenfalls als Session gespeichert. Das ist enorm wichtig, da sonst Seiten übersprungen werden können.
|
||||
// Im letzen Schritt werden alle Nutzer-Sessions noch einmal mit den tatsächlichen Sessions abgeglichen.
|
||||
$_SESSION["verify-password-user"] = $password;
|
||||
$_SESSION["verify-code-user"] = $code;
|
||||
|
||||
// Gib aus, mit welcher Seite JS forfahren soll
|
||||
print($verify_identity);
|
||||
|
||||
|
||||
?>
|
||||
35
temporary/pagecontent/action-voc-copy-search.php
Normal file
35
temporary/pagecontent/action-voc-copy-search.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
if($meta == '') {
|
||||
?>
|
||||
<h4 align="center">Suchen Sie nach einer Liste.<br>Es werden nur die drei zuletzt verwendeten Listen angezeigt.</h4>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
|
||||
$sql = "SELECT `value`,`id`,`path` FROM `VokabelBox2Content` WHERE `type` = 'list' AND `path` LIKE '$userid/%/'AND LOWER(`value`) LIKE LOWER('%$meta%') ORDER BY `lastedit` DESC LIMIT 0,3";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$path = explode("/", $articleDb->path);
|
||||
$lang_new = $path[1];
|
||||
|
||||
?>
|
||||
<div class="folder" onclick="getContent('action:vocCopy','<?php echo $articleDb->id; ?>','scrollLeft')">
|
||||
<span><?php echo $articleDb->value; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<h4 align="center">Es wurden keine Listen gefunden</h4>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
35
temporary/pagecontent/action-voc-move-search.php
Normal file
35
temporary/pagecontent/action-voc-move-search.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
if($meta == '') {
|
||||
?>
|
||||
<h4 align="center">Suchen Sie nach einer Liste.<br>Es werden nur die drei zuletzt verwendeten Listen angezeigt.</h4>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
|
||||
$sql = "SELECT `value`,`id`,`path` FROM `VokabelBox2Content` WHERE `type` = 'list' AND `path` LIKE '$userid/%/'AND LOWER(`value`) LIKE LOWER('%$meta%') ORDER BY `lastedit` DESC LIMIT 0,3";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$path = explode("/", $articleDb->path);
|
||||
$lang_new = $path[1];
|
||||
|
||||
?>
|
||||
<div class="folder" onclick="getContent('action:vocMove','<?php echo $articleDb->id; ?>','scrollLeft')">
|
||||
<span><?php echo $articleDb->value; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<h4 align="center">Es wurden keine Listen gefunden</h4>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
51
temporary/pagecontent/action-vocAdd.php
Normal file
51
temporary/pagecontent/action-vocAdd.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
// Vokabel-Eingabe holen
|
||||
$vokinputtmpleft = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["vokinputtmpleft"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
$vokinputtmpright = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["vokinputtmpright"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
|
||||
// Testen, ob beides ausgefüllt
|
||||
if(empty($vokinputtmpleft) || empty($vokinputtmpright)) {
|
||||
die();
|
||||
}
|
||||
|
||||
// ID wird generiert
|
||||
$id = '';
|
||||
$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVW0123456789";
|
||||
for ($i = 1; $i <= 8; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 62);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$id = $id . $zufallszahl;
|
||||
}
|
||||
|
||||
// Teten ob ID bereits IN DIESEM ORDNER vorhanden
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `id` = '$id' AND `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Eingabe wird im JSON-Format gespeichert
|
||||
$value[0]['1'] = $vokinputtmpleft;
|
||||
$value[0]['2'] = $vokinputtmpright;
|
||||
$value[0]['progress'] = "0";
|
||||
$value = json_encode($value);
|
||||
|
||||
$path = "$userid/lang/$list/";
|
||||
|
||||
// Anzahl im Nutzerkonto gespeicherter Vokabeln wird geholt
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%' AND `type` = 'voc'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
$statVOC = mysql_num_rows($result_articles);
|
||||
|
||||
if($statVOC > '1000') {
|
||||
die();
|
||||
}
|
||||
|
||||
mysql_query("INSERT INTO `VokabelBox2Content`(`id`, `path`, `value`, `type`) VALUES ('$id','$path','$value','voc')");
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
108
temporary/pagecontent/action-vocCopy.php
Normal file
108
temporary/pagecontent/action-vocCopy.php
Normal file
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
|
||||
// Ausgewählte Elemente aus der Session holen
|
||||
$selected_items = $_SESSION["selected-items"];
|
||||
|
||||
// Testen, ob vollständig
|
||||
if(empty($meta) || empty($selected_items) )
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Prüfen, ob ID der neuen Liste stimmt
|
||||
$sql = "SELECT `path` FROM `VokabelBox2Content` WHERE `type` = 'list' AND `path` LIKE '$userid/%/'AND `id` = '$meta'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$selected_items = explode("-", $selected_items);
|
||||
|
||||
|
||||
$i = 0;
|
||||
foreach($selected_items as $selected_item) {
|
||||
|
||||
if($selected_item != '') {
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `id` = '$selected_item'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$value_new[0]['1'] = $voc[0]['1'];
|
||||
$value_new[0]['2'] = $voc[0]['2'];
|
||||
$value_new[0]['progress'] = '0';
|
||||
|
||||
|
||||
|
||||
$value_new_new = json_encode($value_new);
|
||||
|
||||
|
||||
$id = '';
|
||||
$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVW0123456789";
|
||||
for ($i = 1; $i <= 8; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 62);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$id = $id . $zufallszahl;
|
||||
}
|
||||
|
||||
// Teten ob ID bereits IN DIESEM ORDNER vorhanden
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `id` = '$id' AND `type` = 'voc' AND `path` = '$userid/lang/$meta/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Anzahl im Nutzerkonto gespeicherter Vokabeln wird geholt
|
||||
$sql = "SELECT `id` FROM `VokabelBox2Content` WHERE `path` LIKE '$userid/%' AND `type` = 'voc'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
$statVOC = mysql_num_rows($result_articles);
|
||||
|
||||
if($statVOC > '1000') {
|
||||
die();
|
||||
}
|
||||
|
||||
mysql_query("INSERT INTO `VokabelBox2Content`(`id`, `path`, `value`, `type`) VALUES ('$id','$userid/lang/$meta/','$value_new_new','voc')");
|
||||
|
||||
}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$list_new_id = $meta;
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$list = $articleDb->value;
|
||||
}
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$meta'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$list_new = $articleDb->value;
|
||||
}
|
||||
|
||||
|
||||
echo count($selected_items) - 1 . "," . $list . "," . $list_new . "," . $list_new_id . ",true";
|
||||
|
||||
?>
|
||||
40
temporary/pagecontent/action-vocDelete.php
Normal file
40
temporary/pagecontent/action-vocDelete.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
$selected_items = $_SESSION["selected-items"];
|
||||
|
||||
if(empty($selected_items) )
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
$selected_items = explode("-", $selected_items);
|
||||
|
||||
foreach($selected_items as $selected_item) {
|
||||
|
||||
if($selected_item != '') {
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `id` = '$selected_item'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
mysql_query("DELETE FROM `VokabelBox2Content`WHERE `id` = '$selected_item' AND `path` = '$userid/lang/$list/'");
|
||||
}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$list_id = $list;
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$list = $articleDb->value;
|
||||
}
|
||||
|
||||
echo count($selected_items) - 1 . "," . $list . "," . $list_id . ",true";
|
||||
|
||||
|
||||
?>
|
||||
27
temporary/pagecontent/action-vocEditSave.php
Normal file
27
temporary/pagecontent/action-vocEditSave.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
$vocedit1 = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["vocedit_1"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
$vocedit2 = iconv('UTF-8','ASCII//TRANSLIT',addslashes(htmlentities(substr($_POST["vocedit_2"], 0, 30), ENT_QUOTES, 'UTF-8')));
|
||||
|
||||
$voc = substr($_POST["voc"], 0, 30);
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Content` WHERE `id` = '$voc' AND `type` = 'voc'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles) && $vocedit1 != '' && $vocedit2 != '')
|
||||
{}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
$value[0]['1'] = $vocedit1;
|
||||
$value[0]['2'] = $vocedit2;
|
||||
$value[0]['progress'] = "0";
|
||||
|
||||
$value = json_encode($value);
|
||||
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content` SET `value` = '$value' WHERE `id` = '$voc' AND `path` = '$userid/lang/$list/'");
|
||||
|
||||
print("true");
|
||||
|
||||
?>
|
||||
64
temporary/pagecontent/action-vocMove.php
Normal file
64
temporary/pagecontent/action-vocMove.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
// Ausgewählte Elemente aus der Session holen
|
||||
$selected_items = $_SESSION["selected-items"];
|
||||
|
||||
// Testen, ob vollständig
|
||||
if(empty($meta) || empty($selected_items) )
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
// Prüfen, ob ID der neuen Liste stimmt
|
||||
$sql = "SELECT `path` FROM `VokabelBox2Content` WHERE `type` = 'list' AND `path` LIKE '$userid/%/'AND `id` = '$meta'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(!mysql_num_rows($result_articles))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$selected_items = explode("-", $selected_items);
|
||||
|
||||
|
||||
$i = 0;
|
||||
foreach($selected_items as $selected_item) {
|
||||
|
||||
if($selected_item != '') {
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `id` = '$selected_item'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content`SET `path` = '$userid/lang/$meta/' WHERE `path` = '$userid/lang/$list/' AND `id` = '$selected_item' AND `type` = 'voc'");
|
||||
|
||||
}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$list_new_id = $meta;
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$list = $articleDb->value;
|
||||
}
|
||||
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$meta'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$list_new = $articleDb->value;
|
||||
}
|
||||
|
||||
|
||||
echo count($selected_items) - 1 . "," . $list . "," . $list_new . "," . $list_new_id . ",true";
|
||||
|
||||
?>
|
||||
17
temporary/pagecontent/change-email-verify.php
Normal file
17
temporary/pagecontent/change-email-verify.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="fixed-title">
|
||||
<h2>E-Mail bestätigen</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h2>Es wurde ein Code an <?php echo $_SESSION["email-change-email"] ?> gesendet!</h2>
|
||||
<h4>Bitte bestätigen Sie Ihre neue Email-Adresse in der nächsten halben Stunde. Sehen Sie bitte auch in Ihrem Spam-Ordner nach.</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="number" name="Code" id="change-email-code" oninput="checkIfFilled('change-email-code')">
|
||||
<span>Ihr Code</span>
|
||||
</div>
|
||||
<button onclick="getContent('action:change-email-verify')" class="default-button">Weiter</button>
|
||||
<p>Sie haben insgesamt drei Versuche<p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
15
temporary/pagecontent/change-email.php
Normal file
15
temporary/pagecontent/change-email.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="fixed-title">
|
||||
<h2>E-Mail ändern</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h4>Sie können nun eine neue E-Mail-Adresse festlegen</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="email" name="Email" id="change-email" oninput="checkIfFilled('change-email')">
|
||||
<span>Neue E-Mail</span>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="getContent('action:change-email')" class="default-button">Weiter</button>
|
||||
</div>
|
||||
</div>
|
||||
19
temporary/pagecontent/change-password.php
Normal file
19
temporary/pagecontent/change-password.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Passwort ändern</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h4>Sie können nun ein neues Passwort festlegen</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" id="change-password" oninput="checkIfFilled('change-password')">
|
||||
<span>Neues Passwort</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" id="change-password-repeat" oninput="checkIfFilled('change-password-repeat')">
|
||||
<span>Neues Passwort bestätigen</span>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="getContent('action:change-password')" class="default-button">Weiter</button>
|
||||
</div>
|
||||
</div>
|
||||
17
temporary/pagecontent/delete-account.php
Normal file
17
temporary/pagecontent/delete-account.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Konto löschen</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h4>Das Löschen Ihres Kontos bewirkt folgendes:</h4>
|
||||
<ul>
|
||||
<li><u>Alle</u> Vokabeln, Sprachen und Listen werden gelöscht</li>
|
||||
<li>Alle Kontodaten (Email, Passwort, Benutzername und Einstellungen) werden <u>unwiderruflich</u> gelöscht</li>
|
||||
<li>Alle freigegebenen Listen werden ebenfalls gelöscht</li>
|
||||
</ul>
|
||||
<p>Diese Aktionen können <u>nicht</u> rückgängig gemacht werden!</p>
|
||||
<h5>Sollte ein Backup der Datenbank vorliegen, werden die Daten erst nach maximal 30 Tagen gelöscht und bleiben bis zu diesem Zeitpunkt wiederherstellbar. Dies ist aber ein Ausnahmefall.</h5>
|
||||
<br>
|
||||
<button onclick="if(confirm('Sicher, dass Sie gehen möchten?')) {getContent('action:delete-account')}else{getContent('account');}" class="default-button">Mein Konto dauerhaft löschen :(</button>
|
||||
</div>
|
||||
</div>
|
||||
17
temporary/pagecontent/forgot-password-email-verify.php
Normal file
17
temporary/pagecontent/forgot-password-email-verify.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="fixed-title">
|
||||
<h2>E-Mail bestätigen</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h2>Es wurde ein Code an <?php echo $_SESSION["forgot-password-email"] ?> gesendet!</h2>
|
||||
<h4>Geben Sie bitte den Code ein, den Sie zur Wiederherstellung Ihres Passworts erhalten haben. Sehen Sie bitte auch in Ihrem Spam-Ordner nach.</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="number" name="Code" id="forgot-password-code" oninput="checkIfFilled('forgot-password-code')">
|
||||
<span>Ihr Code</span>
|
||||
</div>
|
||||
<button onclick="getContent('action:forgot-password-email-verify')" class="default-button">Weiter</button>
|
||||
<p>Sie haben insgesamt drei Versuche<p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
19
temporary/pagecontent/forgot-password-newpassword.php
Normal file
19
temporary/pagecontent/forgot-password-newpassword.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Neues Passwort festlegen</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h4>Sie können nun ein neues Passwort wählen</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" id="change-password" oninput="checkIfFilled('change-password')">
|
||||
<span>Neues Passwort</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" id="change-password-repeat" oninput="checkIfFilled('change-password-repeat')">
|
||||
<span>Neues Passwort bestätigen</span>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="getContent('action:forgot-password-change-password')" class="default-button">Weiter</button>
|
||||
</div>
|
||||
</div>
|
||||
15
temporary/pagecontent/forgot-password.php
Normal file
15
temporary/pagecontent/forgot-password.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Passwort vergessen</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h4>Bitte geben Sie die E-Mail-Adresse ein, unter der Sie das Konto registriert haben</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="email" name="Email" id="forgot-password-email" oninput="checkIfFilled('forgot-password-email')">
|
||||
<span>E-Mail-Adresse</span>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="getContent('action:forgot-password-email')" class="default-button">Weiter</button>
|
||||
</div>
|
||||
</div>
|
||||
84
temporary/pagecontent/index.php
Normal file
84
temporary/pagecontent/index.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<div class="fixed-title">
|
||||
<?php
|
||||
|
||||
// Nickname wird geladen
|
||||
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$settings = json_decode($articleDb->settings, true);
|
||||
}
|
||||
|
||||
$nickname = $settings[0]['nickname'];
|
||||
|
||||
if(date("H") > "6" && date("H") <= "11") {
|
||||
?>
|
||||
<h2>Guten Morgen, <?php echo $nickname; ?>!</h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(date("H") > "11" && date("H") <= "14") {
|
||||
?>
|
||||
<h2>Guten Mittag, <?php echo $nickname; ?>!</h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(date("H") > "14" && date("H") <= "17") {
|
||||
?>
|
||||
<h2>Guten Tag, <?php echo $nickname; ?>!</h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(date("H") > "17" && date("H") <= "22") {
|
||||
?>
|
||||
<h2>Guten Abend, <?php echo $nickname; ?>!</h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(date("H") > "22" && date("H") <= "06") {
|
||||
?>
|
||||
<h2>Gute Nacht, <?php echo $nickname; ?>!</h2>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="folder-divider">
|
||||
<span>Zuletzt verwendet</span>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'list' AND `path` LIKE '$userid/%/' ORDER BY `lastedit` DESC LIMIT 0,3";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
?>
|
||||
<div class="folder" onclick="$(this).attr('class','folder ripple');getContent('list','<?php echo $articleDb->id; ?>','scrollRight')">
|
||||
<span><?php echo $articleDb->value; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="folder-divider">
|
||||
<span>Sprachen</span>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'lang' AND `path` = '$userid/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
?>
|
||||
<div class="folder" onclick="$(this).attr('class','folder ripple');getContent('lang','<?php echo $articleDb->id; ?>','scrollRight')">
|
||||
<img src="files/icons/flags/<?php echo $articleDb->value; ?>.svg" />
|
||||
<span><?php echo $articleDb->value; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
33
temporary/pagecontent/intro-p1.php
Normal file
33
temporary/pagecontent/intro-p1.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Willkommen bei VokSpace!</h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer" align="center">
|
||||
<h2>Lass uns ein paar Kleinigkeiten anpassen…</h2>
|
||||
<h3>Wie möchten Sie genannt werden?</h3>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input required type="text" name="Spitzname" id="register-nickname" oninput="checkIfFilled('register-nickname')">
|
||||
<span>Vorname</span>
|
||||
</div>
|
||||
<h6>Dieser Name wird wird nicht öffentlich angezeigt. Es kann der Vorname oder ein Spitzname sein.</h6>
|
||||
</div>
|
||||
<br>
|
||||
<h3>Wählen Sie ein Erscheinungsbild</h3>
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="settings-section">
|
||||
<input type="range" min="1" max="3" value="2" onchange="changeAppearance()" id="change-appearance">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="33%" align="left">Hell</td>
|
||||
<td width="33%" align="center">Gedimmt</td>
|
||||
<td width="33%" align="right">Dunkel</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button class="default-button" onclick="getContent('action:intro:p1');">FORTFAHREN</button>
|
||||
</div>
|
||||
<h6>Alle Einstellungen können später noch angepasst werden. Sie werden in Ihrem Benutzerkonto hinterlegt und auf allen angemeldeten Geräten übernommen.</h6>
|
||||
</div>
|
||||
14
temporary/pagecontent/intro-p2.php
Normal file
14
temporary/pagecontent/intro-p2.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Kontoeinrichtung abgeschlossen</h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer" align="center">
|
||||
<h2>Ihr Benutzerkonto ist nun fertig eingerichtet. </h2>
|
||||
<h3>Wie funktioniert die VokSpace?</h3>
|
||||
<p>Pro Konto können bis zu 1.000 Vokabeln gesichert werden. Zur Auswahl stehen verschiedene Sprachen, die mit bis zu 500 Vokabellisten gefüllt werden können.</p>
|
||||
<br>
|
||||
<h3>Warum brauche ich ein Konto?</h3>
|
||||
<p>Alle Vokabeln werden automatisch in der Cloud gespeichert. Dadurch sind sie auf allen angemeldeten Geräten abrufbar und lassen sich lernen. Obwohl alle Daten immer mit dem Server synchronisiert werden, läuft VokSpace äußerst datenschonend. Sie läuft vollkommen dynamisch in Ihrem Browser; dennoch ist eine Netzwerkverbindung erforderlich.<br>Die Navigationsschaltflächen Ihres Browsers (etwa vor, zurück oder neu laden) funktionieren bei VokSpace nicht. Nutzen Sie bitte die Navigation von VokSpace.</p>
|
||||
<br>
|
||||
<h2><i>Ich wünsche viel Freude beim Lernen!</i></h2>
|
||||
<button class="default-button" onclick="getContent('index','','scrollRight');">ZU IHREM VOKSPACE</button>
|
||||
</div>
|
||||
18
temporary/pagecontent/lang-manage.php
Normal file
18
temporary/pagecontent/lang-manage.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Neue Sprache</h2>
|
||||
</div>
|
||||
<div class="folder-view-wrapper">
|
||||
<select id="select-lang" onchange="getContent('action:langAdd','','')">
|
||||
<option selected disabled>Sprache wählen</option>
|
||||
|
||||
<option value="deu">Deutsch</option>
|
||||
<option value="eng">Englisch</option>
|
||||
<option value="spa">Spanisch</option>
|
||||
<option value="nie">Niederländisch</option>
|
||||
<option value="fra">Französisch</option>
|
||||
<option value="tue">Türkisch</option>
|
||||
<option value="rus">Russisch</option>
|
||||
<option value="chi">Chinesisch</option>
|
||||
<option value="pol">Polnisch</option>
|
||||
</select>
|
||||
</div>
|
||||
78
temporary/pagecontent/lang.php
Normal file
78
temporary/pagecontent/lang.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBox2Content` WHERE `type` = 'lang' AND `id` = '$lang' AND `path` = '$userid/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$lang_value = $articleDb->value;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="fixed-title">
|
||||
<h2><?php echo $lang_value; ?></h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="view-settings">
|
||||
<div class="sorting">
|
||||
<button onclick="$('.sorting>div').css({'opacity':'1','pointer-events':'all'});">Sortieren nach: <?php if($_SESSION["orderBy"] == 'name') { print("Name"); }if($_SESSION["orderBy"] == 'lastAccess') { print("Zuletzt verwendet"); }if($_SESSION["orderBy"] == 'lastCreated') { print("Zuletzt hinzugefügt"); } ?> <i class="fas fa-sort"></i></button>
|
||||
<div>
|
||||
<div onclick="getContent('action:orderBy','lastAccess','',function() { getContent('lang','','fade'); });">Zuletzt verwendet (standard) <i class="fas fa-sort-amount-down"></i></div>
|
||||
<div onclick="getContent('action:orderBy','name','',function() { getContent('lang','','fade'); });">Name <i class="fas fa-sort-alpha-down"></i></div>
|
||||
<div onclick="getContent('action:orderBy','lastCreated','',function() { getContent('lang','','fade'); });">Zuletzt hinzugefügt <i class="fas fa-sort-numeric-down"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if($_SESSION["orderBy"] == 'name') {
|
||||
|
||||
$sql = "SELECT
|
||||
`id`,`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'list' AND `path`= '$userid/$lang/' ORDER BY `value` ASC";
|
||||
|
||||
}
|
||||
|
||||
if($_SESSION["orderBy"] == 'lastAccess' || $_SESSION["orderBy"] == '') {
|
||||
|
||||
$sql = "SELECT
|
||||
`id`,`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'list' AND `path`= '$userid/$lang/' ORDER BY `lastedit` DESC";
|
||||
|
||||
}
|
||||
|
||||
if($_SESSION["orderBy"] == 'lastCreated') {
|
||||
|
||||
$sql = "SELECT
|
||||
`id`,`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'list' AND `path`= '$userid/$lang/' ORDER BY `create_timestamp` DESC";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
?>
|
||||
<div class="folder" onclick="$(this).attr('class','folder ripple');getContent('list','<?php echo $articleDb->id; ?>','scrollRight')">
|
||||
<span><?php echo $articleDb->value; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
70
temporary/pagecontent/learn-summary.php
Normal file
70
temporary/pagecontent/learn-summary.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
$false = 0;
|
||||
$true = 0;
|
||||
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
$id = $articleDb->id;
|
||||
|
||||
if($voc[0]['activeLearn'] == 'true') {
|
||||
$number_main++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'true' || $voc[0]['learnStatus'] == 'false') {
|
||||
$number_completed++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'true') {
|
||||
$true++;
|
||||
}
|
||||
|
||||
if($voc[0]['learnStatus'] == 'false') {
|
||||
$false++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$width_true = ($true / $number_main) * 100;
|
||||
$width_false = ($false / $number_main) * 100;
|
||||
|
||||
?>
|
||||
<div class="fixed-title">
|
||||
<h2>Zusammenfassung</h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="settings-section">
|
||||
<div class="summary-relation">
|
||||
<div style="width: <?php echo $width_false; ?>%"></div>
|
||||
<div style="width: <?php echo $width_true; ?>%"></div>
|
||||
</div>
|
||||
<br>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="50%" align="left"><?php echo $false; ?> Falsch</td>
|
||||
<td width="50%" align="right"><?php echo $true; ?> Richtig</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br>
|
||||
<div class="form">
|
||||
<button onclick="getContent('list','','scrollLeft')" class="default-button">Fertig</button>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button onclick="getContent('action:train','start')" class="default-button">Trainieren</button>
|
||||
</div>
|
||||
<h6>Unter "Trainieren" können alle falsch beantworteten Vorkabeln noch einmal durchgegeangen werden</h6>
|
||||
</div>
|
||||
</div>
|
||||
34
temporary/pagecontent/learn.php
Normal file
34
temporary/pagecontent/learn.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Lernen starten</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="folder-divider">
|
||||
<span>Schwierigkeit</span>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<div class="choicebox">
|
||||
<label for="_1_3">Nervtötend<br><h6>Es wird eine exakte Eingabe gefordert (inkl. Groß-/Kleinschreibung)</h6><input type="radio" id="_1_3" name="difficulty" value="3" name="selection"></label>
|
||||
<label for="_1_2">Normal<br><h6>Über Tippfehler wird hinweg gesehen (Ähnlichkeit >85%)</h6><input checked type="radio" id="_1_2" name="difficulty" value="2" name="selection"></label>
|
||||
<label for="_1_1">Einfach<br><h6>Es wird keine Eingabe gefordert (nur richtig/falsch zum selber beantworten)</h6><input type="radio" id="_1_1" name="difficulty" value="1" name="selection"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="folder-divider">
|
||||
<span>Auswahl</span>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<div class="choicebox">
|
||||
<label for="_2_3">Gut geübt (Grüne Vokabeln)<input type="checkbox" id="_2_3" name="_3" value="3" name="selection"></label>
|
||||
<label for="_2_2">Geübt (Gelbe Vokabeln)<input checked type="checkbox" id="_2_2" name="_2" value="2" name="selection"></label>
|
||||
<label for="_2_1">Ungeübt (Rote Vokabeln)<input checked type="checkbox" id="_2_1" name="_1" value="1" name="selection"></label>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h6>Bitte beachten Sie: Da der Lernfortschritt durchgehend mit der Datenbank synchronisiert wird, ist das simultane Lernen mit zwei Geräten nicht möglich.</h6>
|
||||
<br>
|
||||
<div class="form">
|
||||
<button onclick="getContent('action:learn','start')" class="default-button">Starten</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
14
temporary/pagecontent/list-add.php
Normal file
14
temporary/pagecontent/list-add.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Neue Vokabelliste</h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="text" name="listname" id="list-add-name" oninput="checkIfFilled('list-add-name')">
|
||||
<span>Listenname</span>
|
||||
</div>
|
||||
<button onclick="getContent('action:listAdd','','scrollLeft')" class="default-button">Weiter</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
31
temporary/pagecontent/list-delete.php
Normal file
31
temporary/pagecontent/list-delete.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$value = $articleDb->value;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="fixed-title">
|
||||
<h2>Liste löschen</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="form">
|
||||
<h2>Folgende Liste wird gelöscht:</h2>
|
||||
<h4><?php echo $value; ?></h4>
|
||||
<h6 align="center">Gelöschte Listen können <u>nicht</u> wiederhergestellt werden!</h6>
|
||||
<br>
|
||||
<button onclick="getContent('action:listDelete','','scrollLeft')" class="default-button">Löschen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
84
temporary/pagecontent/list-download.php
Normal file
84
temporary/pagecontent/list-download.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
$id = '';
|
||||
$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVW0123456789";
|
||||
for ($i = 1; $i <= 256; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 62);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$id = $id . $zufallszahl;
|
||||
}
|
||||
|
||||
$myfile = fopen("temporary/" . $id . ".csv", "w") or die("Fehler beim Erstellen der Datei!");
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$value = $articleDb->value;
|
||||
}
|
||||
|
||||
$file = $articleDb->Ordner . '
|
||||
"Deutsch","Englisch"
|
||||
|
||||
';
|
||||
|
||||
fwrite($myfile, $file);
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'voc' AND `path`= '$userid/lang/$list/' ORDER BY `lastedit` DESC";
|
||||
|
||||
|
||||
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
|
||||
$Sprache1 = html_entity_decode($voc[0]['1']);
|
||||
$Sprache2 = html_entity_decode($voc[0]['2']);
|
||||
|
||||
htmlspecialchars_decode($Sprache1);
|
||||
htmlspecialchars_decode($Sprache2);
|
||||
|
||||
$Sprache1 = str_replace("\"", "\"\"", $Sprache1);
|
||||
$Sprache2 = str_replace("\"", "\"\"", $Sprache2);
|
||||
|
||||
$file = "\"$Sprache1\",\"$Sprache2\"";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
fwrite($myfile, "\r\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<h2>Liste herunterladen</h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer" align="center">
|
||||
<h4>Aktuell steht lediglich der Download als CSV-Datei zur Verfügung. Solche Dateien können mit allen Programmen geöffnet werden, welche Tabellen anzeigen können.<br>Es ist jedoch zu beachten, dass beim Import in ein Tabellen-Kalkulationsprogramm korrekte Einstellungen vorgenommen werden müssen.</h4>
|
||||
<br>
|
||||
<h4>Wenn Ihr Programm Sie nach Trennoptionen fragt, setzen Sie bitte:<br>-<u>nur</u> Komma als Trenner<br>-<u>doppelte Anführungszeichen</u> als Texttrenner.</h4>
|
||||
<br>
|
||||
<h4>Im Normalfall konfigurieren Programme diese Einstellungen aber von selbst.</h4>
|
||||
<div class="form">
|
||||
<button class="default-button" onclick="window.location.href='temporary/<?php echo $id ?>.csv'">Download .csv</button>
|
||||
</div>
|
||||
</div>
|
||||
31
temporary/pagecontent/list-rename.php
Normal file
31
temporary/pagecontent/list-rename.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$value = $articleDb->value;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="fixed-title">
|
||||
<h2>Liste umbenennen</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input value="<?php echo $value; ?>" type="text" name="listname" id="list-add-name" oninput="checkIfFilled('list-add-name')" class="filled">
|
||||
<span>Listenname</span>
|
||||
</div>
|
||||
<button onclick="getContent('action:listRename','','scrollLeft')" class="default-button">Umbenennen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
112
temporary/pagecontent/list.php
Normal file
112
temporary/pagecontent/list.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<div class="fixed-title">
|
||||
<h2>
|
||||
|
||||
<?php
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
echo $articleDb->value;
|
||||
}
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`id` = '$lang'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$language = $articleDb->value;
|
||||
}
|
||||
|
||||
|
||||
mysql_query("UPDATE `VokabelBox2Content` SET `lastedit`=now() WHERE `id` = '$list' AND `type` = 'list'");
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</h2>
|
||||
<button onclick="getContent('learn','start','scrollRight')">Lernen <i class="fas fa-caret-right"></i></button>
|
||||
</div>
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="view-settings">
|
||||
<div class="sorting">
|
||||
<button onclick="$('.sorting>div').css({'opacity':'1','pointer-events':'all'});">Sortieren nach: <?php if($_SESSION["orderBy"] == 'name') { print("Name"); }if($_SESSION["orderBy"] == 'lastAccess' || $_SESSION["orderBy"] == '') { print("Zuletzt bearbeitet"); }if($_SESSION["orderBy"] == 'lastCreated') { print("Zuletzt hinzugefügt"); } ?> <i class="fas fa-sort"></i></button>
|
||||
<div>
|
||||
<div onclick="getContent('action:orderBy','lastAccess','',function() { getContent('list','','fade'); });">Zuletzt bearbeitet (standard) <i class="fas fa-sort-amount-down"></i></div>
|
||||
<div onclick="getContent('action:orderBy','name','',function() { getContent('list','','fade'); });">Name <i class="fas fa-sort-alpha-down"></i></div>
|
||||
<div onclick="getContent('action:orderBy','lastCreated','',function() { getContent('list','','fade'); });">Zuletzt hinzugefügt <i class="fas fa-sort-numeric-down"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="voklist default">
|
||||
<div class="head">
|
||||
<div>Deutsch</div>
|
||||
<div><?php if(isset($language)) {echo $language;} else {echo "Sprache 2";} ?></div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if($_SESSION["orderBy"] == 'name') {
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'voc' AND `path` LIKE '$userid/lang/$list/' ORDER BY `value` ASC";
|
||||
|
||||
}
|
||||
|
||||
if($_SESSION["orderBy"] == 'lastAccess' || $_SESSION["orderBy"] == '') {
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'voc' AND `path` LIKE '$userid/lang/$list/' ORDER BY `lastedit` DESC";
|
||||
|
||||
}
|
||||
|
||||
if($_SESSION["orderBy"] == 'lastCreated') {
|
||||
|
||||
$sql = "SELECT
|
||||
`value`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'voc' AND `path`LIKE '$userid/lang/$list/' ORDER BY `create_timestamp` DESC";
|
||||
|
||||
}
|
||||
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
|
||||
$n = intval($voc[0]['progress']) + 1;
|
||||
?>
|
||||
<div>
|
||||
<div><?php echo $voc[0]['1']; ?></div>
|
||||
<div class="progress-indicator _<?php echo $n; ?>"></div>
|
||||
<div><?php echo $voc[0]['2']; ?></div></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
18
temporary/pagecontent/login-timeout.php
Normal file
18
temporary/pagecontent/login-timeout.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h2>Sie wurden automatisch abgemeldet</h2>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="text" name="Email" id="login-email" oninput="checkIfFilled('login-email')" />
|
||||
<span>Email oder Benutzername</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" id="login-password" oninput="checkIfFilled('login-password')" />
|
||||
<span>Passwort</span>
|
||||
</div>
|
||||
<button onclick="getContent('action:login','','growEllipse')" class="default-button">Weiter</button>
|
||||
<a onclick="getContent('register','','fade')">Neues Benutzerkonto anlegen</a>
|
||||
<a onclick="getContent('forgot-password','','fade')">Passwort zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
18
temporary/pagecontent/login.php
Normal file
18
temporary/pagecontent/login.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h2>VokSpace-Login</h2>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="text" name="Email" id="login-email" oninput="checkIfFilled('login-email')" />
|
||||
<span>Email oder Benutzername</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" id="login-password" oninput="checkIfFilled('login-password')" />
|
||||
<span>Passwort</span>
|
||||
</div>
|
||||
<button onclick="getContent('action:login','','growEllipse')" class="default-button">Weiter</button>
|
||||
<a onclick="getContent('register','','fade')">Neues Benutzerkonto anlegen</a>
|
||||
<a onclick="getContent('forgot-password','','fade')">Passwort zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
17
temporary/pagecontent/register-code.php
Normal file
17
temporary/pagecontent/register-code.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="fixed-title">
|
||||
<h2>Konto bestätigen</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h2>Es wurde ein Code an <?php echo $_SESSION["Email"] ?> gesendet!</h2>
|
||||
<h4>Bitte bestätigen Sie Ihre Email-Adresse in der nächsten halben Stunde. Sehen Sie bitte auch in Ihrem Spam-Ordner nach.</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="number" name="Code" id="register-code" oninput="checkIfFilled('register-code')">
|
||||
<span>Ihr Code</span>
|
||||
</div>
|
||||
<button onclick="getContent('action:registerCode','','growEllipse')" class="default-button">Weiter</button>
|
||||
<p>Sie haben insgesamt drei Versuche<p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
27
temporary/pagecontent/register.php
Normal file
27
temporary/pagecontent/register.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h2>Konto erstellen</h2>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="exmail" name="Email" maxlength="100" id="register-email" oninput="checkIfFilled('register-email')" />
|
||||
<span>E-Mail-Adresse</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" name="Benutzername" maxlength="100" id="register-username" oninput="checkIfFilled('register-username')" />
|
||||
<span>Benutzername</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" maxlength="100" id="register-password" oninput="checkIfFilled('register-password')" />
|
||||
<span>Passwort</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort-Wiederholung" maxlength="100" id="register-password-repeat" oninput="checkIfFilled('register-password-repeat')" />
|
||||
<span>Passwort wiederholen</span>
|
||||
</div>
|
||||
<div align="center" style="height: 78px;" class="g-recaptcha" data-sitekey="6LdfJZkaAAAAACsuq_y692pnxxHlft_5a8YnJmFm"></div>
|
||||
<button onclick="getContent('action:register','','')" class="default-button">Weiter</button>
|
||||
<a onclick="getContent('login','','fade')">Ich habe bereits ein Konto</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
27
temporary/pagecontent/search.php
Normal file
27
temporary/pagecontent/search.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$settings = json_decode($articleDb->settings, true);
|
||||
}
|
||||
|
||||
$appearance = $settings[0]['appearance'];
|
||||
|
||||
|
||||
?>
|
||||
<div class="fixed-title">
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="text" name="listname" id="search-query" oninput="checkIfFilled('search-query')">
|
||||
<span>Suchbegriff...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
SQL server reply: Lost connection to MySQL server at 'reading initial communication packet', system error: 104
|
||||
</div>
|
||||
</div>
|
||||
45
temporary/pagecontent/settings.php
Normal file
45
temporary/pagecontent/settings.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$settings = json_decode($articleDb->settings, true);
|
||||
}
|
||||
|
||||
$appearance = $settings[0]['appearance'];
|
||||
|
||||
|
||||
?>
|
||||
<div class="fixed-title">
|
||||
<h2>Einstellungen</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<div class="folder-divider">
|
||||
<span>Design</span>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<input type="range" min="1" max="3" value="<?php echo $_COOKIE["vokspace-appearance"]; ?>" onchange="changeAppearance()" id="change-appearance" />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="33%" align="left">Hell</td>
|
||||
<td width="33%" align="center">Gedimmt</td>
|
||||
<td width="33%" align="right">Dunkel</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<div class="folder-divider">
|
||||
<span>Über</span>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button onclick="window.location.href='https://www.timvandenboom.de/impressum'" class="default-button">Impressum</button>
|
||||
</div>
|
||||
<div class="form">
|
||||
<button onclick="window.location.href='https://www.timvandenboom.de/datenschutz'" class="default-button">Datenschutz</button>
|
||||
</div>
|
||||
<p align="center">© Tim van den Boom 2021</p>
|
||||
</div>
|
||||
</div>
|
||||
137
temporary/pagecontent/takeout.php
Normal file
137
temporary/pagecontent/takeout.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
$id = '';
|
||||
$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVW0123456789";
|
||||
for ($i = 1; $i <= 64; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 62);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$id = $id . $zufallszahl;
|
||||
}
|
||||
|
||||
$myfile = fopen("temporary/takeout-" . $id . ".html", "w") or die("Fehler beim Erstellen der Datei!");
|
||||
|
||||
$file = '<html><head></head><body><h1>Daten im Nutzerkonto:</h1><hr>';
|
||||
fwrite($myfile, $file);
|
||||
|
||||
$sql = "SELECT
|
||||
*
|
||||
FROM
|
||||
`VokabelBox2Users`
|
||||
WHERE
|
||||
`userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$file = "<p>Benutzername: $articleDb->username</p>";
|
||||
fwrite($myfile, $file);
|
||||
$file = "<p>Registrierte E-Mail: $articleDb->email</p>";
|
||||
fwrite($myfile, $file);
|
||||
$file = "<p>Konto erstellt: $articleDb->create_date</p>";
|
||||
fwrite($myfile, $file);
|
||||
$file = "<p>Letzter Kontozugriff: $articleDb->lastedit</p>";
|
||||
fwrite($myfile, $file);
|
||||
$file = "<p>Sontige Einstellungen: $articleDb->settings</p>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
}
|
||||
|
||||
$file = '<h1>Vokabellisten</h1><hr>';
|
||||
fwrite($myfile, $file);
|
||||
|
||||
$sql = "SELECT
|
||||
*
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
|
||||
WHERE
|
||||
`path` LIKE '$userid/%' AND `type` = 'lang'";
|
||||
$result_articles1 = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb1 = mysql_fetch_object($result_articles1))
|
||||
{
|
||||
|
||||
$file = "<h2>Sprache:$articleDb1->value</h2>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
$actual_lang = $articleDb1->id;
|
||||
|
||||
|
||||
|
||||
$sql2 = "SELECT
|
||||
*
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`path` LIKE '$userid/$actual_lang/%' AND `type` = 'list'";
|
||||
$result_articles2 = mysql_query ($sql2, $ezine_db);
|
||||
while ($articleDb2 = mysql_fetch_object($result_articles2))
|
||||
{
|
||||
|
||||
$file = "<h3>Liste:$articleDb2->value</h3>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
|
||||
|
||||
$actual_list = $articleDb2->id;
|
||||
|
||||
|
||||
|
||||
$file = "<table width='100%'><tr style='font-weight:bold;'><td>Sprache 1</td><td>Sprache 2</td><td>Zul. geändert am/um</td><td>Erstellt am/um</td></tr>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
|
||||
|
||||
$sql3 = "SELECT
|
||||
*
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`path` = '$userid/lang/$actual_list/' AND `type` = 'voc'";
|
||||
$result_articles3 = mysql_query ($sql3, $ezine_db);
|
||||
while ($articleDb3 = mysql_fetch_object($result_articles3))
|
||||
{
|
||||
|
||||
$file = "<tr>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
|
||||
$voc = json_decode($articleDb3->value, true);
|
||||
|
||||
$file = "<td>" . $voc[0]['1'] . "</td><td>" . $voc[0]['2'] . " </td><td> " . $articleDb3->lastedit . " </td><td> " . $articleDb3->create_timestamp . " </td></tr>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$file = "</table>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$file = "</body></html>";
|
||||
fwrite($myfile, $file);
|
||||
|
||||
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<h2>Datenauskunft</h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer" align="center">
|
||||
<h4>Ihr Takeout ist fertig vorbereitet. Es wird als .html-Datei geöffnet und kann direkt in Ihrem Browser ausgewertet werden. Wenn Sie es speichern möchten, klicken Sie an einer beliebigen Stelle mit der rechten Maustaste und wählen Sie "Speichern unter...".</h4>
|
||||
<div class="form">
|
||||
<button class="default-button" download="takeout-<?php echo $id ?>.html" onclick="window.location.href='temporary/takeout-<?php echo $id ?>.html'">Öffnen (.html)</button>
|
||||
</div>
|
||||
</div>
|
||||
93
temporary/pagecontent/verify-identity.php
Normal file
93
temporary/pagecontent/verify-identity.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
// META gibt an, mit welcher Kontoänderung fortgefahren werden soll
|
||||
if($meta != 'change-email' && $meta != 'change-password' && $meta != 'delete-account') {
|
||||
print("Auf dieser Seite ist ein Fehler aufgetreten!");
|
||||
die();
|
||||
}
|
||||
|
||||
// META wird für den nächsten Schritt gespeichert
|
||||
$_SESSION["verify-identity"] = $meta;
|
||||
|
||||
// E-Mail wird aus der Datenbank geholt
|
||||
$sql = "SELECT
|
||||
*
|
||||
FROM
|
||||
`VokabelBox2Users`
|
||||
WHERE
|
||||
`userid` = '$userid'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
$email = $articleDb->email;
|
||||
}
|
||||
|
||||
// Neuer Code wird generiert
|
||||
$code = '';
|
||||
$string = "0123456789";
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
{
|
||||
$zufallszahl = rand(0, 9);
|
||||
$zufallszahl = substr($string, $zufallszahl, 1);
|
||||
$code = $code . $zufallszahl;
|
||||
}
|
||||
|
||||
// Die Session ist explizit auf VERIFY bezogen! Andernfalls kann die Session anderer Seiten missbraucht werden!
|
||||
$_SESSION["verify-code"] = $code;
|
||||
$_SESSION["verify-codeFails"] = 0;
|
||||
|
||||
// Email zur Verifizierung
|
||||
$betreff = "Kontosicherheit Ihres VokSpace";
|
||||
$from = "VokSpace";
|
||||
$text = '
|
||||
<html">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Bitte bestätigen Sie Ihr Konto</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body style="background-color: #3d434b;padding: 20px;">
|
||||
<div style="margin-top: 50px;position:relative;overflow:hidden;background-color: #212529;border-radius: 30px;">
|
||||
<div style="width: 50px;float:right;display:block;background-color: rgba(249,130,72,1);height:200px">
|
||||
</div>
|
||||
<div style="width: auto;float:left;display:block;padding:20px">
|
||||
<h2 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:40px">Ihr Code: ' . $code . '</h2>
|
||||
<h5 style="font-family: Arial;color:#fff;margin: 5px 0;font-size:15px">Die Bestätigung Ihrer Identität ist erforderlich, um sicherheitsrelevante Informationen Ihrer Kontos zu ändern.<br>Wenn Ihnen diese Aktivität nicht bekannt vorkommt, ändern Sie bitte SOFORT Ihr Passwort, um Ihr Konto zu schützen.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$header = "MIME-Version: 1.0\r\n";
|
||||
$header .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
|
||||
$header .= "From: VokSpace\r\n";
|
||||
$header .= "Reply-To: tim@timvandenboom.de\r\n";
|
||||
// $header .= "Cc: $cc\r\n"; // falls an CC gesendet werden soll
|
||||
$header .= "X-Mailer: PHP ". phpversion();
|
||||
|
||||
mail($email, $betreff, $text, $header);
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<h2>Identität bestätigen</h2>
|
||||
</div>
|
||||
<div class="center-wrapper">
|
||||
<div class="center">
|
||||
<h4>Aus Sicherheitsgründen ist die Bestätigung Ihrer Identität erforderlich. Geben Sie bitte den an Ihre E-Mail-Adresse versendeten Code ein und bestätigen Sie Ihr Kennwort.</h4>
|
||||
<h4>Der Code wurde an <?php echo $email; ?> gesendet.</h4>
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="number" name="Code" id="verify-code" oninput="checkIfFilled('verify-code')">
|
||||
<span>Ihr Code</span>
|
||||
</div>
|
||||
<p>Sie haben insgesamt drei Versuche<p>
|
||||
<div class="input-wrapper">
|
||||
<input type="password" name="Passwort" id="verify-password" oninput="checkIfFilled('verify-password')">
|
||||
<span>Ihr Passwort</span>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="getContent('action:verify-identity')" class="default-button">Weiter</button>
|
||||
</div>
|
||||
</div>
|
||||
49
temporary/pagecontent/voc-add.php
Normal file
49
temporary/pagecontent/voc-add.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<div class="fixed-title">
|
||||
<h2>
|
||||
<?php
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `id` = '$list'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
echo $articleDb->value;
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="voklist default">
|
||||
<div class="head">
|
||||
<div>Englisch</div>
|
||||
<div>Deutsch</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<form action="#" onsubmit="vokInput('left'); return false;">
|
||||
<input style="margin-right: calc(50%);" placeholder="Englisch" id="vok-input" type="text" />
|
||||
</form>
|
||||
<div style="color: rgba(0,0,0,0)">undefined</div>
|
||||
<div style="color: rgba(0,0,0,0)">undefined</div>
|
||||
</div>
|
||||
<div class="dummy">
|
||||
<div>undefined</div>
|
||||
<div>undefined</div>
|
||||
</div>
|
||||
<div class="template" style="display: none;">
|
||||
<div>undefined</div>
|
||||
<div>undefined</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$sql = "SELECT `value`,`id` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' ORDER BY `create_timestamp` ASC";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
?>
|
||||
<div>
|
||||
<div><form class="vocrow" action="#" onsubmit="getContent('action:vocEditSave','<?php echo $articleDb->id; ?>',''); return false;"><input id="vocedit-1-<?php echo $articleDb->id; ?>" value="<?php echo $voc[0]['1']; ?>" maxlength="30"/></form></div>
|
||||
<div><form class="vocrow" action="#" onsubmit="getContent('action:vocEditSave','<?php echo $articleDb->id; ?>',''); return false;"><input id="vocedit-2-<?php echo $articleDb->id; ?>" value="<?php echo $voc[0]['2']; ?>" maxlength="30"/></form></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
23
temporary/pagecontent/voc-copy.php
Normal file
23
temporary/pagecontent/voc-copy.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
$selected_items = $_SESSION["selected-items"];
|
||||
|
||||
$selected_items = explode("-", $selected_items);
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<h2><?php echo count($selected_items) - 1; ?> Vokabeln kopieren nach</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="text" name="search" id="search_query" oninput="checkIfFilled('search_query');getContent('action:vocCopySearch');">
|
||||
<span>Listen durchsuchen...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="folder-view-wrapper result_query">
|
||||
<h4 align="center">Suchen Sie nach einer Liste.<br>Es werden nur die drei zuletzt verwendeten Listen angezeigt.</h4>
|
||||
</div>
|
||||
</div>
|
||||
65
temporary/pagecontent/voc-delete.php
Normal file
65
temporary/pagecontent/voc-delete.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
$selected_items = $_SESSION["selected-items"];
|
||||
|
||||
$selected_items = explode("-", $selected_items);
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<h2><?php echo count($selected_items) - 1; ?> Vokabeln löschen?</h2>
|
||||
</div>
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="folder-view-wrapper">
|
||||
<h4 align="center">Folgende Elemente werden <u>dauerhaft</u> gelöscht:</h4>
|
||||
</div>
|
||||
<div class="voklist default">
|
||||
<div class="head">
|
||||
<div>Englisch</div>
|
||||
<div>Deutsch</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
||||
foreach($selected_items as $selected_item) {
|
||||
|
||||
if($selected_item != '') {
|
||||
|
||||
// Der Pfad beinhaltet nicht die Sprache, da sie beim Schnellzugriff auf eine Liste übersprungen wurde
|
||||
$sql = "SELECT `value` FROM `VokabelBox2Content` WHERE `type` = 'voc' AND `path` = '$userid/lang/$list/' AND `id` = '$selected_item'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
if(mysql_num_rows($result_articles))
|
||||
{
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
|
||||
?>
|
||||
<div>
|
||||
<div><?php echo $voc[0]['1']; ?></div>
|
||||
<div><?php echo $voc[0]['2']; ?></div></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
die();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="folder-view-wrapper">
|
||||
<br>
|
||||
<h6 align="center">Gelöschte Vokabeln können <u>nicht</u> wiederhergestellt werden!</h6>
|
||||
<h6 align="center">Alternativ können auch gesamte Listen über das Aktionsmenü gelöscht werden.</h6>
|
||||
<br>
|
||||
<div class="form">
|
||||
<button onclick="getContent('action:vocDelete')" class="default-button">dauerhaft Löschen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
23
temporary/pagecontent/voc-move.php
Normal file
23
temporary/pagecontent/voc-move.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
$selected_items = $_SESSION["selected-items"];
|
||||
|
||||
$selected_items = explode("-", $selected_items);
|
||||
|
||||
?>
|
||||
|
||||
<div class="fixed-title">
|
||||
<h2><?php echo count($selected_items) - 1; ?> Vokabeln verschieben nach</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="form">
|
||||
<div class="input-wrapper">
|
||||
<input type="text" name="search" id="search_query" oninput="checkIfFilled('search_query');getContent('action:vocMoveSearch');">
|
||||
<span>Listen durchsuchen...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="folder-view-wrapper result_query">
|
||||
<h4 align="center">Suchen Sie nach einer Liste.<br>Es werden nur die drei zuletzt verwendeten Listen angezeigt.</h4>
|
||||
</div>
|
||||
</div>
|
||||
39
temporary/pagecontent/voc-select.php
Normal file
39
temporary/pagecontent/voc-select.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="fixed-title">
|
||||
<h2><b>0</b> ausgewählt</h2>
|
||||
</div>
|
||||
|
||||
<div class="fixed-title-spacer">
|
||||
<div class="voklist default">
|
||||
<div class="head">
|
||||
<div>Englisch</div>
|
||||
<div>Deutsch</div>
|
||||
</div>
|
||||
<input type="hidden" id="voc-select-display" value="" />
|
||||
<?php
|
||||
|
||||
$sql = "SELECT
|
||||
`value`, `id`
|
||||
FROM
|
||||
`VokabelBox2Content`
|
||||
WHERE
|
||||
`type` = 'voc' AND `path` LIKE '$userid/%/$list/'";
|
||||
$result_articles = mysql_query ($sql, $ezine_db);
|
||||
while ($articleDb = mysql_fetch_object($result_articles))
|
||||
{
|
||||
|
||||
$voc = json_decode($articleDb->value, true);
|
||||
|
||||
$n = intval($voc[0]['progress']) + 1;
|
||||
?>
|
||||
<div onclick="vocSelect(this,'<?php echo $articleDb->id; ?>')">
|
||||
<div><?php echo $voc[0]['1']; ?></div>
|
||||
<div class="progress-indicator"></div>
|
||||
<div><?php echo $voc[0]['2']; ?></div></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user