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
d08e596d
Commit
d08e596d
authored
Nov 15, 2018
by
Stephane Crozat
Browse files
Fix
#1
parent
205ac5a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/views.php
View file @
d08e596d
...
...
@@ -14,7 +14,11 @@ class Views {
}
public
static
function
printUser
(
$utclogin
,
$surname
,
$firstname
)
{
echo
'<p><i>'
.
$firstname
.
' '
.
$surname
.
'</i> (<b>'
.
$utclogin
.
'</b>)</p>'
;
echo
'<p><i>'
.
$firstname
.
' '
.
$surname
.
'</i> (<b>'
.
$utclogin
.
'</b>)</p>'
;
}
private
static
function
printApi
(
$row
)
{
return
$row
[
'normcode'
]
.
' - '
.
$row
[
'name'
]
.
' (du '
.
$row
[
'dbegin'
]
.
' au '
.
$row
[
'dend'
]
.
')'
;
}
public
static
function
printSubList
(
$list
,
$utclogin
)
{
...
...
@@ -23,7 +27,8 @@ class Views {
foreach
(
$list
as
$row
)
{
echo
'<p>'
;
echo
' <a href="index.php?action=unsub&api='
.
$row
[
'code'
]
.
'&utclogin='
.
$utclogin
.
'">[désinscription]</a> '
;
echo
$row
[
'code'
]
.
'-'
.
$row
[
'name'
]
.
' ('
.
$row
[
'semester'
]
.
$row
[
'year'
]
.
', du '
.
$row
[
'dbegin'
]
.
' au '
.
$row
[
'dend'
]
.
') [inscrit le '
.
$row
[
'subdate'
]
.
']'
;
echo
Views
::
printApi
(
$row
);
echo
' ['
.
$row
[
'semester'
]
.
$row
[
'year'
]
.
', inscrit le '
.
$row
[
'subdate'
]
.
']'
;
echo
'</p>'
;
}
}
...
...
@@ -38,7 +43,7 @@ class Views {
foreach
(
$list
as
$row
)
{
echo
'<p>'
;
echo
'<a href="index.php?action=sub&api='
.
$row
[
'code'
]
.
'&utclogin='
.
$utclogin
.
'">[inscription]</a> '
;
echo
$row
[
'code'
]
.
'-'
.
$row
[
'name'
]
;
echo
Views
::
printApi
(
$row
)
;
echo
'</p>'
;
}
}
...
...
@@ -46,4 +51,7 @@ class Views {
echo
'<h2>Aucune Api</h2>'
;
}
}
}
Write
Preview
Markdown
is supported
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