Files
vokspace/temporary/pagecontent/lang.php
2026-01-02 21:08:58 +01:00

79 lines
2.8 KiB
PHP

<?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>