-
Notifications
You must be signed in to change notification settings - Fork 3
/
create_user_import_message.sql
48 lines (42 loc) · 1.3 KB
/
create_user_import_message.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
SELECT 'redirect' AS component,
'signin.sql?error' AS link
WHERE NOT EXISTS (SELECT 1 FROM login_session WHERE id=sqlpage.cookie('session'));
SET group_id = (SELECT user_info.groupe FROM login_session join user_info on user_info.username=login_session.username WHERE id = sqlpage.cookie('session'));
SELECT 'redirect' AS component,
'index.sql?restriction' AS link
WHERE $group_id<>'4';
--Menu
SELECT 'dynamic' AS component, sqlpage.read_file_as_text('menu.json') AS properties;
-- Bilan
SELECT
'alert' as component,
'Bilan de l''importation' as title,
'Bilan : '||$imp||' comptes ont été importés sur '||$up||' dans le fichier envoyé.' as description,
CASE WHEN $imp=$up
THEN 'check'
ELSE 'alert-circle'
END as icon,
CASE WHEN $imp=$up
THEN 'green'
ELSE 'red'
END as color;
--Bouton retour
select
'button' as component,
'sm' as size,
'pill' as shape;
select
'Importation' as title,
'comptes_import.sql' as link,
'arrow-back-up' as icon,
'red' as outline;
select
'Liste des Comptes' as title,
'comptes.sql' as link,
'arrow-back-up' as icon,
'green' as outline;
select
'Tableau de bord' as title,
'parametres.sql?tab=Comptes' as link,
'arrow-back-up' as icon,
'green' as outline;