23f834de71
* update dependencies * Add support for resetting variables to a `NULL` value using `SET`. Previously, storing `NULL` in a variable would store the string `'null'` instead of the `NULL` value.
12 lines
510 B
SQL
12 lines
510 B
SQL
SET username = (SELECT username FROM login_session WHERE id = sqlpage.cookie('session'));
|
|
|
|
SELECT 'redirect' AS component,
|
|
'signin.sql?error' AS link
|
|
WHERE $username IS NULL;
|
|
|
|
SELECT 'shell' AS component, 'Protected page' AS title, 'lock' AS icon, '/' AS link, 'logout' AS menu_item;
|
|
|
|
SELECT 'text' AS component,
|
|
'Welcome, ' || $username || ' !' AS title,
|
|
'This content is [top secret](https://youtu.be/dQw4w9WgXcQ).
|
|
You cannot view it if you are not connected.' AS contents_md; |