././../assets/page/
is a relative path. Here's how each part breaks down:
.
= current directory./
= still the current directory (redundant but valid)../
= go up one directory levelassets/page/
= descend into the assets/page
folder././../assets/page/
is logically equivalent to ../assets/page/
.
project/ ├── index.html ├── about/ │ └── team.html └── assets/ └── page/ └── logo_transformed.svgFrom
about/team.html
, the file logo_transformed.svg
can be referenced using:
<link rel="icon" href="././../assets/page/logo_transformed.svg" sizes="35x35" type="image/x-icon">
././
is valid, it’s usually cleaner to simplify paths when possible. So you might prefer:
<link rel="icon" href="../assets/page/logo_transformed.svg" ... >
/uploads
directory are deleted. If the directory is missing, this is detected and handled with a detailed warning.assets/page/hero.webp
) is checked and deleted if it exists. Failure to delete it is logged and shown as a warning.type=success|warning|error
), allowing for detailed user feedback.reset-log.txt
) with a timestamp, username (if available), and IP address..webp
, a modern image format that offers superior compression compared to JPG and PNG — often cutting file size by 25–35% without visible quality loss..webp
because it's smart — it keeps quality high but size low.mysqli_prepare()
with bind_param()
to prevent SQL injection.label
GET parameter:
label
is set and not "F"
: selects exact match using WHERE art_tag = ?
.label
is "F"
or not set: selects art_tag = 'F'
but excludes known unwanted tags (e.g. A
–E
) using NOT IN (?, ?, ...)
.NOT IN
clause is generated dynamically based on a PHP array, allowing flexible filtering without hardcoding.ORDER BY art_sort ASC|DESC
or ORDER BY RAND()
while avoiding injection by validating values server-side.$stmt->bind_param()
with dynamically generated type strings.?label=F
), the system safely chooses what data to show — no chance of unsafe database access.max-width: 600px
)..open
class to show or hide the nav. Positioning adjusted via left
, width
, and transform: none !important
to align properly below the icon.active
class to the current link, styled with a light background and underline on both desktop and mobile.$_SESSION["debug"]
is set).z-index
stacks correctly. Drop shadows added for readability./uploads
are deleted. Missing directories are handled with warnings.assets/page/hero.webp
) is deleted if present. Errors are logged.reset-log.txt
with time, user (if available), and IP address.enctype="multipart/form-data"
and styled buttons..webp
format, max ~*MB (dynamic size display).* (set in config)hero.webp
. ** (set in config)?v=timestamp
) to force reload.window.location.pathname
for reset without keeping old form data or alerts.
This module provides a clean, accessible, and modern image upload interface. Users get live feedback, developers get controlled input, and PHP handles final validation, resizing, and display. Smart caching and UI feedback make it seamless. This structure is great for hero/header image handling or profile uploads where control and preview are important.