FIX: DB stuff now more safe and more working, very nice; CHANGE: 'monochrome' color scheme and changed animation

This commit is contained in:
TheShinyMelon 2024-11-18 23:18:36 +01:00
parent ceaa2e18e4
commit 47768831c0
9 changed files with 20 additions and 11 deletions

View File

@ -9,9 +9,16 @@
}
function get_images($pdo, $search='%', $sort='img_date', $sdir='DESC') {
$params = array('search' => $search, 'sort' => $sort, 'sdir' => $sdir);
$stmt = $pdo->prepare("SELECT * FROM images WHERE img_title LIKE CONCAT('%', :search ,'%') ORDER BY :sort :sdir;");
if ($sort != 'img_date' && $sdir != 'ASC') {
if ($sort != 'img_title' && $sdir != 'DESC') {
echo('Ey boss, database request is kinda f*cked up. Maybe you want to try that again, hey...<br>'.$sort.' '.$sdir);
die();
}
}
$params = array('search' => $search);
$stmt = $pdo->prepare("SELECT * FROM images WHERE img_title LIKE CONCAT('%', :search ,'%') ORDER BY $sort $sdir;");
$stmt->execute($params);
// $stmt->debugDumpParams();
$data = $stmt->fetchAll();
$img_list = '<ul class="img_list">';

BIN
project_files/audio-sprite.ase Executable file

Binary file not shown.

2
project_files/ffmpeg_gif.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
ffmpeg -framerate 30 -i frame%04d.png -vf "scale=1319:700:flags=lanczos,split[a][b];[a]palettegen=max_colors=256[p];[b][p]paletteuse" -loop 0 output.gif

View File

@ -17,7 +17,7 @@
include_once('../app/db_connector.php');
if( isset($_POST['sel_order']) && isset($_POST['inp_search']) ) {
$sort = 'date';
$sort = 'img_date';
$sdir = 'DESC';
var_dump($sort, $sdir);
switch($_POST['sel_order']) {
@ -27,11 +27,11 @@
$sdir = 'ASC';
break;
case 'az':
$sort = 'img_name';
$sort = 'img_title';
$sdir = 'ASC';
break;
case 'za':
$sort = 'img_name';
$sort = 'img_title';
break;
default:
break;

View File

@ -11,7 +11,7 @@
<a href='index.php' class='logo_link'>
<div class='logo_group'>
<h1 class='logo_font'>LAYER-</h1>
<img src='./resources/img/8_spinning_30fps.gif' class='logo_gif'>
<img src='./resources/img/8_spinning_30fps_bw.gif' class='logo_gif'>
</div>
</a>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

View File

@ -42,7 +42,7 @@ footer {
}
.logo_font {
color: #BFBFBF;
color: #FFF;
font-family: 'hyper';
font-size: 6rem;
text-shadow: 0 1px 0 #17202A, 0 2px 0 #17202A,
@ -88,21 +88,21 @@ footer {
.menu_bar li a {
text-decoration: none;
color: #BFBFBF;
color: #FFF;
}
.menu_bar li a:hover {
text-decoration: underline;
text-decoration-thickness: 5px;
text-decoration-color: #f3a041;
color: white;
color: #FFF;
}
.menu_bar li a:active {
text-decoration: underline;
text-decoration-thickness: 6px;
text-decoration-color: #41a3f3;
color: #BFBFBF;
color: #FFF;
}
.img_list {
@ -123,7 +123,7 @@ footer {
font-size: 2rem;
padding-left: 2rem;
padding-bottom: 3rem;
color: #BFBFBF;
color: #FFF;
}
.pixelart {