Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
apisub
Commits
266e862f
Commit
266e862f
authored
Nov 06, 2018
by
Stephane Crozat
Browse files
Ajout affichage date de début et de fin des Api auxquelles on est inscrit)
parent
ad4c56e1
Changes
2
Show whitespace changes
Inline
Side-by-side
lib/db.php
View file @
266e862f
...
@@ -30,7 +30,6 @@ class DB {
...
@@ -30,7 +30,6 @@ class DB {
$sql
=
"SELECT *
$sql
=
"SELECT *
FROM vsubscription
FROM vsubscription
WHERE utclogin='"
.
$utclogin
.
"'"
;
WHERE utclogin='"
.
$utclogin
.
"'"
;
echo
$sql
;
$st
=
$this
->
conn
->
prepare
(
$sql
);
$st
=
$this
->
conn
->
prepare
(
$sql
);
$st
->
execute
();
$st
->
execute
();
$res
=
$st
->
fetchAll
(
PDO
::
FETCH_ASSOC
);
$res
=
$st
->
fetchAll
(
PDO
::
FETCH_ASSOC
);
...
@@ -42,7 +41,7 @@ class DB {
...
@@ -42,7 +41,7 @@ class DB {
foreach
(
$res
as
$row
)
{
foreach
(
$res
as
$row
)
{
echo
'<p>'
;
echo
'<p>'
;
echo
' <a href="index.php?action=unsub&api='
.
$row
[
'code'
]
.
'&utclogin='
.
$utclogin
.
'">[désinscription]</a> '
;
echo
' <a href="index.php?action=unsub&api='
.
$row
[
'code'
]
.
'&utclogin='
.
$utclogin
.
'">[désinscription]</a> '
;
echo
$row
[
'code'
]
.
"-"
.
$row
[
'name'
]
.
" ("
.
$row
[
'semester'
]
.
$row
[
'year'
]
.
"
) [
le "
.
$row
[
'subdate'
]
.
"]"
;
echo
$row
[
'code'
]
.
"-"
.
$row
[
'name'
]
.
" ("
.
$row
[
'semester'
]
.
$row
[
'year'
]
.
"
, du "
.
$row
[
'dbegin'
]
.
" au "
.
$row
[
'dend'
]
.
") [inscrit
le "
.
$row
[
'subdate'
]
.
"]"
;
echo
'</p>'
;
echo
'</p>'
;
}
}
}
}
...
...
sql/apisub.sql
View file @
266e862f
...
@@ -34,7 +34,7 @@ INSERT INTO subscribe VALUES (
...
@@ -34,7 +34,7 @@ INSERT INTO subscribe VALUES (
);
);
CREATE
OR
REPLACE
VIEW
vApi
AS
CREATE
OR
REPLACE
VIEW
vApi
AS
SELECT
ap
.
code
,
ap
.
name
,
ap
.
year
,
ap
.
semester
,
TO_CHAR
(
ap
.
dbegin
,
'TM
D
ay FMDD TM
M
onth'
)
AS
dbegin
,
TO_CHAR
(
ap
.
dend
,
'TM
D
ay FMDD TM
M
onth'
)
AS
dend
SELECT
ap
.
code
,
ap
.
name
,
ap
.
year
,
ap
.
semester
,
TO_CHAR
(
ap
.
dbegin
,
'TM
d
ay FMDD TM
m
onth'
)
AS
dbegin
,
TO_CHAR
(
ap
.
dend
,
'TM
d
ay FMDD TM
m
onth'
)
AS
dend
FROM
api
ap
FROM
api
ap
ORDER
BY
ap
.
year
,
ap
.
semester
,
ap
.
dbegin
,
ap
.
dend
,
ap
.
code
;
ORDER
BY
ap
.
year
,
ap
.
semester
,
ap
.
dbegin
,
ap
.
dend
,
ap
.
code
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment