Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tutorat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZHANG David
tutorat
Commits
0ee61b98
Commit
0ee61b98
authored
4 months ago
by
ZHANG David
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
edfd1856
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/sidebar.php
+36
-0
36 additions, 0 deletions
code/sidebar.php
with
36 additions
and
0 deletions
code/sidebar.php
0 → 100644
+
36
−
0
View file @
0ee61b98
<?php
// Assurez-vous que la variable $user est définie avant d'inclure ce fichier
if
(
!
isset
(
$user
))
{
session_start
();
// Démarrer la session si ce n'est pas encore fait
$user
=
$_SESSION
[
'user'
]
??
null
;
// Récupérer les infos de l'utilisateur depuis la session
}
?>
<div
class=
"sidebar"
>
<div>
<h2>
Menu
</h2>
<?php
if
(
$user
[
'role'
]
===
'tutor'
)
:
?>
<a
href=
"create_session.php"
>
Créer sessions
</a>
<a
href=
"prof_create_depot.php"
>
Créer dépots
</a>
<a
href=
"prof_view_files.php"
>
Voir dépots
</a>
<a
href=
"manage_sessions.php"
>
Gestion de sessions
</a>
<a
href=
"view_students.php"
>
Voir les etudiants
</a>
<a
href=
"attendance.php"
>
Gestion des présences
</a>
<a
href=
"planning.php"
>
Programme hebdomadaire
</a>
<?php
elseif
(
$user
[
'role'
]
===
'student'
)
:
?>
<a
href=
"student_upload_file.php"
>
Voir les dépots
</a>
<a
href=
"join_session.php"
>
Rejoindre une session
</a>
<a
href=
"view_sessions.php"
>
Voir les sessions
</a>
<a
href=
"planning.php"
>
Programme hebdomadaire
</a>
<?php
elseif
(
$user
[
'role'
]
===
'admin'
)
:
?>
<a
href=
"manage_users.php"
>
Gestion utilisateurs
</a>
<a
href=
"manage_sessions_admin.php"
>
Gestion de sessions
</a>
<a
href=
"planning.php"
>
Programme hebdomadaire
</a>
<?php
endif
;
?>
<a
href=
"logout.php"
class=
"logout"
>
Deconnexion
</a>
</div>
<a
href=
"welcome.php"
>
<img
src=
"img/but.jpg"
alt=
"Sidebar Image"
>
</a>
</div>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment