Files
vokspace/share.php
2026-01-02 21:00:45 +01:00

194 lines
7.8 KiB
PHP

<?php session_start();
$sitename = 'search';
?>
<!DOCTYPE html>
<html>
<head>
<title>VokabelBox</title>
<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>
<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 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 &ouml;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>
<form id='window-layer-2'>
</form>
<?php
require "files/ezine_db.inc.php";
$_SESSION["showNoLoginInfo"] = 'true';
include "files/loginscript.inc.php";
$folderID = strip_tags(htmlentities($_GET["id"]));
if($folderID == '') {
$folderID = strip_tags(htmlentities($_GET["folderID"]));
}
$_SESSION["import-from"] = $folderID;
print(
" <form action='actions/add-vokab' method='post' id='window-4' class='window'>
<select name='import-to'>
<option disabled>---Bitte Ordner waehlen---</option>
<option disabled></option>
");
$sql = "SELECT DISTINCT `Ordner`,`ID` FROM `VokabelBoxVokabeln` WHERE `Nutzername` = '$Benutzername' AND `Ordner` != ''";
$result_articles = $conn->query($sql);
if(!mysqli_num_rows($result_articles))
{
print(
" <option disabled>---Keine Ordner gefunden---</option>");
}
else {
while ($articleDb = mysqli_fetch_object($result_articles)) {
print(
" <option selected value='$articleDb->ID'>$articleDb->Ordner</option>
");
}
}
print(
" <option disabled></option>
<option value='NEWFOLDER-SHARE'>(Oder: neuen Ordner erstellen)</option>
</select>
<br>
<button type='submit' class='classic-button classic-button-grey'><i class='fas fa-file-download'></i> Importieren</button>
</form>
");
?>
<main id='main'>
<div class="middle">
<?php
include "files/errorcodesscript.inc.php";
if($LoggedIn == 'false') {
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `ID` = '$folderID' AND `Sprache1` = ''";
$result_articles = $conn->query($sql);
while ($articleDb = mysqli_fetch_object($result_articles)) {
$folderTEXT = $articleDb->Ordner;
$Nutzername = $articleDb->Nutzername;
}
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `ID` = '$folderID' AND `Sprache1` != ''";
$result_articles = $conn->query($sql);
if(!mysqli_num_rows($result_articles))
{
print("Der Ordner beinhaltet keine Vokabeln...");
}
else {
print(
" <h2>$folderTEXT</h2>
<p>von $Nutzername</p>
<table class='vok-table'>
<tr>
<td><b>Sprache 1</b></td>
<td><b>Sprache 2</b></td>
</tr>
");
while ($articleDb = mysqli_fetch_object($result_articles)) {
print(
" <tr>
<td>$articleDb->Sprache1</td>
<td>$articleDb->Sprache2</td>
</tr>
");
}
print(
" </table>
<button onclick=\"alert('Um den Ordner zu deinen Vokabeln hinzuzufuegen, melde dich bitte an.')\" class='classic-button classic-button-light-grey'><i class='fas fa-file-download'></i> Importieren</button>
<p>Um den Ordner zu deinen Vokabeln hinzuzuf&uuml;gen, <a href='login?forward=share?id=$folderID'>melde dich bitte an</a>.</p>
");
}
}
if($LoggedIn == 'true') {
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `ID` = '$folderID' AND `Sprache1` = ''";
$result_articles = $conn->query($sql);
while ($articleDb = mysqli_fetch_object($result_articles)) {
$folderTEXT = $articleDb->Ordner;
$Nutzername = $articleDb->Nutzername;
}
$sql = "SELECT * FROM `VokabelBoxVokabeln` WHERE `ID` = '$folderID' AND `Sprache1` != ''";
$result_articles = $conn->query($sql);
if(!mysqli_num_rows($result_articles))
{
print("Der Ordner beinhaltet keine Vokabeln...");
}
else {
print(
" <h2><b>$folderTEXT</b></h2>
<p>von $Nutzername</p>
<table class='vok-table'>
<tr>
<td><b>Sprache 1</b></td>
<td><b>Sprache 2</b></td>
</tr>
");
while ($articleDb = mysqli_fetch_object($result_articles)) {
print(
" <tr>
<td>$articleDb->Sprache1</td>
<td>$articleDb->Sprache2</td>
</tr>
");
}
print(
" </table>
<button onclick=\"openWindow(4)\" class='classic-button classic-button-grey'><i class='fas fa-file-download'></i> Importieren</button>
");
}
}
?>
</div>
<a class="no-formatting impressum" href="https://www.timvandenboom.de/impressum">Impressum</a>
</main>
<a id="back-arrow-window" class="fas fa-arrow-left back no-formatting" onclick="closeWindow(2)"></a>
<a id='back-arrow'></a>
</body>
</html>