Initial commit
This commit is contained in:
568
index.php
Normal file
568
index.php
Normal file
@@ -0,0 +1,568 @@
|
||||
<?php session_start();
|
||||
|
||||
$sitename = 'index';
|
||||
|
||||
// Ordner-ID holen (alternativ aus der Session)
|
||||
$folderID = strip_tags(htmlentities($_GET["folderID"]));
|
||||
if($_GET["folderID"] != '') {
|
||||
$_SESSION["folderID"] = $folderID;
|
||||
}
|
||||
|
||||
// Lernsession zuruecksetzen
|
||||
unset($_SESSION["vokGroup1"]);
|
||||
unset($_SESSION["vokGroup2"]);
|
||||
unset($_SESSION["vokGroup3"]);
|
||||
unset($_SESSION["remain"]);
|
||||
unset($_SESSION["total"]);
|
||||
unset($_SESSION["true"]);
|
||||
unset($_SESSION["false"]);
|
||||
unset($_SESSION["action"]);
|
||||
unset($_SESSION["trainFirstTime"]);
|
||||
|
||||
// Teilen-Link erstellen
|
||||
$url = 'https://www.timvandenboom.de/vokabelbox/share?id=' . $folderID;
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
if($folderID != '') {
|
||||
?>
|
||||
<title>Ordner <?php print("$folderID"); ?> | Vokabelbox</title>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<title>Vokabelbox</title>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="files/style.css" />
|
||||
<script language="javascript" type="text/javascript" src="files/scripts.js"></script>
|
||||
<meta name="google-site-verification" content="zP1CNCQcUP1lr3cYAUMljl5D-GqiUphk-1NdrFS5g6g" />
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://www.timvandenboom.de/Favicons/VokabelBox/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="https://www.timvandenboom.de/Favicons/VokabelBox/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="https://www.timvandenboom.de/Favicons/VokabelBox/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="https://www.timvandenboom.de/Favicons/VokabelBox/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="https://www.timvandenboom.de/Favicons/VokabelBox/favicon-16x16.png">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="https://www.timvandenboom.de/Favicons/VokabelBox/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
<body>
|
||||
<div id='window-1' class="window">
|
||||
<input type='text' disabled value='<?php print("https://www.timvandenboom.de/vokabelbox/share?id=$folderID"); ?>'>
|
||||
<button onclick="copyLink('<?php print("https://www.timvandenboom.de/vokabelbox/share?id=$folderID"); ?>')" class='classic-button classic-button-grey'>
|
||||
<i class='fas fa-copy'> </i>
|
||||
Kopieren
|
||||
</button>
|
||||
<h2>ODER</h2>
|
||||
<h4>In die Bibliothek laden</h4>
|
||||
<button onclick="window.location.href='publish'" class='classic-button classic-button-grey'>
|
||||
<i class='fas fa-users'> </i>
|
||||
Freigeben
|
||||
</button>
|
||||
</div>
|
||||
<form action='learn' method='post' id='window-2' class="window">
|
||||
<p>Anzahl Vokabeln</p>
|
||||
<input type='number' value='20' step='5' name='number'>
|
||||
<p>Vokabeln auswählen</p>
|
||||
<input type='checkbox' name='vok-group-1' checked>
|
||||
<input type='checkbox' name='vok-group-2' checked>
|
||||
<input type='checkbox' name='vok-group-3' checked>
|
||||
<br>
|
||||
<button type='submit' class='classic-button classic-button-grey'>
|
||||
Starten
|
||||
<i class='fas fa-angle-right'> </i>
|
||||
</button>
|
||||
</form>
|
||||
<div id='window-3' class="window">
|
||||
<?php /* <button onclick="window.location.href='?action=select'" class='classic-button classic-button-grey'>
|
||||
<i class='fas fa-check-square'> </i>
|
||||
Auswählen
|
||||
</button>
|
||||
*/ ?>
|
||||
<button onclick="window.open('print','_blank');" class='classic-button classic-button-grey'>
|
||||
<i class='fas fa-print'> </i>
|
||||
Drucken
|
||||
</button>
|
||||
<button onclick="closeWindow(1),openWindow(1)" class='classic-button classic-button-grey'>
|
||||
<i class='fas fa-share'> </i>
|
||||
Teilen
|
||||
</button>
|
||||
<button onclick="window.location.href='export'" class='classic-button classic-button-grey'>
|
||||
<i class='fas fa-upload'> </i>
|
||||
Exportieren
|
||||
</button>
|
||||
<h4><a href='help/import-export'>Hilfe</a></h4>
|
||||
</div>
|
||||
<header>
|
||||
<p onclick="window.location.href='index'"></p>
|
||||
<div class="more-menu">
|
||||
<button class="fas fa-ellipsis-v"></button>
|
||||
<div class="more-menu-content">
|
||||
<div class="selected" onclick="window.location.href='index'" title="VokabelBox"><i class="fas fa-home"></i>VokabelBox</div>
|
||||
<div onclick="window.location.href='myaccount'" title="Mein Account"><i class="far fa-user-circle"></i>Mein Account</div>
|
||||
<div onclick="window.location.href='marks'" title="Meine Noten"><i class="fas fa-table"></i>Meine Noten</div>
|
||||
<div onclick="window.location.href='search'" title="Meine VokabelBox durchsuchen"><i class="fas fa-search"></i>Suchen</div>
|
||||
<div onclick="window.location.href='help'" title="Hilfecenter öffnen"><i class="fas fa-question-circle"></i>Hilfe</div>
|
||||
<div onclick="window.location.href='actions/logout'" title="Von VokabelBox abmelden"><i class="fas fa-sign-out-alt"></i>Ausloggen</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main id="main">
|
||||
<div class="middle">
|
||||
<?php
|
||||
|
||||
require "files/ezine_db.inc.php";
|
||||
|
||||
|
||||
include "files/loginscript.inc.php";
|
||||
|
||||
include "files/errorcodesscript.inc.php";
|
||||
|
||||
if($LoggedIn == 'true') {
|
||||
// Vokabeln der aktuellen Lernsession zuruecksetzen
|
||||
$conn->query("UPDATE `VokabelBoxVokabeln` SET `Session` = '0' WHERE (`Nutzername` = '$Benutzername')");
|
||||
$action = strip_tags(htmlentities($_GET["action"]));
|
||||
$number_rows = strip_tags(htmlentities($_GET["number-rows"]));
|
||||
// Alle Actions abfragen um bei "else" den normalen Ordner abzufragen
|
||||
if($action == 'add-folder' || $action == 'delete-folder' || $action == 'add-vokab' || $action == 'edit-folder'/* || $action == 'select'*/) {
|
||||
$folderID = $_SESSION["folderID"];
|
||||
$_SESSION["folderID"] = $folderID;
|
||||
if($action == 'add-folder') {
|
||||
$forwarding = strip_tags(htmlentities($_GET["forwarding"]));
|
||||
$add_from = strip_tags(htmlentities($_GET["folderID"]));
|
||||
// Schauen, ob Nutzer von anderer Seiote kommt um Ordner zu erstellen
|
||||
if($forwarding == 'share-import' || $forwarding == 'library-import' && isset($add_from)) {
|
||||
$_SESSION["forwarding"] = $forwarding;
|
||||
$_SESSION["add-from"] = $add_from;
|
||||
if($forwarding == 'share-import') {
|
||||
$arrow_nav = 'share?id=' . $add_from;
|
||||
}
|
||||
if($forwarding == 'library-import') {
|
||||
$arrow_nav = 'library?id=' . $add_from;
|
||||
}
|
||||
?>
|
||||
<form action="actions/add-folder" method="post">
|
||||
<input type="text" autofocus required name="folderTEXT" maxlength="30" placeholder="Ordnername"><br>
|
||||
<button class="classic-button classic-button-grey" type="ubmit">
|
||||
<i class="fas fa-angle-right"> </i>
|
||||
Erstellen
|
||||
</button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
// Normales Ordner-Erstellen
|
||||
else {
|
||||
$arrow_nav = 'index';
|
||||
?>
|
||||
<form action="actions/add-folder" method="post">
|
||||
<input type="text" autofocus required name="folderTEXT" maxlength="30" placeholder="Ordnername"><br>
|
||||
<button class="classic-button classic-button-grey" type="ubmit">
|
||||
<i class="fas fa-angle-right"> </i>
|
||||
Erstellen
|
||||
</button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if($action == 'delete-folder') {
|
||||
$arrow_nav = '?action=edit-folder';
|
||||
$_SESSION["redirect"] = 'index';
|
||||
// Ordnername abfragen
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` = ''";
|
||||
$result_articles = $conn->query($sql);
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
$folderTEXT = $articleDb->Ordner;
|
||||
}
|
||||
?>
|
||||
<h2>Bist du dir sicher? Es werden alle Vokabeln mitgelöscht!</h2>
|
||||
<p>Ordnername: <b><?php print("$folderTEXT"); ?></b></p>
|
||||
<form action="actions/delete-folder" method="post">
|
||||
<input value="Löschen" class="classic-button classic-button-red" type="submit">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
if($action == 'add-vokab') {
|
||||
$arrow_nav = '?action=edit-folder';
|
||||
$_SESSION["redirect"] = 'index';
|
||||
// Ordnername abfragen
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` = ''";
|
||||
$result_articles = $conn->query($sql);
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
$folderTEXT = $articleDb->Ordner;
|
||||
}
|
||||
if($number_rows == '') {
|
||||
$number_rows = '10';
|
||||
}
|
||||
if($number_rows <= '0' || $number_rows > '100' && $number_rows < '500') {
|
||||
print("<script> alert('Ungueltiger Wert.'); </script>");
|
||||
print("<meta http-equiv='refresh' content='0; URL=index?action=add-vokab&number-rows=10'>");
|
||||
}
|
||||
else {
|
||||
if($number_rows >= '500') {
|
||||
print("<script> alert('Sach mal, willst du, dass mir der Server abraucht?!'); </script>");
|
||||
print("<meta http-equiv='refresh' content='0; URL=index?action=add-vokab&number-rows=10'>");
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<p>Ordner: <b><?php print("$folderTEXT"); ?></b></p>
|
||||
<p>Anzahl Reihen:</p>
|
||||
<form action="index" method="get">
|
||||
<input type="hidden" name="action" value="add-vokab">
|
||||
<input type="number" value="<?php print("$number_rows"); ?>" step="5" max="100" min="0" name="number-rows">
|
||||
<button type="submit">Übernehmen</button>
|
||||
</form>
|
||||
<p><i class="fas fa-exclamation-triangle"> </i>Vorsicht! Es werden alle Einträge entfernt!</p>
|
||||
<form action="actions/add-vokab" method="post">
|
||||
<input type="hidden" name="number-rows" value="<?php print("$number_rows"); ?>">
|
||||
<table class="vok-table">
|
||||
<tr>
|
||||
<td><b>Muttersprache</b></td>
|
||||
<td><b>Sprache 2</b></td>
|
||||
</tr>
|
||||
<?php
|
||||
while($number_rows > '0') {
|
||||
?>
|
||||
<tr>
|
||||
<td><input maxlength="100" type="text" name="Vok<?php print("$number_rows-1"); ?>"></td>
|
||||
<td><input maxlength="100" type="text" name="Vok<?php print("$number_rows-2"); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
$number_rows = $number_rows - 1;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<p>Nur vollständige Zeilen werden hinzugefügt.</p>
|
||||
<button type="submit" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-plus"> </i>
|
||||
Hinzufügen
|
||||
</button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
if($action == 'edit-folder') {
|
||||
|
||||
$arrow_nav = '?folderID=' . $folderID;
|
||||
|
||||
$_SESSION["redirect"] = 'index';
|
||||
// Ordnername abfragen
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` = ''";
|
||||
$result_articles = $conn->query($sql);
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
$folderTEXT = $articleDb->Ordner;
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` != ''";
|
||||
|
||||
$result_articles = $conn->query($sql);
|
||||
|
||||
// Wenn Ordner leer ist
|
||||
if(!mysqli_num_rows($result_articles))
|
||||
{
|
||||
// Damit "edit-folder" keinen Fehler ausgibt
|
||||
$_SESSION["gesamtAnzahl"] = '1';
|
||||
?>
|
||||
<button onclick="window.location.href='index?action=delete-folder&folderID=<?php print("$folderID"); ?>'" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-trash"> </i>
|
||||
Löschen
|
||||
</button>
|
||||
<br>
|
||||
<form method="post" action="actions/edit-folder">
|
||||
<input maxlength="30" type="text" value="<?php print("$folderTEXT"); ?>" name="folderTEXT">
|
||||
<button type="submit" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-save"> </i>
|
||||
Speichern
|
||||
</button>
|
||||
</form>
|
||||
<button onclick="window.location.href='index?action=add-vokab'" class="classic-button classic-button-grey">
|
||||
Neue Vokabeln
|
||||
<i class="fas fa-plus"> </i>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
// Wenn Ordner Vokabeln enthaelt
|
||||
else {
|
||||
// Damit "edit-folder" weiß, wie viele Felder es abarbeiten muss
|
||||
$gesamt_anzahl = mysqli_num_rows($result_articles);
|
||||
$_SESSION["gesamtAnzahl"] = $gesamt_anzahl;
|
||||
$count = 0;
|
||||
?>
|
||||
<button onclick="window.location.href='index?action=delete-folder&folderID=<?php print("$folderID"); ?>'" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-trash"> </i>
|
||||
Löschen
|
||||
</button>
|
||||
<br>
|
||||
<form method="post" action="actions/edit-folder">
|
||||
<input maxlength="30" type="text" value="<?php print("$folderTEXT"); ?>" name="folderTEXT">
|
||||
<button type="submit" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-save"> </i>
|
||||
Speichern
|
||||
</button>
|
||||
<br>
|
||||
<table class="vok-table">
|
||||
<tr>
|
||||
<td><b>Sprache 1</b></td>
|
||||
<td><b>Sprache 2</b></td>
|
||||
</tr>
|
||||
<?php
|
||||
// Vokabeln mit ID's versehen
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
$count = $count + 1;
|
||||
?>
|
||||
<tr>
|
||||
<td><input maxlength="100" type="text" value="<?php print("$articleDb->Sprache1"); ?>" name="<?php print("Vok$count-1"); ?>"></td>
|
||||
<td><input maxlength="100" type="text" value="<?php print("$articleDb->Sprache2"); ?>" name="<?php print("Vok$count-2"); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<p>Zeile leer lassen, um sie zu entfernen.</p>
|
||||
</form>
|
||||
<button onclick="window.location.href='index?action=add-vokab'" class="classic-button classic-button-grey">
|
||||
Neue Vokabeln
|
||||
<i class="fas fa-plus"> </i>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
// Select ist noch nicht fertig. Wichtig: Oben im "action-Verzteichnis" select wegkommentieren!
|
||||
/*
|
||||
if($action == 'select') {
|
||||
|
||||
$arrow_nav = '?folderID=' . $folderID;
|
||||
|
||||
$_SESSION["redirect"] = 'index';
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` = ''";
|
||||
|
||||
$result_articles = $conn->query($sql);
|
||||
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
$folderTEXT = $articleDb->Ordner;
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` != ''";
|
||||
|
||||
$result_articles = $conn->query($sql);
|
||||
|
||||
|
||||
if(!mysqli_num_rows($result_articles))
|
||||
{
|
||||
?>
|
||||
<p>Der Ordner ist leer. Daher können auch keine Vokabeln ausgewählt werden.</p>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
|
||||
$gesamt_anzahl = mysqli_num_rows($result_articles);
|
||||
$_SESSION["gesamtAnzahl"] = $gesamt_anzahl;
|
||||
?>
|
||||
<form method="post" action="actions/edit-folder">
|
||||
<br>
|
||||
<table class="vok-table">
|
||||
<tr>
|
||||
<td><b>Sprache 1</b></td>
|
||||
<td><b>Sprache 2</b></td>
|
||||
</tr>
|
||||
<?php
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php print("$articleDb->Sprache1"); ?></td>
|
||||
<td><?php print("$articleDb->Sprache2"); ?><input type="checkbox" name="<?php print("Vok$count"); ?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<button onclick="window.location.href='actions/select'" class="classic-button classic-button-grey">
|
||||
Weiter
|
||||
<i class="fas fa-angle-right"> </i>
|
||||
</button>
|
||||
</form>
|
||||
<p>Wähle Vokabeln aus, um Aktionen durchzuführen</p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ab hier Actions abgearbeitet!
|
||||
// Jetzt kommen normale Ordnerabfragen
|
||||
|
||||
|
||||
else {
|
||||
$_SESSION["redirect"] = 'index';
|
||||
if($folderID == '') {
|
||||
|
||||
|
||||
$sql = "SELECT DISTINCT `ID`,`Ordner`,`Public` FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `Sprache1` = ''";
|
||||
|
||||
$result_articles = $conn->query($sql);
|
||||
|
||||
if(!mysqli_num_rows($result_articles))
|
||||
{
|
||||
?>
|
||||
<p>Du hast keinen Ordner</p>
|
||||
<button onclick="window.location.href='library'" class="classic-button classic-button-grey">
|
||||
<i class='fas fa-book'> </i>
|
||||
Bibliothek
|
||||
</button>
|
||||
<button onclick="window.location.href='index?action=add-folder'" class="classic-button classic-button-grey">
|
||||
<i class='fas fa-plus'> </i>
|
||||
Neuer Ordner
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
?>
|
||||
<div class="vok-folder" onclick="window.location.href='index?folderID=<?php print("$articleDb->ID"); ?>'">
|
||||
<span><?php print("$articleDb->Ordner"); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?> <button onclick="window.location.href='library'" class="classic-button classic-button-grey">
|
||||
<i class='fas fa-book'> </i>
|
||||
Bibliothek
|
||||
</button>
|
||||
<button onclick="window.location.href='index?action=add-folder'" class="classic-button classic-button-grey">
|
||||
<i class='fas fa-plus'> </i>
|
||||
Neuer Ordner
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if($folderID != '') {
|
||||
|
||||
$arrow_nav = 'index';
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` = ''";
|
||||
|
||||
$result_articles = $conn->query($sql);
|
||||
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
$folderTEXT = $articleDb->Ordner;
|
||||
$Public = $articleDb->Public;
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `ID` = '$folderID' AND `Sprache1` != ''";
|
||||
|
||||
$result_articles = $conn->query($sql);
|
||||
|
||||
if(!mysqli_num_rows($result_articles))
|
||||
{
|
||||
?>
|
||||
<h2><?php print("$folderTEXT"); ?></h2>
|
||||
<p><i>Leerer Ordner</i></p>
|
||||
<button onclick="window.location.href='index?action=edit-folder'" class="classic-button classic-button-grey">
|
||||
<i class='fas fa-pen'> </i>
|
||||
Bearbeiten
|
||||
</button>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
$gesamt_anzahl = mysqli_num_rows($result_articles);
|
||||
$_SESSION["folderID"] = $folderID;
|
||||
$_SESSION["true"] = '0';
|
||||
$_SESSION["false"] = '0';
|
||||
$_SESSION["action"] = '0';
|
||||
if($Public == '1') {
|
||||
?>
|
||||
<h2><?php print("$folderTEXT"); ?> <sup><i title="Dieser Ordner wird freigegeben" class="fas fa-users"></i></sup></h2>
|
||||
<button onclick="window.location.href='actions/edit-folder?savechange=turnoff-publish'" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-user-slash"> </i>
|
||||
Aufheben
|
||||
</button><br>
|
||||
<button onclick="window.location.href='index?action=edit-folder'" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-pen"> </i>
|
||||
Bearbeiten
|
||||
</button>
|
||||
<button onclick="openWindow(2)" class="classic-button classic-button-grey">
|
||||
Lernen
|
||||
<i class="fas fa-angle-right"> </i>
|
||||
</button>
|
||||
<table class="vok-table">
|
||||
<tr>
|
||||
<td><b>Sprache 1</b></td>
|
||||
<td><b>Sprache 2</b></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
?> <h2><?php print("$folderTEXT"); ?></h2>
|
||||
<button onclick="window.location.href='index?action=edit-folder'" class="classic-button classic-button-grey">
|
||||
<i class="fas fa-pen"> </i>
|
||||
Bearbeiten
|
||||
</button>
|
||||
<button onclick="openWindow(2)" class="classic-button classic-button-grey">
|
||||
Lernen
|
||||
<i class="fas fa-angle-right"> </i>
|
||||
</button>
|
||||
<table class="vok-table">
|
||||
<tr>
|
||||
<td><b>Sprache 1</b></td>
|
||||
<td><b>Sprache 2</b></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
while ($articleDb = mysqli_fetch_object($result_articles)) {
|
||||
if($articleDb->Lernfortschritt <= '3') {
|
||||
$progress_dot = '1';
|
||||
}
|
||||
if($articleDb->Lernfortschritt > '3' && $articleDb->Lernfortschritt <= '5') {
|
||||
$progress_dot = '2';
|
||||
}
|
||||
if($articleDb->Lernfortschritt > '5') {
|
||||
$progress_dot = '3';
|
||||
}
|
||||
?> <tr class="progress-<?php print("$progress_dot"); ?>">
|
||||
<td><?php print("$articleDb->Sprache1"); ?></td>
|
||||
<td><?php print("$articleDb->Sprache2"); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<button onclick="openWindow(3)" class="classic-button classic-button-grey">
|
||||
Mehr
|
||||
<i class="fas fa-ellipsis-h"> </i>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p class="impressum"><a class="no-formatting" href="https://www.timvandenboom.de/impressum">Impressum</a><p>
|
||||
</div>
|
||||
</main>
|
||||
<a id="back-arrow-window" class="fas fa-arrow-left back no-formatting" onclick="closeWindow(1)"></a>
|
||||
<?php
|
||||
if($LoggedIn == 'true' && isset($arrow_nav)) {
|
||||
?>
|
||||
<a id="back-arrow" class="fas fa-arrow-left back no-formatting" href="<?php print("$arrow_nav"); ?>"></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user